All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/15] Support 10-bit YUV422 and 8/10-bit YUV420 color format on DW HDMI QP
@ 2026-10-13 22:51 ` Cristian Ciocaltea
  0 siblings, 0 replies; 35+ messages in thread
From: Cristian Ciocaltea @ 2026-10-13 22:51 UTC (permalink / raw)
  To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
	Daniel Stone, Philipp Zabel, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Luca Ceresoli, Daniel Stone, Nicolas Frattaroli
  Cc: kernel, Andy Yan, dri-devel, linux-rockchip, devicetree,
	linux-arm-kernel, linux-kernel, Krzysztof Kozlowski, Sashiko,
	Igor Paunovic, Sebastian Reichel

This series extends the output color format support of the Rockchip DW
HDMI QP controller to cover 10-bit YUV 4:2:2 and 8/10-bit YUV 4:2:0.

Patches 1, 7 & 15 improve VOP2 robustness on RK3588, helping recover
from exceptions and preventing random display output glitches observed
when switching modes that also change the color format, e.g. from RGB to
YUV 4:2:0 and vice versa.

Patch 8 avoids an incorrect DCLK source switch for 10-bit YUV 4:2:2 by
forcing 8 bpc in the bandwidth check.

Patches 2-6 address a few vop2 related issues reported by Sashiko, while
9-12 are additional cleanups/improvements.

Patch 13 adds MEDIA_BUS_FMT_UYVY10_1X20 for 10-bit YUV 4:2:2 output,
configuring the PHY with 8 bpc.  YUV 4:2:2 always transmits two 12-bit
components per pixel regardless of color depth, so from a clock-rate
perspective it is equivalent to three 8-bit RGB components.

Patch 14 advertises YUV 4:2:0 output, now that the bus-format and VOP2
support are in place.

Tested on Radxa's boards ROCK 5B (RK3588) and ROCK 4D (RK3576).

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
Changes in v5:
- Rebased onto latest drm-misc-next and fixed the conflicts introduced
  by the recent addition of HDMI 2.0 support to the DRM infrastructure
- Updated patch "drm/rockchip: vop2: Reset AXI and DCLK to improve
  robustness" to also assert the AXI reset in the bind path, fixing DSI
  panel support on RK3588 EVB1 (Sebastian Reichel)
- Added new patch "drm/rockchip: dw_hdmi_qp: Do not mask error code in
  atomic_check()" to fix a pre-existing issue reported by Sashiko
- Link to v4: https://patch.msgid.link/20260903-dw-hdmi-qp-yuv-v4-0-fb45bf4147eb@collabora.com

Changes in v4:
- Collected T-b tags from Igor
- Rebased onto the latest drm-misc-next, which now contains the HDPTX
  PHY driver fixes, so the runtime dependency has been dropped
- Link to v3: https://patch.msgid.link/20260709-dw-hdmi-qp-yuv-v3-0-a4a982a9f2e7@collabora.com

Changes in v3:
- Updated patch 3 to skip any hardware programming in the callbacks
  gated by drm_atomic_helper_commit_planes() after powering down VOP2 on
  an atomic_enable() error (Sashiko)
- Ensured VBLANK events are sent immediately when atomic_enable() fails,
  hence preventing userspace processes waiting for the page flip
  completion to hang indefinitely (new patch 4, Sashiko)
- Rebased onto latest drm-misc-next
- Link to v2: https://patch.msgid.link/20260706-dw-hdmi-qp-yuv-v2-0-b91beb33dedf@collabora.com

Changes in v2:
- Collected R-b from Krzysztof on the binding patch, while also fixed
  the property ordering in the example
- Renamed vop2_clk_reset() to vop2_reset_assert_deassert() and used to
  devm_reset_control_get_optional_exclusive() in patch 6 (Philipp Zabel)
- Addressed several issues reported by Sashiko
  * Reset AXI before detaching the IOMMU domain, to close a theoretical
    window where stale or in-flight DMA transactions could fault or
    access memory untranslated after the domain is detached (patch 6)
  * Fixed resource leak on vop2_enable() error path (new patch 2)
  * Balance state on atomic_enable error paths (new patch 3)
  * Avoided division by zero when computing max_dclk (new path 4)
  * Fixed VOP2_MAX_DCLK_RATE overflow on 32-bit (new patch 5)
- Rebased onto latest drm-misc-next
- Link to v1: https://patch.msgid.link/20260617-dw-hdmi-qp-yuv-v1-0-a665cfd06d7d@collabora.com

---
Cristian Ciocaltea (15):
      dt-bindings: display: vop2: Add missing reset properties
      drm/rockchip: vop2: Fix resource leak on vop2_enable() error path
      drm/rockchip: vop2: Balance state on atomic_enable() error paths
      drm/rockchip: vop2: Send pending event when atomic_enable() fails
      drm/rockchip: vop2: Avoid division by zero when computing max_dclk
      drm/rockchip: vop2: Fix VOP2_MAX_DCLK_RATE overflow on 32-bit
      drm/rockchip: vop2: Reset AXI and DCLK to improve robustness
      drm/rockchip: vop2: Avoid DCLK source switch for 10-bit YUV422 output
      drm/rockchip: vop2: Consolidate HDMI PHY PLL clock parent switch
      drm/rockchip: vop2: Switch to enum vop_csc_format
      drm/bridge: dw-hdmi-qp: Log resolution and refresh rate in atomic_enable()
      drm/rockchip: dw_hdmi_qp: Do not mask error code in atomic_check()
      drm/rockchip: dw_hdmi_qp: Support 10-bit YUV422 output format
      drm/rockchip: dw_hdmi_qp: Enable YUV420 output format
      arm64: dts: rockchip: Add RK3588 VOP2 resets

 .../bindings/display/rockchip/rockchip-vop2.yaml   |  46 ++++-
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi      |  12 ++
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c       |  10 +-
 drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c     |  15 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c       | 217 +++++++++++++++------
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.h       |  10 +
 6 files changed, 247 insertions(+), 63 deletions(-)
---
base-commit: 3e32932d3626d0279f9b3531bd648f8c0a16cb08
change-id: 20260617-dw-hdmi-qp-yuv-2b0f7bb5ba81


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2026-10-13 23:13 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 22:51 [PATCH v5 00/15] Support 10-bit YUV422 and 8/10-bit YUV420 color format on DW HDMI QP Cristian Ciocaltea
2026-10-13 22:51 ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 01/15] dt-bindings: display: vop2: Add missing reset properties Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 02/15] drm/rockchip: vop2: Fix resource leak on vop2_enable() error path Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 03/15] drm/rockchip: vop2: Balance state on atomic_enable() error paths Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 04/15] drm/rockchip: vop2: Send pending event when atomic_enable() fails Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 05/15] drm/rockchip: vop2: Avoid division by zero when computing max_dclk Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 06/15] drm/rockchip: vop2: Fix VOP2_MAX_DCLK_RATE overflow on 32-bit Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 07/15] drm/rockchip: vop2: Reset AXI and DCLK to improve robustness Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 23:07   ` sashiko-bot
2026-10-13 22:51 ` [PATCH v5 08/15] drm/rockchip: vop2: Avoid DCLK source switch for 10-bit YUV422 output Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 09/15] drm/rockchip: vop2: Consolidate HDMI PHY PLL clock parent switch Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 10/15] drm/rockchip: vop2: Switch to enum vop_csc_format Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 11/15] drm/bridge: dw-hdmi-qp: Log resolution and refresh rate in atomic_enable() Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 12/15] drm/rockchip: dw_hdmi_qp: Do not mask error code in atomic_check() Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 23:04   ` sashiko-bot
2026-10-13 22:51 ` [PATCH v5 13/15] drm/rockchip: dw_hdmi_qp: Support 10-bit YUV422 output format Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 23:12   ` sashiko-bot
2026-10-13 22:51 ` [PATCH v5 14/15] drm/rockchip: dw_hdmi_qp: Enable YUV420 " Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 15/15] arm64: dts: rockchip: Add RK3588 VOP2 resets Cristian Ciocaltea
2026-10-13 22:51   ` Cristian Ciocaltea

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.