[Intel-gfx] [PATCH 4/8] drm/i915: Clear no_fbc_reason on activate

Jani Nikula jani.nikula at linux.intel.com
Wed Apr 21 13:48:20 UTC 2021


On Wed, 14 Apr 2021, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> We try to set no_fbc_reason when FBC is not possible, let's
> consistently clear when activating FBC.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 4968e79a6235..fb8c0872a2b7 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -411,6 +411,17 @@ bool intel_fbc_is_active(struct drm_i915_private *dev_priv)
>  	return dev_priv->fbc.active;
>  }
>  
> +static void intel_fbc_activate(struct drm_i915_private *dev_priv)
> +{
> +	struct intel_fbc *fbc = &dev_priv->fbc;
> +
> +	drm_WARN_ON(&dev_priv->drm, !mutex_is_locked(&fbc->lock));
> +
> +	intel_fbc_hw_activate(dev_priv);
> +
> +	fbc->no_fbc_reason = NULL;
> +}
> +
>  static void intel_fbc_deactivate(struct drm_i915_private *dev_priv,
>  				 const char *reason)
>  {
> @@ -1094,7 +1105,7 @@ static void __intel_fbc_post_update(struct intel_crtc *crtc)
>  		return;
>  
>  	if (!fbc->busy_bits)
> -		intel_fbc_hw_activate(dev_priv);
> +		intel_fbc_activate(dev_priv);
>  	else
>  		intel_fbc_deactivate(dev_priv, "frontbuffer write");
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list