[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241109-hdmi-mode-valid-v3-0-5348c2368076@linaro.org>
Date: Sat, 09 Nov 2024 14:35:04 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
MaĆra Canal <mcanal@...lia.com>,
Raspberry Pi Kernel Maintenance <kernel-list@...pberrypi.com>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: [PATCH v3 0/7] 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.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.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 (7):
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 | 181 ++++++++++++++++++++-
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +-
include/drm/display/drm_hdmi_state_helper.h | 4 +
8 files changed, 228 insertions(+), 46 deletions(-)
---
base-commit: 929beafbe7acce3267c06115e13e03ff6e50548a
change-id: 20241018-hdmi-mode-valid-aaec4428501c
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Powered by blists - more mailing lists