Skip to content

drm/display: hdmi: add drm_hdmi_connector_mode_valid()

Dmitry Baryshkov dri-devel linux-arm-kernel linux-sunxi lkml 5 versions – Applied

Status from this message: Applied to drm-misc-next, thanks!

Get series with b4
b4 am [email protected] change-id 20241018-hdmi-mode-valid-aaec4428501c

Versions newest first

  1. v5 Latest10 patches 8 repliesApplied
  2. v410 patches 4 repliesSuperseded
  3. v37 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches8 repliesSuperseded
v16 patches3 repliesSuperseded

Changes in v5 from the cover letter

- Fixed alignment after renaming the connector creation funciton
(Maxime)
- Link to v4: https://lore.kernel.org/r/[email protected]

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/10drm/tests: hdmi: handle empty modes in find_preferred_mode()drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c+1 -11 reply
2/10drm/tests: hdmi: rename connector creation functiondrivers/gpu/drm/tests/drm_hdmi_state_helper_test.c+101 -1011 reply
3/10drm/tests: hdmi: return meaningful value from set_connector_edid()drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c+15 -161 reply
4/10drm/display: hdmi: add generic mode_valid helperdrivers/gpu/drm/display/drm_hdmi_state_helper.c drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c drivers/gpu/drm/tests/drm_kunit_edid.h +1 more+302 -52 replies
5/10drm/sun4i: use drm_hdmi_connector_mode_valid()drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c+1 -110 replies
6/10drm/vc4: use drm_hdmi_connector_mode_valid()drivers/gpu/drm/vc4/vc4_hdmi.c+2 -30 replies
7/10drm/display: bridge_connector: use drm_bridge_connector_mode_valid()drivers/gpu/drm/display/drm_bridge_connector.c+15 -11 reply
8/10drm/bridge: lontium-lt9611: drop TMDS char rate check in mode_validdrivers/gpu/drm/bridge/lontium-lt9611.c+1 -31 reply
9/10drm/bridge: dw-hdmi-qp: replace mode_valid with tmds_char_ratedrivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c+5 -70 replies
10/10drm/sun4i: use drm_atomic_helper_connector_hdmi_check()drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c+1 -190 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchMaxime RipardChen-Yu TsaiDave StevensonAngeloGioacchino Del Regno
1/10R-b R-b
2/10R-b R-b
3/10R-b R-b
4/10R-b R-b
5/10R-b
6/10R-b A-b
7/10R-b R-b R-b
8/10R-b R-b R-b
9/10R-b R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/10] drm/display: hdmi: add drm_hdmi_connector_mode_valid()

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.

---
Changes in v5:
- Fixed alignment after renaming the connector creation funciton
(Maxime)
- Link to v4: https://lore.kernel.org/r/[email protected]

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/[email protected]

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/[email protected]

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/[email protected]

---
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 | 409 +++++++++++++++------
 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, 441 insertions(+), 164 deletions(-)

---
base-commit: 44cff6c5b0b17a78bc0b30372bcd816cf6dd282a
change-id: 20241018-hdmi-mode-valid-aaec4428501c

Best regards,

Signature · 1 line
Dmitry Baryshkov <[email protected]>