From: Ben Widawsky <benjamin.widawsky@intel.com>
To: "Chris Wilson" <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH v4 06/10] drm/i915: Implement LRI based FBC tracking
Date: Thu, 21 Nov 2013 20:20:29 -0800 [thread overview]
Message-ID: <20131122042029.GB1585@intel.com> (raw)
In-Reply-To: <20131121163943.GJ9515@nuc-i3427.alporthouse.com>
On Thu, Nov 21, 2013 at 04:39:43PM +0000, Chris Wilson wrote:
> On Thu, Nov 21, 2013 at 06:33:21PM +0200, Ville Syrjälä wrote:
> > On Thu, Nov 21, 2013 at 11:49:47AM +0000, Chris Wilson wrote:
> > > On Thu, Nov 21, 2013 at 01:14:10PM +0200, ville.syrjala@linux.intel.com wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > As per the SNB and HSW PM guides, we should enable FBC render/blitter
> > > > tracking only during batches targetting the front buffer.
> > > >
> > > > On SNB we must also update the FBC render tracking address whenever it
> > > > changes. And since the register in question is stored in the context,
> > > > we need to make sure we reload it with correct data after context
> > > > switches.
> > > >
> > > > On IVB/HSW we use the render nuke mechanism, so no render tracking
> > > > address updates are needed. Hoever on the blitter side we need to
> > > > enable the blitter tracking like on SNB, and in addition we need
> > > > to issue the cache clean messages, which we already did.
> > > >
> > > > v2: Introduce intel_fb_obj_has_fbc()
> > > > Fix crtc locking around crtc->fb access
> > > > Drop a hunk that was included by accident in v1
> > > > Set fbc_address_dirty=false not true after emitting the LRI
> > > > v3: Now that fbc hangs on to the fb intel_fb_obj_has_fbc() doesn't
> > > > need to upset lockdep anymore
> > > > v4: Use |= instead of = to update fbc_address_dirty
> > >
> > > Ah, should we do the same for fbc_dirty? In the past we could dispatch a
> > > batchbuffer but fail to add the request (and so fail to flush the
> > > rendering/fbc). We currently preallocate the request so that failure
> > > path is history, but we will more than likely be caught out again in the
> > > future.
> >
> > I guess we could do it for fbc_dirty as well, but I don't think that
> > should actually change anything. Either we're rendering to the FBC
> > scanout buffer, or we're not.
>
> The scenario I worry about here is the missing flush after the
> rendering. It has been possible for us to lose it (under memory
> pressure, other constaints etc) and to issue a catch-up flush on the
> next batch. Without the or, we'd lose the FBC flush. It is just a
> potential issue for the future.
>
> > I did start pondering if I should actually move the fbc_address to live
> > under the context once that's where it actually belongs. If we'd track
> > it per-context we might be able to avoid emitting the LRI for every
> > context switch.
> >
> > >
> > > Like pc8, I'd like for a device (or crtc if you must) property whether
> > > or not indirect rendering is preferred.
> > >
> > > Other than that and the bikeshed to kill the redundant fbc_obj local
> > > variable and pack the dirty bits, it looks good to me.
> >
> > Actually I just fired it up for real on SNB and it failed. The problem
> > is that we end up doing the invalidate before the context switch. So
> > we've not yet forced fbc_address_dirty=true due to the context switch
> > when we do the invalidate. The most straightforward fix would be to
> > simply move i915_gem_execbuffer_move_to_gpu() to be called after
> > i915_switch_context(). I did that on my machine and now it passes my
> > context related FBC tests. But I do wonder if the order of these
> > operations was chose for a reason, and whether the reordering might
> > cause other problems.
>
> Ben, opinion on whether the ordering was just convenience?
> -Chris
If it was anything but convenience, I've long since forgotten. I guess
as long as we do it in two patches we can always bisect, and it's all
good.
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-22 4:20 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 21:02 [PATCH 00/10] drm/i915: FBC fixes v2 ville.syrjala
2013-11-06 21:02 ` [PATCH 01/10] drm/i915: Grab struct_mutex around all FBC updates ville.syrjala
2013-11-20 22:39 ` Rodrigo Vivi
2013-11-21 8:22 ` Daniel Vetter
2013-11-21 10:49 ` Ville Syrjälä
2013-11-21 11:08 ` [PATCH v2 " ville.syrjala
2013-11-06 21:02 ` [PATCH 02/10] drm/i915: Have FBC keep references to the fb ville.syrjala
2013-11-21 11:09 ` [PATCH v2 " ville.syrjala
2013-11-06 21:02 ` [PATCH 03/10] drm/i915: Grab crtc->mutex in intel_fbc_work_fn() ville.syrjala
2013-11-06 21:02 ` [PATCH 04/10] drm/i915: Limit FBC flush to post batch flush ville.syrjala
2013-11-20 22:48 ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH 05/10] drm/i915: Emit SRM after the MSG_FBC_REND_STATE LRI ville.syrjala
2013-11-20 22:50 ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v3 06/10] drm/i915: Implement LRI based FBC tracking ville.syrjala
2013-11-20 22:55 ` Rodrigo Vivi
2013-11-20 23:17 ` Chris Wilson
2013-11-20 23:46 ` Rodrigo Vivi
2013-11-21 11:14 ` [PATCH v4 " ville.syrjala
2013-11-21 11:49 ` Chris Wilson
2013-11-21 16:33 ` Ville Syrjälä
2013-11-21 16:39 ` Chris Wilson
2013-11-22 4:20 ` Ben Widawsky [this message]
2013-11-27 15:22 ` [PATCH v5 " ville.syrjala
2013-11-28 11:29 ` Chris Wilson
2013-11-20 23:53 ` [PATCH v3 " Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v2 07/10] drm/i915: Kill sandybridge_blit_fbc_update() ville.syrjala
2013-11-20 22:56 ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v2 08/10] drm/i915: Don't write ILK/IVB_FBC_RT_BASE directly ville.syrjala
2013-11-20 22:57 ` Rodrigo Vivi
2013-11-27 15:24 ` [PATCH v3 08/10] drm/i915: Don't write IVB_FBC_RT_BASE ville.syrjala
2013-11-28 11:30 ` Chris Wilson
2013-11-06 21:02 ` [PATCH 09/10] drm/i915: Set has_fbc=true for all SNB+, except VLV ville.syrjala
2013-11-20 23:00 ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH 10/10] drm/i915: Use plane_name() in gen7_enable_fbc() ville.syrjala
2013-11-20 23:01 ` Rodrigo Vivi
2013-11-21 8:08 ` Daniel Vetter
2013-11-21 9:57 ` Chris Wilson
2013-11-21 10:55 ` Ville Syrjälä
2013-11-21 9:03 ` [PATCH 00/10] drm/i915: FBC fixes v2 Rodrigo Vivi
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=20131122042029.GB1585@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=chris@chris-wilson.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox