Thanks for the review.

You are right: the cached Type1 capability is only valid for the current MST 
sink,
and it must not outlive a hotplug or topology change. I've updated the patch to
clear the cached value when a new MST connector is created and when it is torn
down, and to refresh it only for the active sink.

This keeps the atomic check AUX-free while avoiding stale results across MST
hotplug events.

HDCP Content Type 1 requires HDCP 2.x support from both the source and
the downstream MST sink. A request for a sink that supports HDCP 1.x but
cannot use HDCP 2.x currently passes atomic validation and fails later in
the HDCP enable path.

Use the refreshed per-sink capability to reject unsupported Type1 requests
with -EOPNOTSUPP in intel_hdcp_atomic_check(), and propagate the error through
the digital connector atomic check.

Signed-off-by: George D. Sworo <[email protected]>
---
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 7023619aaaba..da54699fb121 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1838,6 +1838,7 @@ mst_topology_add_connector(struct drm_dp_mst_topology_mgr 
*mgr,
        connector->sync_state = intel_dp_connector_sync_state;
        connector->mst.dp = intel_dp;
        connector->mst.port = port;
+       connector->mst.type1_unsupported = false;
        drm_dp_mst_get_port_malloc(port);
 
        ret = drm_connector_dynamic_init(display->drm, &connector->base, 
&mst_connector_funcs,
@@ -332,6 +332,19 @@ intel_hdcp_mst_type1_is_unsupported(struct intel_connector 
*connector,
        return hdcp_capable && (!hdcp->hdcp2_supported || !hdcp2_capable);
 }
 
+static void
+intel_hdcp_mst_update_type1_capability(struct intel_connector *connector,
+                                                      const struct 
intel_hdcp_shim *shim)
+{
+       connector->mst.type1_unsupported = false;
+
+       if (!shim || !shim->get_remote_hdcp_capability)
+               return;
+
+       connector->mst.type1_unsupported =
+               intel_hdcp_mst_type1_is_unsupported(connector, shim);
+}
+
 static bool intel_hdcp_in_use(struct intel_display *display,
                              enum transcoder cpu_transcoder, enum port port)
 {
@@ -2441,9 +2454,8 @@ int intel_hdcp_init(struct intel_connector *connector,
        if (is_hdcp2_supported(display))
                intel_hdcp2_init(connector, dig_port, shim);
 
-       /* Cache the remote capability before atomic checks can run. */
-       connector->mst.type1_unsupported =
-               intel_hdcp_mst_type1_is_unsupported(connector, shim);
+       /* Cache the capability for the currently attached MST sink only. */
+       intel_hdcp_mst_update_type1_capability(connector, shim);
 
        ret = drm_connector_attach_content_protection_property(&connector->base,
                                                                                
           hdcp->hdcp2_supported);
@@ -2676,6 +2688,8 @@ void intel_hdcp_cleanup(struct intel_connector *connector)
 {
        struct intel_hdcp *hdcp = &connector->hdcp;
 
+       connector->mst.type1_unsupported = false;
+
        if (!hdcp->shim)
                return;

Reply via email to