linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/10] drm/display: hdmi: add drm_hdmi_connector_mode_valid()
@ 2024-11-22  9:12 Dmitry Baryshkov
  2024-11-22  9:12 ` [PATCH v4 01/10] drm/tests: hdmi: handle empty modes in find_preferred_mode() Dmitry Baryshkov
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-11-22  9:12 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Dave Stevenson, Maíra Canal, Raspberry Pi Kernel Maintenance,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman
  Cc: dri-devel, linux-kernel, linux-arm-kernel, linux-sunxi

Several HDMI drivers have common code pice in the .mode_valid function
that validates RGB / 8bpc rate using the TMDS char rate callbacks.

Move this code piece to the common helper and remove the need to perform
this check manually. In case of DRM_BRIDGE_OP_HDMI bridges, they can
skip the check in favour of performing it in drm_bridge_connector.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v4:
- Fixed build warning in VC4 driver by adding .mode_valid to
  vc4_hdmi_connector_helper_funcs (LKP)
- Reworked HDMI test helpers (Maxime)
- Expanded test descriptions and comments (Maxime)
- Added new EDID to test info.max_tmds_clock filtering (Maxime)
- Link to v3: https://lore.kernel.org/r/20241109-hdmi-mode-valid-v3-0-5348c2368076@linaro.org

Changes in v3:
- Moved drm_hdmi_connector_mode_valid() to drm_hdmi_state_helper.c
  (Maxime)
- Added commnt next to the preferred = list_first_entry() assignment
  (Maxime)
- Added comments to new tests, describing what is being tested (Maxime)
- Replaced sun4i_hdmi_connector_atomic_check() with
  drm_atomic_helper_connector_hdmi_check() (Maxime)
- Link to v2: https://lore.kernel.org/r/20241101-hdmi-mode-valid-v2-0-a6478fd20fa6@linaro.org

Changes in v2:
- Switched drm_hdmi_connector_mode_valid() to use common helper
  (ex-hdmi_clock_valid()) (Maxime)
- Added simple unit tests for drm_hdmi_connector_mode_valid().
- Link to v1: https://lore.kernel.org/r/20241018-hdmi-mode-valid-v1-0-6e49ae4801f7@linaro.org

---
Dmitry Baryshkov (10):
      drm/tests: hdmi: handle empty modes in find_preferred_mode()
      drm/tests: hdmi: rename connector creation function
      drm/tests: hdmi: return meaningful value from set_connector_edid()
      drm/display: hdmi: add generic mode_valid helper
      drm/sun4i: use drm_hdmi_connector_mode_valid()
      drm/vc4: use drm_hdmi_connector_mode_valid()
      drm/display: bridge_connector: use drm_bridge_connector_mode_valid()
      drm/bridge: lontium-lt9611: drop TMDS char rate check in mode_valid
      drm/bridge: dw-hdmi-qp: replace mode_valid with tmds_char_rate
      drm/sun4i: use drm_atomic_helper_connector_hdmi_check()

 drivers/gpu/drm/bridge/lontium-lt9611.c            |   4 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c       |  12 +-
 drivers/gpu/drm/display/drm_bridge_connector.c     |  16 +-
 drivers/gpu/drm/display/drm_hdmi_state_helper.c    |  21 ++
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c             |  32 +--
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 269 +++++++++++++++++----
 drivers/gpu/drm/tests/drm_kunit_edid.h             | 102 ++++++++
 drivers/gpu/drm/vc4/vc4_hdmi.c                     |   5 +-
 include/drm/display/drm_hdmi_state_helper.h        |   4 +
 9 files changed, 371 insertions(+), 94 deletions(-)
---
base-commit: d80b5c5b9be6b2e1cdeaaeaa8259523b63cae292
change-id: 20241018-hdmi-mode-valid-aaec4428501c

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>



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

end of thread, other threads:[~2024-11-25  9:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22  9:12 [PATCH v4 00/10] drm/display: hdmi: add drm_hdmi_connector_mode_valid() Dmitry Baryshkov
2024-11-22  9:12 ` [PATCH v4 01/10] drm/tests: hdmi: handle empty modes in find_preferred_mode() Dmitry Baryshkov
2024-11-25  9:13   ` Maxime Ripard
2024-11-22  9:12 ` [PATCH v4 02/10] drm/tests: hdmi: rename connector creation function Dmitry Baryshkov
2024-11-25  9:15   ` Maxime Ripard
2024-11-22  9:12 ` [PATCH v4 03/10] drm/tests: hdmi: return meaningful value from set_connector_edid() Dmitry Baryshkov
2024-11-25  9:16   ` Maxime Ripard
2024-11-22  9:13 ` [PATCH v4 04/10] drm/display: hdmi: add generic mode_valid helper Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 05/10] drm/sun4i: use drm_hdmi_connector_mode_valid() Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 06/10] drm/vc4: " Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 07/10] drm/display: bridge_connector: use drm_bridge_connector_mode_valid() Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 08/10] drm/bridge: lontium-lt9611: drop TMDS char rate check in mode_valid Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 09/10] drm/bridge: dw-hdmi-qp: replace mode_valid with tmds_char_rate Dmitry Baryshkov
2024-11-22  9:13 ` [PATCH v4 10/10] drm/sun4i: use drm_atomic_helper_connector_hdmi_check() Dmitry Baryshkov
2024-11-25  9:15   ` Maxime Ripard

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).