Add DRM_BRIDGE_OP_HDMI_SCRAMBLER bridge operation flag and the
corresponding .hdmi_scrambler_{enable|disable}() bridge funcs callbacks.

Bridge drivers set DRM_BRIDGE_OP_HDMI_SCRAMBLER to advertise that they
implement source-side scrambling control, which the bridge connector
layer uses to wire up the connector's scrambler callbacks.

Signed-off-by: Cristian Ciocaltea <[email protected]>
---
 include/drm/drm_bridge.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 4ba3a5deef9a..a0fcbbc7086e 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -667,6 +667,26 @@ struct drm_bridge_funcs {
                                     const struct drm_display_mode *mode,
                                     unsigned long long tmds_rate);
 
+       /**
+        * @hdmi_scrambler_enable:
+        *
+        * Enable HDMI 2.0 SCDC scrambling and high TMDS clock ratio.
+        *
+        * This callback is optional but it must be implemented by bridges that
+        * set the DRM_BRIDGE_OP_HDMI_SCRAMBLER flag in their &drm_bridge->ops.
+        */
+       int (*hdmi_scrambler_enable)(struct drm_bridge *bridge);
+
+       /**
+        * @hdmi_scrambler_disable:
+        *
+        * Disable HDMI 2.0 SCDC scrambling and high TMDS clock ratio.
+        *
+        * This callback is optional but it must be implemented by bridges that
+        * set the DRM_BRIDGE_OP_HDMI_SCRAMBLER flag in their &drm_bridge->ops.
+        */
+       int (*hdmi_scrambler_disable)(struct drm_bridge *bridge);
+
        /**
         * @hdmi_clear_avi_infoframe:
         *
@@ -1092,6 +1112,12 @@ enum drm_bridge_ops {
         * &drm_bridge_funcs->hdmi_clear_spd_infoframe callbacks.
         */
        DRM_BRIDGE_OP_HDMI_SPD_INFOFRAME = BIT(10),
+       /**
+        * @DRM_BRIDGE_OP_HDMI_SCRAMBLER: The bridge supports
+        * &drm_bridge_funcs->hdmi_scrambler_enable and
+        * &drm_bridge_funcs->hdmi_scrambler_disable callbacks.
+        */
+       DRM_BRIDGE_OP_HDMI_SCRAMBLER = BIT(11),
 };
 
 /**

-- 
2.53.0

Reply via email to