All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Michal Simek <michal.simek@amd.com>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	<dri-devel@lists.freedesktop.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-media@vger.kernel.org>,
	Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Subject: [PATCH v3 0/9] Setting live video input format for ZynqMP DPSUB
Date: Thu, 21 Mar 2024 13:43:38 -0700	[thread overview]
Message-ID: <20240321-dp-live-fmt-v3-0-d5090d796b7e@amd.com> (raw)

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/9: Set the DPSUB layer mode of operation prior to enabling the
layer. Allows to use layer operational mode before its enablement.

Patch 2/9: Update some IP register defines.

Patch 3/9: Factor out some code into a helper function.

Patch 4/9: Announce supported input media bus formats via
drm_bridge_funcs.atomic_get_input_bus_fmts callback.

Patch 5/9: Minimize usage of a global flag. Minor improvement.

Patch 6/9: Program DPSUB live video input format based on selected bus
config in the new atomic bridge state.

Patch 7/9: 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 8/9: DT bindings documentation for Video Timing Controller and Test
Pattern Generator IPs.

Patch 9/9: 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@ideasonboard.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
To: Michal Simek <michal.simek@amd.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Robert Foss <rfoss@kernel.org>
To: Jonas Karlman <jonas@kwiboo.se>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>

Changes in v3:
- Add connected live layer helper
- Include reference DRM format in zynqmp_disp_format for live layerss.
- Add default bus format list for non-live case.
- Explain removal of redundant checks in the commit message.
- Minor fixes and improvements from review comments.

Link to v2: https://lore.kernel.org/r/20240312-dp-live-fmt-v2-0-a9c35dc5c50d@amd.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 (9):
      drm: xlnx: zynqmp_dpsub: Set layer mode during creation
      drm: xlnx: zynqmp_dpsub: Update live format defines
      drm: xlnx: zynqmp_dpsub: Add connected live layer helper
      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                    | 846 +++++++++++++++++++++
 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                 | 170 ++++-
 drivers/gpu/drm/xlnx/zynqmp_disp.h                 |  19 +-
 drivers/gpu/drm/xlnx/zynqmp_disp_regs.h            |   8 +-
 drivers/gpu/drm/xlnx/zynqmp_dp.c                   |  81 +-
 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, 2198 insertions(+), 84 deletions(-)
---
base-commit: bfa4437fd3938ae2e186e7664b2db65bb8775670
change-id: 20240226-dp-live-fmt-6415773b5a68

Best regards,
-- 
Anatoliy Klymenko <anatoliy.klymenko@amd.com>


WARNING: multiple messages have this Message-ID (diff)
From: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Michal Simek <michal.simek@amd.com>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	<dri-devel@lists.freedesktop.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-media@vger.kernel.org>,
	Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Subject: [PATCH v3 0/9] Setting live video input format for ZynqMP DPSUB
Date: Thu, 21 Mar 2024 13:43:38 -0700	[thread overview]
Message-ID: <20240321-dp-live-fmt-v3-0-d5090d796b7e@amd.com> (raw)

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/9: Set the DPSUB layer mode of operation prior to enabling the
layer. Allows to use layer operational mode before its enablement.

Patch 2/9: Update some IP register defines.

Patch 3/9: Factor out some code into a helper function.

Patch 4/9: Announce supported input media bus formats via
drm_bridge_funcs.atomic_get_input_bus_fmts callback.

Patch 5/9: Minimize usage of a global flag. Minor improvement.

Patch 6/9: Program DPSUB live video input format based on selected bus
config in the new atomic bridge state.

Patch 7/9: 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 8/9: DT bindings documentation for Video Timing Controller and Test
Pattern Generator IPs.

Patch 9/9: 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@ideasonboard.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
To: Michal Simek <michal.simek@amd.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Robert Foss <rfoss@kernel.org>
To: Jonas Karlman <jonas@kwiboo.se>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>

Changes in v3:
- Add connected live layer helper
- Include reference DRM format in zynqmp_disp_format for live layerss.
- Add default bus format list for non-live case.
- Explain removal of redundant checks in the commit message.
- Minor fixes and improvements from review comments.

Link to v2: https://lore.kernel.org/r/20240312-dp-live-fmt-v2-0-a9c35dc5c50d@amd.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 (9):
      drm: xlnx: zynqmp_dpsub: Set layer mode during creation
      drm: xlnx: zynqmp_dpsub: Update live format defines
      drm: xlnx: zynqmp_dpsub: Add connected live layer helper
      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                    | 846 +++++++++++++++++++++
 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                 | 170 ++++-
 drivers/gpu/drm/xlnx/zynqmp_disp.h                 |  19 +-
 drivers/gpu/drm/xlnx/zynqmp_disp_regs.h            |   8 +-
 drivers/gpu/drm/xlnx/zynqmp_dp.c                   |  81 +-
 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, 2198 insertions(+), 84 deletions(-)
