[Intel-gfx] [PATCH] drm/i915/fbc: Remember to update FBC state even when not reallocating CFB

Kahola, Mika mika.kahola at intel.com
Thu Dec 23 07:15:37 UTC 2021


> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Thursday, December 16, 2021 1:08 PM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH] drm/i915/fbc: Remember to update FBC state even
> when not reallocating CFB
> 
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> We mustn't forget to update our FBC state even if we don't have to reallocate
> the CFB. Otherwise we won't refresh our notion of what eg. the new fence or
> the new override CFB stride should be. Using the wrong CFB stride in particular
> can cause underruns and could even corrupt other stuff in stolen.
> 
> Fixes: f4cfdbb02ca8 ("drm/i915/fbc: Nuke state_cache")
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4774
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 987ea4c4b5d0..465dc4e97ea8 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1408,8 +1408,10 @@ static void __intel_fbc_enable(struct
> intel_atomic_state *state,
>  		if (fbc->state.plane != plane)
>  			return;
> 
> -		if (intel_fbc_is_ok(plane_state))
> +		if (intel_fbc_is_ok(plane_state)) {
> +			intel_fbc_update_state(state, crtc, plane);
>  			return;
> +		}
> 
>  		__intel_fbc_disable(fbc);
>  	}
> --
> 2.32.0



More information about the Intel-gfx mailing list