[Intel-gfx] [PATCH 15/15] drm/i915: Fix up PSR frontbuffer tracking

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 17 09:02:27 CEST 2014


On Mon, Jun 16, 2014 at 07:51:35PM +0200, Daniel Vetter wrote:
>  static void intel_edp_psr_work(struct work_struct *work)
>  {
>  	struct drm_i915_private *dev_priv =
>  		container_of(work, typeof(*dev_priv), psr.work.work);
> -	struct drm_device *dev = dev_priv->dev;
>  	struct intel_dp *intel_dp = dev_priv->psr.enabled;
>  
> -	drm_modeset_lock_all(dev);
> -	mutex_lock(&dev->struct_mutex);
>  	mutex_lock(&dev_priv->psr.lock);
>  	intel_dp = dev_priv->psr.enabled;
>  
>  	if (!intel_dp)
>  		goto unlock;
>  
> -	if (intel_edp_psr_match_conditions(intel_dp))
> -		intel_edp_psr_do_enable(intel_dp);
> +	if (dev_priv->psr.busy_frontbuffer_bits)
> +		goto unlock;

Hmm, I requeued the work item out of paranoia. But I think a comment
here about how invalidate *will* be called again if any of the
busy_frontbuffer_bits change and so the work will be requeued on the
next update.

> +
> +	intel_edp_psr_do_enable(intel_dp);
>  unlock:
>  	mutex_unlock(&dev_priv->psr.lock);
> -	mutex_unlock(&dev->struct_mutex);
> -	drm_modeset_unlock_all(dev);
>  }
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list