[Intel-xe] [PATCH 1/2] Revert "FIXME: drm/i915/crtc: use irqsave for locking event_lock"

Rodrigo Vivi rodrigo.vivi at intel.com
Thu Oct 12 18:59:42 UTC 2023


On Tue, Sep 19, 2023 at 12:47:36PM +0300, Luca Coelho wrote:
> This reverts commit 0aff77c2fbd20da430763bdb25db5eaa6245650a.
> 
> The interrupts are already disabled at this point, so there's no need
> to use _irqsave()/_irqrestore() in this context.  Most other callers
> of the drm_crtc_arm_vblank_event(), outside the i915 driver, call it
> immediately after locking the spinlock with _irqsave(), or at least
> _irq(), and that may be the reason why this was added unnecessarily
> here.
> 
> Signed-off-by: Luca Coelho <luciano.coelho at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_crtc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
> index 23bb3bb9c7db..182c6dd64f47 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -670,15 +670,13 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
>  					 drm_crtc_accurate_vblank_count(&crtc->base) + 1,
>  					 false);
>  	} else if (new_crtc_state->uapi.event) {
> -		unsigned long flags;
> -
>  		drm_WARN_ON(&dev_priv->drm,
>  			    drm_crtc_vblank_get(&crtc->base) != 0);
>  
> -		spin_lock_irqsave(&crtc->base.dev->event_lock, flags);
> +		spin_lock(&crtc->base.dev->event_lock);
>  		drm_crtc_arm_vblank_event(&crtc->base,
>  					  new_crtc_state->uapi.event);
> -		spin_unlock_irqrestore(&crtc->base.dev->event_lock, flags);
> +		spin_unlock(&crtc->base.dev->event_lock);
>  
>  		new_crtc_state->uapi.event = NULL;
>  	}
> -- 
> 2.39.2
> 


More information about the Intel-xe mailing list