From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/5] drm/i915: implement SNB workaround for lazy global gtt Date: Thu, 16 Feb 2012 00:25:42 +0100 Message-ID: <20120215232542.GF26578@phenom.ffwll.local> References: <1329346225-14795-1-git-send-email-daniel.vetter@ffwll.ch> <1329346225-14795-4-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 059319E7FE for ; Wed, 15 Feb 2012 15:25:26 -0800 (PST) Received: by wera10 with SMTP id a10so1232212wer.36 for ; Wed, 15 Feb 2012 15:25:26 -0800 (PST) Content-Disposition: inline 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 , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Feb 15, 2012 at 11:10:08PM +0000, Chris Wilson wrote: > On Wed, 15 Feb 2012 23:50:23 +0100, Daniel Vetter wrote: > > + /* Sandybridge PPGTT errata: We need a global gtt mapping for MI and > > + * pipe_control writes because the gpu doesn't properly redirect them > > + * through the ppgtt for non_secure batchbuffers. */ > > + if (unlikely(IS_GEN6(dev) && > > + reloc->write_domain == I915_GEM_DOMAIN_INSTRUCTION && > > + !target_i915_obj->has_global_gtt_mapping)) { > > + i915_gem_gtt_bind_object(target_i915_obj, > > + target_i915_obj->cache_level); > > + target_i915_obj->has_global_gtt_mapping = 1; > > i915_gem_gtt_bind_object() sets has_global_gtt_mapping, so no need to > repeat ourselves here. Indeed, that's superflous. I'll kill this line when applying it (the machine with the patches is already down and I'm a lazy bastard ...). > I guess that was the easy one you throw in to make sure people are > reading your patches? > > A little uneasy still with that heuristic, but I have to agree that it > is the lesser of the evils, meh. Luckily pipe_control writes on snb are extremely broken with ppgtt, so we should notice immediately if someone sets the wrong domain (as I did in the broken i-g-t test). > I'm pretty happy now with this series as I've been beating upon it ever > since it landed in danvet/my-next, so > Reviewed-and-tested-by: Chris Wilson Thanks, Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48