linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/19] drm/connector: hdmi: Allow using the YUV420 output format
@ 2025-05-27 12:11 Cristian Ciocaltea
  2025-05-27 12:11 ` [PATCH v5 01/19] drm/connector: hdmi: Evaluate limited range after computing format Cristian Ciocaltea
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: Cristian Ciocaltea @ 2025-05-27 12:11 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Dave Stevenson, Dmitry Baryshkov, Dmitry Baryshkov,
	Dmitry Baryshkov
  Cc: kernel, dri-devel, linux-kernel, Jani Nikula

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@collabora.com>
---
Changes in v5:
- Collected R-b/A-b tags from Maxime and Dmitry
- Got rid of the condition inversion in "drm/connector: hdmi: Use YUV420
  output format as an RGB fallback" (Maxime)
- Added new patch "drm/tests: hdmi: Switch to 'void *' type for EDID
  data" and updated "drm/tests: hdmi: Add macro to simplify EDID setup"
  accordingly (Jani)
- Dropped EDEADLK-related patches and used explicit error handling in
  the new tests for now - to be handled in a dedicated series:
  * "drm/tests: helpers: Add a (re)try helper variant to enable CRTC connector"
  * "drm/tests: hdmi: Switch to drm_kunit_helper_try_enable_crtc_connector()"
  * "drm/tests: hdmi: Add macro to support EDEADLK handling"
  * "drm/tests: hdmi: Restart atomic sequence on EDEADLK"
- Removed "drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode"
  which requires a rework, including a new test EDID - to be submitted
  separately
- Rebased series onto drm-misc-next from 2025-05-26
- Link to v4: https://lore.kernel.org/r/20250425-hdmi-conn-yuv-v4-0-5e55e2aaa3fa@collabora.com

Changes in v4:
- Collected R-b tags from Maxime and Dmitry
- Squashed "drm/connector: hdmi: Rename hdmi_compute_format() internal
  helper" into "drm/connector: hdmi: Factor out bpc and format
  computation logic" and moved the TODO hunk to next patch (Maxime)
- Logged a debug message in "drm/connector: hdmi: Use YUV420 output
  format as an RGB fallback" for hdmi_compute_format_bpc() (Maxime)
- Reworded "drm/tests: hdmi: Fixup CamelCase warning" to "drm/tests:
  hdmi: Replace '[_]MHz' with 'mhz'"
- Reworked the patches simplifying EDID setup: ended up with just a new
  __connector_hdmi_init() function and a single helper macro (Maxime)
- Added new patches to handle EDEADLK:
  * "drm/tests: helpers: Add a (re)try helper variant to enable CRTC connector"
  * "drm/tests: hdmi: Switch to drm_kunit_helper_try_enable_crtc_connector()"
  * "drm/tests: hdmi: Add macro to support EDEADLK handling"
  * "drm/tests: hdmi: Restart atomic sequence on EDEADLK"
  * "drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible"
- Updated all YUV420 test cases:
  * Moved function renames and EDID content to dedicated patches
  * Improved error handling
  * Reworded a few comment blocks
  * Hand-crafted the state and used drm_atomic_check_only() in
    drm_test_check_driver_unsupported_fallback_yuv420()
- Added "drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode"
- Rebased series onto drm-misc-next from 2025-04-22
- Link to v3: https://lore.kernel.org/r/20250326-hdmi-conn-yuv-v3-0-294d3ebbb4b2@collabora.com

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@collabora.com

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@collabora.com

---
Cristian Ciocaltea (19):
      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: Factor out bpc and format computation logic
      drm/connector: hdmi: Use YUV420 output format as an RGB fallback
      drm/tests: hdmi: Replace '[_]MHz' with 'mhz'
      drm/tests: hdmi: Switch to 'void *' type for EDID data
      drm/tests: hdmi: Add macro to simplify EDID setup
      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: Switch to drm_atomic_get_new_connector_state() where possible
      drm/tests: hdmi: Provide EDID supporting 4K@30Hz with YUV420 only
      drm/tests: hdmi: Add limited range tests for YUV420 mode
      drm/tests: hdmi: Rename max TMDS rate fallback tests
      drm/tests: hdmi: Provide EDID supporting 4K@30Hz with RGB/YUV
      drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode
      drm/tests: hdmi: Add test for unsuccessful fallback to YUV420

 drivers/gpu/drm/display/drm_hdmi_state_helper.c    | 120 ++--
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 651 +++++++++++++++------
 drivers/gpu/drm/tests/drm_kunit_edid.h             | 232 ++++++++
 3 files changed, 784 insertions(+), 219 deletions(-)
---
base-commit: 9ec1ac835e489b9ab2776c0cbbb1b1ca813923a2
change-id: 20241130-hdmi-conn-yuv-e1fa596df768


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

end of thread, other threads:[~2025-06-02 19:05 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 12:11 [PATCH v5 00/19] drm/connector: hdmi: Allow using the YUV420 output format Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 01/19] drm/connector: hdmi: Evaluate limited range after computing format Cristian Ciocaltea
2025-06-02  9:00   ` Maxime Ripard
2025-05-27 12:11 ` [PATCH v5 02/19] drm/connector: hdmi: Add support for YUV420 format verification Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 03/19] drm/connector: hdmi: Improve debug message for supported format Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 04/19] drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc() Cristian Ciocaltea
2025-06-02  9:00   ` Maxime Ripard
2025-05-27 12:11 ` [PATCH v5 05/19] drm/connector: hdmi: Factor out bpc and format computation logic Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 06/19] drm/connector: hdmi: Use YUV420 output format as an RGB fallback Cristian Ciocaltea
2025-06-02  9:00   ` Maxime Ripard
2025-05-27 12:11 ` [PATCH v5 07/19] drm/tests: hdmi: Replace '[_]MHz' with 'mhz' Cristian Ciocaltea
2025-06-02  8:59   ` Maxime Ripard
2025-05-27 12:11 ` [PATCH v5 08/19] drm/tests: hdmi: Switch to 'void *' type for EDID data Cristian Ciocaltea
2025-06-02  8:59   ` Maxime Ripard
2025-05-27 12:11 ` [PATCH v5 09/19] drm/tests: hdmi: Add macro to simplify EDID setup Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 10/19] drm/tests: hdmi: Replace open coded " Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 11/19] drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs() Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 12/19] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 13/19] drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 14/19] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with YUV420 only Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 15/19] drm/tests: hdmi: Add limited range tests for YUV420 mode Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 16/19] drm/tests: hdmi: Rename max TMDS rate fallback tests Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 17/19] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with RGB/YUV Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 18/19] drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode Cristian Ciocaltea
2025-05-27 12:11 ` [PATCH v5 19/19] drm/tests: hdmi: Add test for unsuccessful fallback to YUV420 Cristian Ciocaltea
2025-06-02  9:05 ` [PATCH v5 00/19] drm/connector: hdmi: Allow using the YUV420 output format Maxime Ripard
2025-06-02  9:09   ` Maxime Ripard
2025-06-02 19:05     ` Cristian Ciocaltea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).