From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Don't access snooped pages through the GTT (even for error capture) Date: Thu, 30 Jan 2014 17:02:09 +0100 Message-ID: <20140130160209.GW17001@phenom.ffwll.local> References: <1391092696-29574-1-git-send-email-chris@chris-wilson.co.uk> <1391092696-29574-2-git-send-email-chris@chris-wilson.co.uk> <20140130150809.GQ9454@intel.com> <20140130151108.GO29091@nuc-i3427.alporthouse.com> <20140130153210.GS9454@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by gabe.freedesktop.org (Postfix) with ESMTP id EF104100D68 for ; Thu, 30 Jan 2014 08:02:20 -0800 (PST) Received: by mail-lb0-f176.google.com with SMTP id w7so2677690lbi.35 for ; Thu, 30 Jan 2014 08:02:20 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140130153210.GS9454@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jan 30, 2014 at 05:32:10PM +0200, Ville Syrj=E4l=E4 wrote: > On Thu, Jan 30, 2014 at 03:11:08PM +0000, Chris Wilson wrote: > > On Thu, Jan 30, 2014 at 05:08:09PM +0200, Ville Syrj=E4l=E4 wrote: > > > On Thu, Jan 30, 2014 at 02:38:16PM +0000, Chris Wilson wrote: > > > > We want to use the GTT for reading back objects upon an error so th= at we > > > > have exactly the information that the GPU saw. However, it is verbo= ten > > > > to access snoopable pages through the GTT and causes my PineView GP= U to > > > > throw a page fault instead. > > > > = > > > > This has not been a problem in the past as we only dumped ringbuffe= rs > > > > and batchbuffers, both of which must be uncached. However, the > > > > introduction of HWS page dumping leads to a read of a snooped object > > > > through the GTT. This was introduced by > > > > = > > > > commit f3ce3821393e31a3f1a8ca6c24eb2d735a428445 > > > > Author: Chris Wilson > > > > Date: Thu Jan 23 22:40:36 2014 +0000 > > > > = > > > > drm/i915: Include HW status page in error capture > > > > = > > > > Signed-off-by: Chris Wilson > > > > --- > > > > drivers/gpu/drm/i915/i915_gpu_error.c | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > = > > > > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/dr= m/i915/i915_gpu_error.c > > > > index 6d5ab945132c..3b18c2dff3b8 100644 > > > > --- a/drivers/gpu/drm/i915/i915_gpu_error.c > > > > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c > > > > @@ -527,7 +527,8 @@ i915_error_object_create_sized(struct drm_i915_= private *dev_priv, > > > > goto unwind; > > > > = > > > > local_irq_save(flags); > > > > - if (reloc_offset < dev_priv->gtt.mappable_end && > > > > + if (src->cache_level =3D=3D I915_CACHE_NONE && > > > > + reloc_offset < dev_priv->gtt.mappable_end && > > > > src->has_global_gtt_mapping && > > > > i915_is_ggtt(vm)) { > > > > void __iomem *s; > > > = > > > So you don't want to make it (cache_level =3D=3D NONE || HAS_LLC)? > > = > > That llc is coherent between the physical pages and GTT is deep rooted > > in our code by now, and Ben is working hard to make sure we never take > > that path on llc anyway. Hence I let it go. > = > Fine by me. For the series: > = > Reviewed-by: Ville Syrj=E4l=E4 Both merge, with uncached rectified. Thanks, Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch