From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com ([74.125.82.54]:33708 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872AbbF2HFI (ORCPT ); Mon, 29 Jun 2015 03:05:08 -0400 Received: by wgck11 with SMTP id k11so132932461wgc.0 for ; Mon, 29 Jun 2015 00:05:07 -0700 (PDT) Date: Mon, 29 Jun 2015 09:07:25 +0200 From: Daniel Vetter To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Daniel Vetter , stable@vger.kernel.org Subject: Re: [PATCH] drm/i915: Declare the swizzling unknown for L-shaped configurations Message-ID: <20150629070725.GR30960@phenom.ffwll.local> References: <1435479566-25065-1-git-send-email-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435479566-25065-1-git-send-email-chris@chris-wilson.co.uk> Sender: stable-owner@vger.kernel.org List-ID: On Sun, Jun 28, 2015 at 09:19:26AM +0100, Chris Wilson wrote: > The old style of memory interleaving swizzled upto the end of the > first even bank of memory, and then used the remainder as unswizzled on > the unpaired bank - i.e. swizzling is not constant for all memory. This > causes problems when we try to migrate memory and so the kernel prevents > migration at all when we detect L-shaped inconsistent swizzling. > However, this issue also extends to userspace who try to manually detile > into memory as the swizzling for an individual page is unknown (it > depends on its physical address only known to the kernel), userspace > cannot correctly swizzle. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105 > Signed-off-by: Chris Wilson > Cc: Daniel Vetter > Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c > index d16585f788ea..ff96ae9b77bc 100644 > --- a/drivers/gpu/drm/i915/i915_gem_tiling.c > +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c > @@ -447,7 +447,10 @@ i915_gem_get_tiling(struct drm_device *dev, void *data, > } > > /* Hide bit 17 from the user -- see comment in i915_gem_set_tiling */ > - args->phys_swizzle_mode = args->swizzle_mode; > + if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES) > + args->phys_swizzle_mode = I915_BIT_6_SWIZZLE_UNKNOWN; > + else > + args->phys_swizzle_mode = args->swizzle_mode; > if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_17) > args->swizzle_mode = I915_BIT_6_SWIZZLE_9; > if (args->swizzle_mode == I915_BIT_6_SWIZZLE_9_10_17) > -- > 2.1.4 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch