[Intel-gfx] [PATCH 1/1] drm/i915/hdcp: restore hdcp state same as previous
Ramalingam C
ramalingam.c at intel.com
Fri Jan 3 13:34:23 UTC 2020
On 2020-01-03 at 18:30:21 +0530, Anshuman Gupta wrote:
> When port is disabled due to modeset or DPMS off actually
> it disables the HDCP encryption keeping its state to
> CP_ENABLED this doesn't enable HDCP again while port
> gets enable again. HDCP state should set accordingly
> when port is disabled.
>
> CC: Ramalingam C <ramalingam.c at intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_ddi.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 07acd0daca25..b1b79073e3f9 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4137,7 +4137,14 @@ static void intel_disable_ddi(struct intel_encoder *encoder,
> const struct intel_crtc_state *old_crtc_state,
> const struct drm_connector_state *old_conn_state)
> {
> - intel_hdcp_disable(to_intel_connector(old_conn_state->connector));
> + int ret;
> +
> + ret = intel_hdcp_disable(to_intel_connector(old_conn_state->connector));
> +
> + if (old_conn_state->content_protection ==
> + DRM_MODE_CONTENT_PROTECTION_ENABLED && !ret)
while relooking at it, locking is missing.
mutex_lock(&hdcp->mutex);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work);
mutex_unlock(&hdcp->mutex);
-Ram
> + drm_hdcp_update_content_protection(old_conn_state->connector,
> + DRM_MODE_CONTENT_PROTECTION_DESIRED);
>
> if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
> intel_disable_ddi_hdmi(encoder, old_crtc_state, old_conn_state);
> --
> 2.24.0
>
More information about the Intel-gfx
mailing list