intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
To: "daniel@ffwll.ch" <daniel@ffwll.ch>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm/i915/fbc: update busy_bits even for GTT and flip flushes
Date: Tue, 22 Mar 2016 21:33:25 +0000	[thread overview]
Message-ID: <1458682404.2189.21.camel@intel.com> (raw)
In-Reply-To: <20160322111337.GZ28483@phenom.ffwll.local>

Em Ter, 2016-03-22 às 12:13 +0100, Daniel Vetter escreveu:
> On Mon, Mar 21, 2016 at 04:26:54PM -0300, Paulo Zanoni wrote:
> > 
> > We ignore ORIGIN_GTT because the hardware tracking can recognize
> > GTT
> > writes and take care of them. We also ignore ORIGIN_FLIP because we
> > deal with flips without relying on the frontbuffer tracking
> > infrastructure. On the other hand, a flush is a flush and means
> > we're
> > good to go, so we need to update busy_bits in order to reflect
> > that,
> > even if we're not going to do anything else about it.
> > 
> > How to reproduce the bug fixed by this patch:
> >  - boot SKL up to the desktop environment
> >  - stop the display manager
> >  - run any of the igt/kms_frontbuffer_tracking/*fbc*onoff* subtests
> >  - the tests will fail
> > 
> > The steps above will create the right conditions for us to lose
> > track
> > of busy_bits. If you, for example, run the full set of FBC tests,
> > the
> > onoff subtests will succeed.
> > 
> > Also notice that the "bug" is that we'll just keep FBC disabled on
> > cases where it could be enabled, so it's not something the users
> > can
> > perceive, it just affects power consumption numbers on properly
> > configured machines.
> > 
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Is this covered by your nasty igt test suite? Kernel side looks good,
> so
> with appropriate Testcase: tag added:

I mentioned the tests in the middle of the commit message, but forgot
the Testcase tags. I'll add them.

> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks!

> 
> > 
> > ---
> >  drivers/gpu/drm/i915/intel_fbc.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_fbc.c
> > b/drivers/gpu/drm/i915/intel_fbc.c
> > index 2e571f5..b8ba79c 100644
> > --- a/drivers/gpu/drm/i915/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/intel_fbc.c
> > @@ -996,13 +996,13 @@ void intel_fbc_flush(struct drm_i915_private
> > *dev_priv,
> >  	if (!fbc_supported(dev_priv))
> >  		return;
> >  
> > -	if (origin == ORIGIN_GTT || origin == ORIGIN_FLIP)
> > -		return;
> > -
> >  	mutex_lock(&fbc->lock);
> >  
> >  	fbc->busy_bits &= ~frontbuffer_bits;
> >  
> > +	if (origin == ORIGIN_GTT || origin == ORIGIN_FLIP)
> > +		goto out;
> > +
> >  	if (!fbc->busy_bits && fbc->enabled &&
> >  	    (frontbuffer_bits &
> > intel_fbc_get_frontbuffer_bit(fbc))) {
> >  		if (fbc->active)
> > @@ -1011,6 +1011,7 @@ void intel_fbc_flush(struct drm_i915_private
> > *dev_priv,
> >  			__intel_fbc_post_update(fbc->crtc);
> >  	}
> >  
> > +out:
> >  	mutex_unlock(&fbc->lock);
> >  }
> >  
> > -- 
> > 2.7.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-22 21:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 19:26 [PATCH 0/4] Enable FBC on SKL Paulo Zanoni
2016-03-21 19:26 ` [PATCH 1/4] drm/i915/fbc: update busy_bits even for GTT and flip flushes Paulo Zanoni
2016-03-22 11:13   ` Daniel Vetter
2016-03-22 21:33     ` Zanoni, Paulo R [this message]
2016-03-21 19:26 ` [RFC xf86-video-intel] sna: Call dirtyfb for all non-tear-free cases Paulo Zanoni
2016-03-22 11:31   ` Daniel Vetter
2016-03-22 11:36     ` Chris Wilson
2016-03-22 21:35     ` Zanoni, Paulo R
2016-03-23  8:50       ` Daniel Vetter
2016-03-23 13:16         ` Zanoni, Paulo R
2016-03-21 19:26 ` [PATCH 2/4] drm/i915/fbc: sanitize i915.enable_fbc during FBC init Paulo Zanoni
2016-03-21 19:26 ` [PATCH 3/4] drm/i915: opt-out CPU and WC mmaps from FBC Paulo Zanoni
2016-03-22  2:19   ` kbuild test robot
2016-03-22 10:28   ` Jani Nikula
2016-03-22 11:15     ` Daniel Vetter
2016-03-22 13:52       ` Jani Nikula
2016-03-22 11:29   ` Daniel Vetter
2016-03-22 21:48     ` Zanoni, Paulo R
2016-03-23  8:53       ` Daniel Vetter
2016-03-23 16:04         ` Vivi, Rodrigo
2016-03-21 19:26 ` [PATCH 4/4] drm/i915/fbc: enable FBC on SKL too Paulo Zanoni
2016-03-22 11:16   ` Daniel Vetter
2016-03-22 21:51     ` Zanoni, Paulo R
2016-03-23  8:55       ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2016-03-24 19:16 [PATCH 0/4] Enable FBC on SKL, v2 Paulo Zanoni
2016-03-24 19:16 ` [PATCH 1/4] drm/i915/fbc: update busy_bits even for GTT and flip flushes Paulo Zanoni
2016-04-04 21:17 [PATCH 0/4] Enable FBC on SKL, v3 Paulo Zanoni
2016-04-04 21:17 ` [PATCH 1/4] drm/i915/fbc: update busy_bits even for GTT and flip flushes Paulo Zanoni

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=1458682404.2189.21.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).