mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 22:50:54 -04:00
drm/i915/hdcp: Add more conditions to enable hdcp
When we dock a monitor we end up with a enable and disable connector cycle but if hdcp content is running we get the userspace in enabled state and driver maintaining a undesired state which causes the content to stop playing and we only enable hdcp if the userspace state in desired. This patch fixes that. --v2 -Move code to intel_hdcp [Jani] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231026121139.987437-4-suraj.kandpal@intel.com
This commit is contained in:
committed by
Ankit Nautiyal
parent
4f60f06a41
commit
3b9bbd7962
@@ -2409,9 +2409,19 @@ void intel_hdcp_enable(struct intel_atomic_state *state,
|
||||
const struct intel_crtc_state *crtc_state,
|
||||
const struct drm_connector_state *conn_state)
|
||||
{
|
||||
/* Enable hdcp if it's desired */
|
||||
struct intel_connector *connector =
|
||||
to_intel_connector(conn_state->connector);
|
||||
struct intel_hdcp *hdcp = &connector->hdcp;
|
||||
|
||||
/*
|
||||
* Enable hdcp if it's desired or if userspace is enabled and
|
||||
* driver set its state to undesired
|
||||
*/
|
||||
if (conn_state->content_protection ==
|
||||
DRM_MODE_CONTENT_PROTECTION_DESIRED)
|
||||
DRM_MODE_CONTENT_PROTECTION_DESIRED ||
|
||||
(conn_state->content_protection ==
|
||||
DRM_MODE_CONTENT_PROTECTION_ENABLED && hdcp->value ==
|
||||
DRM_MODE_CONTENT_PROTECTION_UNDESIRED))
|
||||
_intel_hdcp_enable(state, encoder, crtc_state, conn_state);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user