public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
	seanpaul@chromium.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 3/6] drm/i915: Cancel the Link check before disable
Date: Mon, 29 Oct 2018 16:18:15 +0100	[thread overview]
Message-ID: <20181029151815.GD21967@phenom.ffwll.local> (raw)
In-Reply-To: <1540806351-7137-4-git-send-email-ramalingam.c@intel.com>

On Mon, Oct 29, 2018 at 03:15:48PM +0530, Ramalingam C wrote:
> To avoid the execution of link integrity check when the HDCP is
> already disabled, cancel the delayed work for link integrity check
> before disabling the HDCP.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>

This is racy. As an exercise, please lay out the scenario of what exactly
happens where. I'll drop this patch from the series.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_hdcp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index 1bf487f94254..d13e4af9ac05 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -821,6 +821,7 @@ int intel_hdcp_disable(struct intel_connector *connector)
>  	if (!hdcp->shim)
>  		return -ENOENT;
>  
> +	cancel_delayed_work_sync(&hdcp->check_work);
>  	mutex_lock(&hdcp->mutex);
>  
>  	if (hdcp->value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
> @@ -829,7 +830,6 @@ int intel_hdcp_disable(struct intel_connector *connector)
>  	}
>  
>  	mutex_unlock(&hdcp->mutex);
> -	cancel_delayed_work_sync(&hdcp->check_work);
>  	return ret;
>  }
>  
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-10-29 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29  9:45 [PATCH v2 0/6] Implement HDCP2.2: PART-I Ramalingam C
2018-10-29  9:45 ` [PATCH v2 1/6] drm/i915: wrapping all hdcp var into intel_hdcp Ramalingam C
2018-10-29  9:45 ` [PATCH v2 2/6] drm/i915: Reassigning log level for HDCP failures Ramalingam C
2018-10-29  9:45 ` [PATCH v2 3/6] drm/i915: Cancel the Link check before disable Ramalingam C
2018-10-29 15:18   ` Daniel Vetter [this message]
2018-10-29  9:45 ` [PATCH v2 4/6] drm: hdcp2.2 authentication msg definitions Ramalingam C
2018-10-29  9:45 ` [PATCH v2 5/6] drm: HDMI and DP specific HDCP2.2 defines Ramalingam C
2018-10-29  9:45 ` [PATCH v2 6/6] drm/i915: Define Intel HDCP2.2 registers Ramalingam C
2018-10-29 15:31   ` Daniel Vetter
2018-10-29 10:40 ` ✓ Fi.CI.BAT: success for Implement HDCP2.2: PART-I (rev2) Patchwork
2018-10-29 11:55 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-29 14:46   ` Martin Peres
2018-10-29 15:07     ` C, Ramalingam
2018-10-30 10:27 ` ✗ Fi.CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181029151815.GD21967@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ramalingam.c@intel.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox