From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com ([74.125.82.46]:35978 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbbKRQqm (ORCPT ); Wed, 18 Nov 2015 11:46:42 -0500 Received: by wmww144 with SMTP id w144so205247696wmw.1 for ; Wed, 18 Nov 2015 08:46:41 -0800 (PST) Date: Wed, 18 Nov 2015 17:46:38 +0100 From: Daniel Vetter To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Matti =?iso-8859-1?Q?H=E4m=E4l=E4inen?= , stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Mark uneven memory banks on gen4 desktop as unknown swizzling Message-ID: <20151118164638.GJ20799@phenom.ffwll.local> References: <1447756852-15183-1-git-send-email-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1447756852-15183-1-git-send-email-chris@chris-wilson.co.uk> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Nov 17, 2015 at 10:40:51AM +0000, Chris Wilson wrote: > We have varied reports of swizzling corruption on gen4 desktop, and > confirmation that it is triggered by uneven memory banks. The > implication is that the swizzling various between the paired channels > and the remainder of memory on the single channel. As the object then > has unpredictable swizzling (it will vary depending on exact page > allocation and may even change during the object's lifetime as the pages > are replaced), we have to report to userspace that the swizzling is > unknown. > > Reported-by: Matti H�m�l�inen > References: https://bugs.freedesktop.org/show_bug.cgi?id=90725 > Signed-off-by: Chris Wilson > Cc: Matti H�m�l�inen > Cc: stable@vger.kernel.org > --- > drivers/gpu/drm/i915/i915_gem_fence.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_fence.c b/drivers/gpu/drm/i915/i915_gem_fence.c > index 40a10b25956c..6ba68083aa95 100644 > --- a/drivers/gpu/drm/i915/i915_gem_fence.c > +++ b/drivers/gpu/drm/i915/i915_gem_fence.c > @@ -677,8 +677,8 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev) > * the minimum size of a rank. > */ > if (I915_READ16(C0DRB3) != I915_READ16(C1DRB3)) { > - swizzle_x = I915_BIT_6_SWIZZLE_NONE; > - swizzle_y = I915_BIT_6_SWIZZLE_NONE; > + swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN; > + swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN; Existing userspace goes boom if we hand it _UNKNOWN as the swizzle type. We need the same lie as with L-shaped on g4x and only set the quirk, so that phys_swizzle_mode is _UNKOWN. See commit 5eb3e5a5e11d14f9deb2a4b83555443b69ab9940 Author: Chris Wilson Date: Sun Jun 28 09:19:26 2015 +0100 drm/i915: Declare the swizzling unknown for L-shaped configurations So if you keep the swizzle put add the dev_priv->quirks |= QUIRK_PIN_SWIZZLED_PAGES; here instead (and drop patch 2) this looks good and gets my r-b. But please include a reference to the above commit so we don't forget all this. -Daniel > } else { > swizzle_x = I915_BIT_6_SWIZZLE_9_10; > swizzle_y = I915_BIT_6_SWIZZLE_9; > -- > 2.6.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch