From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 11/11] drm/i915: add HAS_ALIASING_PPGTT parameter for userspace Date: Tue, 6 Dec 2011 20:59:33 +0100 Message-ID: References: <1322515495-13049-1-git-send-email-daniel.vetter@ffwll.ch> <1322515495-13049-4-git-send-email-daniel.vetter@ffwll.ch> <20111206173938.GA32563@bolo_yeung.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-vx0-f177.google.com (mail-vx0-f177.google.com [209.85.220.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B2C2A0972 for ; Tue, 6 Dec 2011 11:59:34 -0800 (PST) Received: by vcbfl10 with SMTP id fl10so6677704vcb.36 for ; Tue, 06 Dec 2011 11:59:34 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: Daniel Vetter , Ben Widawsky , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Dec 06, 2011 at 06:31:14PM +0000, Chris Wilson wrote: > On Tue, 6 Dec 2011 09:39:39 -0800, Ben Widawsky 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@ffwll.ch Mobile: +41 (0)79 365 57 48