[Intel-gfx] [PATCH 11/11] drm/i915: add HAS_ALIASING_PPGTT parameter for userspace
Daniel Vetter
daniel at ffwll.ch
Tue Dec 6 20:59:33 CET 2011
On Tue, Dec 06, 2011 at 06:31:14PM +0000, Chris Wilson wrote:
> On Tue, 6 Dec 2011 09:39:39 -0800, Ben Widawsky <ben at bwidawsk.net> wrote:
> > On Mon, Nov 28, 2011 at 10:24:55PM +0100, Daniel Vetter wrote:
> > > On Sanybridge a few MI read/write commands only work when ppgtt is
> > > enabled. Userspace therefore needs to be able to check whether ppgtt
> > > is enabled. For added hilarity, you need to reset the "use global GTT"
> > > bit on both snb/ivb when ppgtt is enabled, otherwise it won't work.
> > > Despite what bspec says about automatically using ppgtt ...
> > >
> > > Luckily PIPE_CONTROL (the only write cmd current userspace uses) is
> > > not affected by all this, as tested by tests/gem_pipe_control_store_loop.
> >
> > Since this is all SNB only, and we have no good benchmarks to show
> > performance gains, can we not just enable this for IVB+?
>
> Don't we have the same basic problem with IVB, that we need to adjust
> the commands in the batchbuffer depending on whether HAS_ALIASING_PPGTT
> is true? Or do you mean that we should just assume that IVB uses the
> ppgtt and so kernel 3.3+, which will be around March...
Clarified this a bit with Ben on irc: We need to change the MI_STORE/LOAD
commands on both snb and ivb depending upon whether ppgtt is enabled or
not. Luckily no current userspace needs this (otherwise it'd be an obvious
no-go), but might come in handy for certain features - currently only a
bunch of crazy i-g-t tests that hammer the cpu with gpu interrupts from
different rings and try to test whether that works correctly.
Another story is PIPE_CONTROL where ppgtt is transparent like for all
other render commands (i.e. hw transparently switches to ppgtt access if
the buffer is marked non-secure), safe for the fact that we need the w/a
in place for snb.
I think ppgtt also makes sense on snb (even though there's not much
speedup to be had there):
- it's what the windows driver uses
- it seems to improve stability for the vt-d+semaphore issues (not
everywhere though).
-Daniel
--
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx
mailing list