]> www.infradead.org Git - nvme.git/commitdiff
drm/i915/psr: HW will not allow PR on eDP when HDCP enabled
authorJouni Högander <jouni.hogander@intel.com>
Wed, 19 Jun 2024 06:21:26 +0000 (09:21 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Tue, 25 Jun 2024 05:28:43 +0000 (08:28 +0300)
Take into account in Panel Replay compute config that  HW will not allow PR
on eDP when HDCP enabled.

v2: add debug message to print out why Panel Replay is not possible

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-7-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_psr.c

index 8f8148afe8e882eaac726a68d42c7fd49f6b66c4..91c9b3f8b705ddeda647d07a3647174abfe189a9 100644 (file)
@@ -1523,6 +1523,9 @@ _panel_replay_compute_config(struct intel_dp *intel_dp,
                             const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+       struct intel_connector *connector =
+               to_intel_connector(conn_state->connector);
+       struct intel_hdcp *hdcp = &connector->hdcp;
 
        if (!CAN_PANEL_REPLAY(intel_dp))
                return false;
@@ -1544,6 +1547,17 @@ _panel_replay_compute_config(struct intel_dp *intel_dp,
                return false;
        }
 
+       /* HW will not allow Panel Replay on eDP when HDCP enabled */
+       if (conn_state->content_protection ==
+           DRM_MODE_CONTENT_PROTECTION_DESIRED ||
+           (conn_state->content_protection ==
+            DRM_MODE_CONTENT_PROTECTION_ENABLED && hdcp->value ==
+            DRM_MODE_CONTENT_PROTECTION_UNDESIRED)) {
+               drm_dbg_kms(&i915->drm,
+                           "Panel Replay is not supported with HDCP\n");
+               return false;
+       }
+
        return true;
 }