---
base-commit: bfa4437fd3938ae2e186e7664b2db65bb8775670
change-id: 20240226-dp-live-fmt-6415773b5a68

Best regards,
-- 
Anatoliy Klymenko <anatoliy.klymenko@amd.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2024-03-21 20:44 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 20:43 Anatoliy Klymenko [this message]
2024-03-21 20:43 ` [PATCH v3 0/9] Setting live video input format for ZynqMP DPSUB Anatoliy Klymenko
2024-03-21 20:43 ` [PATCH v3 1/9] drm: xlnx: zynqmp_dpsub: Set layer mode during creation Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:06   ` Tomi Valkeinen
2024-04-05 12:06     ` Tomi Valkeinen
2024-04-05 12:31   ` Tomi Valkeinen
2024-04-05 12:31     ` Tomi Valkeinen
2024-04-08 18:21     ` Klymenko, Anatoliy
2024-04-08 18:21       ` Klymenko, Anatoliy
2024-03-21 20:43 ` [PATCH v3 2/9] drm: xlnx: zynqmp_dpsub: Update live format defines Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:10   ` Tomi Valkeinen
2024-04-05 12:10     ` Tomi Valkeinen
2024-04-08 18:17     ` Klymenko, Anatoliy
2024-04-08 18:17       ` Klymenko, Anatoliy
2024-03-21 20:43 ` [PATCH v3 3/9] drm: xlnx: zynqmp_dpsub: Add connected live layer helper Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:12   ` Tomi Valkeinen
2024-04-05 12:12     ` Tomi Valkeinen
2024-03-21 20:43 ` [PATCH v3 4/9] drm: xlnx: zynqmp_dpsub: Anounce supported input formats Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:39   ` Tomi Valkeinen
2024-04-05 12:39     ` Tomi Valkeinen
2024-03-21 20:43 ` [PATCH v3 5/9] drm: xlnx: zynqmp_dpsub: Minimize usage of global flag Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:42   ` Tomi Valkeinen
2024-04-05 12:42     ` Tomi Valkeinen
2024-03-21 20:43 ` [PATCH v3 6/9] drm: xlnx: zynqmp_dpsub: Set input live format Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-04-05 12:56   ` Tomi Valkeinen
2024-04-05 12:56     ` Tomi Valkeinen
2024-03-21 20:43 ` [PATCH v3 7/9] drm/atomic-helper: Add select_output_bus_format callback Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-03-22  9:44   ` Maxime Ripard
2024-03-22  9:44     ` Maxime Ripard
2024-03-22 19:15     ` Klymenko, Anatoliy
2024-03-22 19:15       ` Klymenko, Anatoliy
2024-03-21 20:43 ` [PATCH v3 8/9] dt-bindings: xlnx: Add VTC and TPG bindings Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-03-21 22:25   ` Rob Herring
2024-03-21 22:25     ` Rob Herring
2024-03-22  5:57   ` Krzysztof Kozlowski
2024-03-22  5:57     ` Krzysztof Kozlowski
2024-03-22  5:59   ` Krzysztof Kozlowski
2024-03-22  5:59     ` Krzysztof Kozlowski
2024-03-22 18:05     ` Conor Dooley
2024-03-22 18:05       ` Conor Dooley
2024-03-23 10:22       ` Krzysztof Kozlowski
2024-03-23 10:22         ` Krzysztof Kozlowski
2024-03-23 19:08         ` Conor Dooley
2024-03-23 19:08           ` Conor Dooley
2024-03-22 19:12     ` Klymenko, Anatoliy
2024-03-22 19:12       ` Klymenko, Anatoliy
2024-03-23 10:20       ` Krzysztof Kozlowski
2024-03-23 10:20         ` Krzysztof Kozlowski
2024-03-29  0:38         ` Klymenko, Anatoliy
2024-03-29  0:38           ` Klymenko, Anatoliy
2024-03-29 15:46           ` Conor Dooley
2024-03-29 15:46             ` Conor Dooley
2024-03-30  2:02             ` Klymenko, Anatoliy
2024-03-30  2:02               ` Klymenko, Anatoliy
2024-03-30  9:27               ` Krzysztof Kozlowski
2024-03-30  9:27                 ` Krzysztof Kozlowski
2024-03-21 20:43 ` [PATCH v3 9/9] drm: xlnx: Intoduce TPG CRTC driver Anatoliy Klymenko
2024-03-21 20:43   ` Anatoliy Klymenko
2024-03-23 10:19 ` [PATCH v3 0/9] Setting live video input format for ZynqMP DPSUB Krzysztof Kozlowski
2024-03-23 10:19   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240321-dp-live-fmt-v3-0-d5090d796b7e@amd.com \
    --to=anatoliy.klymenko@amd.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mchehab@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.