Skip to content

drm/vc4: hdmi: Add Support for the YUV output

Maxime Ripard dri-devel oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18drm: Introduce new HDMI helpersdrivers/gpu/drm/Makefile drivers/gpu/drm/drm_hdmi.c include/drm/drm_hdmi.h+195 -11 reply
2/18drm/bridge: Add HDMI output fmt helperdrivers/gpu/drm/bridge/synopsys/dw-hdmi.c drivers/gpu/drm/drm_bridge.c include/drm/drm_bridge.h+124 -1275 replies
3/18drm/bridge: dw-hdmi: Use helpersdrivers/gpu/drm/bridge/synopsys/dw-hdmi.c+28 -1131 reply
4/18drm/vc4: txp: Properly set the possible_crtcs maskdrivers/gpu/drm/vc4/vc4_txp.c+1 -12 replies
5/18drm/vc4: crtc: Skip the TXPdrivers/gpu/drm/vc4/vc4_crtc.c+3 -01 reply
6/18drm/vc4: Rework the encoder retrieval codedrivers/gpu/drm/vc4/vc4_crtc.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h+60 -21 reply
7/18drm/vc4: hdmi: Add full range RGB helperdrivers/gpu/drm/vc4/vc4_hdmi.c+10 -22 replies
8/18drm/vc4: hdmi: Use full range helper in csc functionsdrivers/gpu/drm/vc4/vc4_hdmi.c drivers/gpu/drm/vc4/vc4_hdmi.h+10 -71 reply
9/18drm/vc4: hdmi: Remove limited_rgb_rangedrivers/gpu/drm/vc4/vc4_hdmi.c drivers/gpu/drm/vc4/vc4_hdmi.h+5 -171 reply
10/18drm/vc4: hdmi: Convert to bridgedrivers/gpu/drm/vc4/vc4_crtc.c drivers/gpu/drm/vc4/vc4_drv.c drivers/gpu/drm/vc4/vc4_drv.h +2 more+131 -671 reply
11/18drm/vc4: hdmi: Move XBAR setup to csc_setupdrivers/gpu/drm/vc4/vc4_hdmi.c+2 -11 reply
12/18drm/vc4: hdmi: Replace CSC_CTL hardcoded value by definesdrivers/gpu/drm/vc4/vc4_hdmi.c drivers/gpu/drm/vc4/vc4_regs.h+5 -31 reply
13/18drm/vc4: hdmi: Define colorspace matricesdrivers/gpu/drm/vc4/vc4_hdmi.c+48 -291 reply
14/18drm/vc4: hdmi: Change CSC callback prototypedrivers/gpu/drm/vc4/vc4_hdmi.c drivers/gpu/drm/vc4/vc4_hdmi.h+4 -11 reply
15/18drm/vc4: hdmi: Rework the infoframe prototypedrivers/gpu/drm/vc4/vc4_hdmi.c+18 -201 reply
16/18drm/vc4: hdmi: Support HDMI YUV outputdrivers/gpu/drm/vc4/vc4_hdmi.c drivers/gpu/drm/vc4/vc4_hdmi_regs.h drivers/gpu/drm/vc4/vc4_regs.h+90 -51 reply
17/18drm/vc4: hdmi: Move the pixel rate calculation to a helperdrivers/gpu/drm/vc4/vc4_hdmi.c+25 -111 reply
18/18drm/vc4: hdmi: Force YUV422 if the rate is too highdrivers/gpu/drm/vc4/vc4_hdmi.c+36 -11 reply

Reviews trailers per patch

16 of 18 patches have a Reviewed-by or Acked-by.

PatchThomas Zimmermann
1/18A-b
2/18
3/18A-b
4/18A-b
5/18A-b
6/18
7/18A-b
8/18A-b
9/18A-b
10/18A-b
11/18A-b
12/18A-b
13/18A-b
14/18A-b
15/18A-b
16/18A-b
17/18A-b
18/18A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/18] drm/vc4: hdmi: Add Support for the YUV output

Hi,

Here's an attempt at support the HDMI YUV output on the BCM2711 SoC found on the RaspberryPi4.

I took the same approach than what dw-hdmi did already, turning a bunch of functions found in that driver into helpers since they were fairly generic.

However, it feels a bit clunky overall and there's a few rough edges that should be addressed in a generic manner:

- while the format negociation makes sense for a bridge, it feels a bit over-engineered for a simple encoder where that setting could be a simple switch (and possibly a property?)

- more importantly, whether we're choosing an YUV output or not is completely hidden away from the userspace even though it might have some effect on the visual quality output (thinking about YUV420 and YUV422 here mostly).

- Similarly, the list we report is static and the userspace cannot change or force one mode over the other. We will always pick YUV444 over RGB444 if both are available for example.

While the first one might just be due to a lack of helpers, the second and third ones are also feeling a bit inconsistent with how we're handling the 10/12 bit output for example

Let me know what you think,
Maxime

Maxime Ripard (18):
drm: Introduce new HDMI helpers
drm/bridge: Add HDMI output fmt helper drm/bridge: dw-hdmi: Use helpers
drm/vc4: txp: Properly set the possible_crtcs mask drm/vc4: crtc: Skip the TXP
drm/vc4: Rework the encoder retrieval code drm/vc4: hdmi: Add full range RGB helper drm/vc4: hdmi: Use full range helper in csc functions drm/vc4: hdmi: Remove limited_rgb_range
drm/vc4: hdmi: Convert to bridge
drm/vc4: hdmi: Move XBAR setup to csc_setup drm/vc4: hdmi: Replace CSC_CTL hardcoded value by defines drm/vc4: hdmi: Define colorspace matrices drm/vc4: hdmi: Change CSC callback prototype drm/vc4: hdmi: Rework the infoframe prototype drm/vc4: hdmi: Support HDMI YUV output
drm/vc4: hdmi: Move the pixel rate calculation to a helper drm/vc4: hdmi: Force YUV422 if the rate is too high

 drivers/gpu/drm/Makefile                  |   2 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 268 ++-------------
 drivers/gpu/drm/drm_bridge.c              | 118 +++++++
 drivers/gpu/drm/drm_hdmi.c                | 170 +++++++++
 drivers/gpu/drm/vc4/vc4_crtc.c            |  59 +++-
 drivers/gpu/drm/vc4/vc4_drv.c             |  41 +++
 drivers/gpu/drm/vc4/vc4_drv.h             |  26 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c            | 399 +++++++++++++++-------
 drivers/gpu/drm/vc4/vc4_hdmi.h            |  13 +-
 drivers/gpu/drm/vc4/vc4_hdmi_regs.h       |   6 +
 drivers/gpu/drm/vc4/vc4_regs.h            |  19 ++
 drivers/gpu/drm/vc4/vc4_txp.c             |   2 +-
 include/drm/drm_bridge.h                  |   6 +
 include/drm/drm_hdmi.h                    |  24 ++
 14 files changed, 770 insertions(+), 383 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_hdmi.c
 create mode 100644 include/drm/drm_hdmi.h
Signature · 6 lines
2.30.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel