All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/fbc: Remember to update FBC state even when not reallocating CFB
Date: Thu, 23 Dec 2021 07:15:37 +0000	[thread overview]
Message-ID: <4c1528eafb6444688b18307376d80d37@intel.com> (raw)
In-Reply-To: <20211216110822.8461-1-ville.syrjala@linux.intel.com>

> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Thursday, December 16, 2021 1:08 PM
> To: intel-gfx@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@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@linux.intel.com>

Reviewed-by: Mika Kahola <mika.kahola@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


      parent reply	other threads:[~2021-12-23  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 11:08 [Intel-gfx] [PATCH] drm/i915/fbc: Remember to update FBC state even when not reallocating CFB Ville Syrjala
2021-12-16 16:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-16 18:28 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-12-23  7:15 ` Kahola, Mika [this message]

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=4c1528eafb6444688b18307376d80d37@intel.com \
    --to=mika.kahola@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.