summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>2026-09-01 21:50:34 +0300
committerCristian Ciocaltea <cristian.ciocaltea@collabora.com>2026-09-19 23:03:44 +0300
commitd653818324edc79d8dd55f77496220d3849910d0 (patch)
treec5a6c38498d43f6257003906be1746a1ec5a6d35 /include/drm
parentf57c2198380fcf475404c159c784d0ee70fa091b (diff)
downloadlinux-next-d653818324edc79d8dd55f77496220d3849910d0.tar.gz
linux-next-d653818324edc79d8dd55f77496220d3849910d0.zip
drm/display: hdmi: Add HDMI 2.0 scrambling management helpers
Add helpers to manage the full lifecycle of HDMI 2.0 SCDC scrambling on both source and sink sides: - drm_hdmi_mode_needs_scrambling(): checks whether a mode, bits per component and output format combination requires scrambling, which is needed when the resulting TMDS character rate exceeds the HDMI 1.3 maximum of 340 MHz - drm_connector_hdmi_enable_scrambling(): configures SCDC scrambling and high TMDS clock ratio and starts a periodic work item that monitors the sink's SCDC scrambling status, retrying setup when the sink loses state - drm_connector_hdmi_disable_scrambling(): tears down scrambling on both sides and cancels the monitoring work - drm_connector_hdmi_sync_scdc(): triggers a CRTC reset on reconnection to restore SCDC state lost during sink disconnects within an active display pipeline Tested-by: Maud Spierings <maud_spierings@hotmail.com> Tested-by: Diederik de Haas <diederik@cknow-tech.com> # NanoPC-T6 LTS, Rock 5B Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Igor Paunovic <royalnet026@gmail.com> # RK3588 Orange Pi 5 Plus, dual HDMI Tested-by: Robin Räber <robin.raebi@gmail.com> Link: https://patch.msgid.link/20260901-dw-hdmi-qp-scramb-v11-10-bc12954a0688@collabora.com Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/display/drm_hdmi_helper.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h
index 9c31ed90516b..2cdd6e3bc090 100644
--- a/include/drm/display/drm_hdmi_helper.h
+++ b/include/drm/display/drm_hdmi_helper.h
@@ -8,6 +8,7 @@
struct drm_connector;
struct drm_connector_state;
struct drm_display_mode;
+struct drm_modeset_acquire_ctx;
enum drm_output_color_format;
void
@@ -35,4 +36,18 @@ drm_hdmi_acr_get_n_cts(unsigned long long tmds_char_rate,
unsigned int *out_n,
unsigned int *out_cts);
+bool
+drm_hdmi_mode_needs_scrambling(const struct drm_display_mode *mode,
+ unsigned int bpc, enum drm_output_color_format fmt);
+
+int
+drm_connector_hdmi_enable_scrambling(struct drm_connector *connector,
+ const struct drm_connector_state *conn_state);
+int
+drm_connector_hdmi_disable_scrambling(struct drm_connector *connector);
+
+int
+drm_connector_hdmi_sync_scdc(struct drm_connector *connector, bool plugged,
+ struct drm_modeset_acquire_ctx *ctx);
+
#endif