[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240312-dp-live-fmt-v2-0-a9c35dc5c50d@amd.com>
Date: Tue, 12 Mar 2024 17:54:57 -0700
From: Anatoliy Klymenko <anatoliy.klymenko@....com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Michal Simek <michal.simek@....com>, Andrzej
Hajda <andrzej.hajda@...el.com>, Neil Armstrong <neil.armstrong@...aro.org>,
Robert Foss <rfoss@...nel.org>, Jonas Karlman <jonas@...boo.se>, Jernej
Skrabec <jernej.skrabec@...il.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley
<conor+dt@...nel.org>, Mauro Carvalho Chehab <mchehab@...nel.org>
CC: <dri-devel@...ts.freedesktop.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-media@...r.kernel.org>, Anatoliy Klymenko <anatoliy.klymenko@....com>
Subject: [PATCH v2 0/8] Setting live video input format for ZynqMP DPSUB
Implement live video input format setting for ZynqMP DPSUB.
ZynqMP DPSUB can operate in 2 modes: DMA-based and live.
In the live mode, DPSUB receives a live video signal from FPGA-based CRTC.
DPSUB acts as a DRM encoder bridge in such a scenario. To properly tune
into the incoming video signal, DPSUB should be programmed with the proper
media bus format. This patch series addresses this task.
Patch 1/8: Set the DPSUB layer mode of operation prior to enabling the
layer. Allows to use layer operational mode before its enablement.
Patch 2/8: Update some IP register defines.
Patch 3/8: Announce supported input media bus formats via
drm_bridge_funcs.atomic_get_input_bus_fmts callback.
Patch 4/8: Minimize usage of a global flag. Minor improvement.
Patch 5/8: Program DPSUB live video input format based on selected bus
config in the new atomic bridge state.
Patch 6/8: New optional CRTC atomic helper proposal that will allow CRTC
to participate in DRM bridge chain format negotiation and impose format
restrictions. Incorporate this callback into the DRM bridge format
negotiation process.
Patch 7/8: DT bindings documentation for Video Timing Controller and Test
Pattern Generator IPs.
Patch 8/8: Reference FPGA CRTC driver based on AMD/Xilinx Test Pattern
Generator (TPG) IP. Add driver for the AMD/Xilinx Video Timing Controller
(VTC), which supplements TPG.
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
To: Maxime Ripard <mripard@...nel.org>
To: Thomas Zimmermann <tzimmermann@...e.de>
To: David Airlie <airlied@...il.com>
To: Daniel Vetter <daniel@...ll.ch>
To: Michal Simek <michal.simek@....com>
To: Andrzej Hajda <andrzej.hajda@...el.com>
To: Neil Armstrong <neil.armstrong@...aro.org>
To: Robert Foss <rfoss@...nel.org>
To: Jonas Karlman <jonas@...boo.se>
To: Jernej Skrabec <jernej.skrabec@...il.com>
To: Rob Herring <robh+dt@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
To: Conor Dooley <conor+dt@...nel.org>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
Cc: devicetree@...r.kernel.org
Cc: linux-media@...r.kernel.org
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@....com>
Changes in v2:
- Factor out register defines update into separate patch.
- Add some improvements minimizing ithe usage of a global flag.
- Reuse existing format setting API instead of introducing new versions.
- Add warning around NULL check on new bridge state within atomic enable
callback.
- Add drm_helper_crtc_select_output_bus_format() that wraps
drm_crtc_helper_funcs.select_output_bus_format().
- Update API comments per review recommendations.
- Address some minor review comments.
- Add reference CRTC driver that demonstrates the usage of the proposed
drm_crtc_helper_funcs.select_output_bus_format() API.
- Link to v1: https://lore.kernel.org/r/20240226-dp-live-fmt-v1-0-b78c3f69c9d8@amd.com
---
Anatoliy Klymenko (8):
drm: xlnx: zynqmp_dpsub: Set layer mode during creation
drm: xlnx: zynqmp_dpsub: Update live format defines
drm: xlnx: zynqmp_dpsub: Anounce supported input formats
drm: xlnx: zynqmp_dpsub: Minimize usage of global flag
drm: xlnx: zynqmp_dpsub: Set input live format
drm/atomic-helper: Add select_output_bus_format callback
dt-bindings: xlnx: Add VTC and TPG bindings
drm: xlnx: Intoduce TPG CRTC driver
.../bindings/display/xlnx/xlnx,v-tpg.yaml | 87 +++
.../devicetree/bindings/display/xlnx/xlnx,vtc.yaml | 65 ++
drivers/gpu/drm/drm_bridge.c | 14 +-
drivers/gpu/drm/drm_crtc_helper.c | 36 +
drivers/gpu/drm/xlnx/Kconfig | 21 +
drivers/gpu/drm/xlnx/Makefile | 4 +
drivers/gpu/drm/xlnx/xlnx_tpg.c | 854 +++++++++++++++++++++
drivers/gpu/drm/xlnx/xlnx_vtc.c | 452 +++++++++++
drivers/gpu/drm/xlnx/xlnx_vtc.h | 101 +++
drivers/gpu/drm/xlnx/xlnx_vtc_list.c | 160 ++++
drivers/gpu/drm/xlnx/zynqmp_disp.c | 187 ++++-
drivers/gpu/drm/xlnx/zynqmp_disp.h | 19 +-
drivers/gpu/drm/xlnx/zynqmp_disp_regs.h | 8 +-
drivers/gpu/drm/xlnx/zynqmp_dp.c | 41 +-
drivers/gpu/drm/xlnx/zynqmp_kms.c | 6 +-
include/drm/drm_crtc_helper.h | 5 +
include/drm/drm_modeset_helper_vtables.h | 30 +
include/dt-bindings/media/media-bus-format.h | 177 +++++
18 files changed, 2204 insertions(+), 63 deletions(-)
---
base-commit: bfa4437fd3938ae2e186e7664b2db65bb8775670
change-id: 20240226-dp-live-fmt-6415773b5a68
Best regards,
--
Anatoliy Klymenko <anatoliy.klymenko@....com>
Powered by blists - more mailing lists