[PATCH v3 00/15] drm/connector: hdmi: Allow using the YUV420 output format
From: Cristian Ciocaltea
Date: Wed Mar 26 2025 - 06:21:24 EST
Provide the basic support to enable using YUV420 as an RGB fallback when
computing the best output format and color depth.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
---
Changes in v3:
- Collected R-B tags from Dmitry and Maxime
- Updated debug messages in "drm/connector: hdmi: Add support for YUV420
format verification" to avoid referencing VIC (Maxime)
- Reworked "drm/connector: hdmi: Use YUV420 output format as an RGB
fallback" and moved some parts to separate patches:
* drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc()
* drm/connector: hdmi: Rename hdmi_compute_format() internal helper
* drm/connector: hdmi: Factor out bpc and format computation logic
- Reworked "drm/tests: hdmi: Add macros to simplify EDID setup" by
renaming the new helpers and moving the conversion to separate
patches (Maxime):
* drm/tests: hdmi: Fixup CamelCase warning
* drm/tests: hdmi: Replace open coded EDID setup
* drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs()
- Moved connector_hdmi_init_with_edid_funcs() changes from "drm/tests:
hdmi: Add limited range tests for YUV420 mode") to "drm/tests: hdmi:
Setup ycbcr_420_allowed before initializing connector"
- Got rid of the floating-point operation in "drm/tests: hdmi: Add max
TMDS rate fallback tests for YUV420 mode" in order to fix the build
errors reported by some kernel test robots
- Added new patch "drm/tests: hdmi: Add test for unsuccessful forced
fallback to YUV420"
- Rebased series onto drm-misc-next from 2025-03-25
- Link to v2: https://lore.kernel.org/r/20250311-hdmi-conn-yuv-v2-0-fbdb94f02562@xxxxxxxxxxxxx
Changes in v2:
- Provided the missing Fixes tag on first patch (Dmitry)
- Added patch "drm/connector: hdmi: Improve debug message for supported
format"
- Reworked "drm/connector: hdmi: Use YUV420 output format as an RGB
fallback" so that the fallback to YUV420 will be attempted only when
RGB cannot be supported for any of the available color depths (Maxime)
- Added a patch to simplify EDID setup in KUnit cases
- Added two patches extending KUnit coverage for YUV420 by providing
tests for limited range and max TMDS rate fallback
- Rebased series onto drm-misc-next-2025-03-06
- Link to v1: https://lore.kernel.org/r/20241130-hdmi-conn-yuv-v1-0-254279a08671@xxxxxxxxxxxxx
---
Cristian Ciocaltea (15):
drm/connector: hdmi: Evaluate limited range after computing format
drm/connector: hdmi: Add support for YUV420 format verification
drm/connector: hdmi: Improve debug message for supported format
drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc()
drm/connector: hdmi: Rename hdmi_compute_format() internal helper
drm/connector: hdmi: Factor out bpc and format computation logic
drm/connector: hdmi: Use YUV420 output format as an RGB fallback
drm/tests: hdmi: Add macros to simplify EDID setup
drm/tests: hdmi: Fixup CamelCase warning
drm/tests: hdmi: Replace open coded EDID setup
drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs()
drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector
drm/tests: hdmi: Add limited range tests for YUV420 mode
drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode
drm/tests: hdmi: Add test for unsuccessful forced fallback to YUV420
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 114 +++--
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 557 ++++++++++++++-------
drivers/gpu/drm/tests/drm_kunit_edid.h | 222 ++++++++
3 files changed, 678 insertions(+), 215 deletions(-)
---
base-commit: 2f9d51740cc30e0d2c8a23a55b1e20cf2513c250
change-id: 20241130-hdmi-conn-yuv-e1fa596df768