drm/i915: Only disable HDCP when it's active
Subsystems (2)
PATCH 1/1 drm/i915: Only disable HDCP when it's active
Instead of always trying to disable HDCP. Only run hdcp_disable when the state is not UNDESIRED. This will catch cases where it's enabled and also cases where enable failed and the state is left in DESIRED mode.
Note that things won't blow up if disable is attempted while already disabled, it's just bad form.
--- drivers/gpu/drm/i915/intel_hdcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_hdcp.c +5 -3
@@ -616,15 +616,17 @@ int intel_hdcp_enable(struct intel_connector *connector)int intel_hdcp_disable (struct intel_connector *connector) { -int ret; +int ret =0 ;if (!connector->hdcp_shim)return -ENOENT ;mutex_lock (&connector->hdcp_mutex); - connector->hdcp_value =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; - ret =_intel_hdcp_disable (connector); +if (connector->hdcp_value !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ) { + connector->hdcp_value =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; + ret =_intel_hdcp_disable (connector); + }mutex_unlock (&connector->hdcp_mutex);cancel_delayed_work_sync (&connector->hdcp_check_work);
Signature · 6 lines
2.15.1.620.gb9897f4670-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Only disable HDCP when it's active
== Series Details ==
== Series Details ==
Series: drm/i915: Only disable HDCP when it's active
URL : https://patchwork.freedesktop.org/series/36212/
State : failure
== Summary ==
Applying: drm/i915: Only disable HDCP when it's active Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/intel_hdcp.c
Falling back to patching base and 3-way merge... No changes -- Patch already applied.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx