From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755149AbbHFQwR (ORCPT ); Thu, 6 Aug 2015 12:52:17 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48656 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754114AbbHFQwQ (ORCPT ); Thu, 6 Aug 2015 12:52:16 -0400 Message-ID: <1438879929.12629.12.camel@fourier> Subject: Re: [PATCH 3.19.y-ckt 027/107] drm/i915: Declare the swizzling unknown for L-shaped configurations From: Kamal Mostafa To: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, kernel-team@lists.ubuntu.com, Chris Wilson , Daniel Vetter Date: Thu, 06 Aug 2015 09:52:09 -0700 In-Reply-To: <1438811379-384-28-git-send-email-kamal@canonical.com> References: <1438811379-384-1-git-send-email-kamal@canonical.com> <1438811379-384-28-git-send-email-kamal@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-08-05 at 14:48 -0700, Kamal Mostafa wrote: > 3.19.8-ckt5 -stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Chris Wilson > > commit 19ee835cdb0b5a8eb11a68f25a51b8039d564488 upstream. > > The old style of memory interleaving swizzled upto the end of the > first even bank of memory, I notice now that this commit was been reverted and replaced. I'll drop this from 3.19-stable and use the replacement 5eb3e5a instead. 5eb3e5a drm/i915: Declare the swizzling unknown for L-shaped configurations d82c0ba Revert "drm/i915: Declare the swizzling unknown for L-shaped configurations" 19ee835 drm/i915: Declare the swizzling unknown for L-shaped configurations -Kamal > 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 objects. > > v2: Mark the global swizzling as unknown rather than adjust the value > reported to userspace. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91105 > Signed-off-by: Chris Wilson > Cc: Daniel Vetter > Signed-off-by: Daniel Vetter > Signed-off-by: Kamal Mostafa > --- > drivers/gpu/drm/i915/i915_gem_tiling.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c > index ffe9072..8ce8c5e 100644 > --- a/drivers/gpu/drm/i915/i915_gem_tiling.c > +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c > @@ -183,8 +183,18 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev) > if (IS_GEN4(dev)) { > uint32_t ddc2 = I915_READ(DCC2); > > - if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE)) > + if (!(ddc2 & DCC2_MODIFIED_ENHANCED_DISABLE)) { > + /* Since the swizzling may vary within an > + * object, we have no idea what the swizzling > + * is for any page in particular. Thus we > + * cannot migrate tiled pages using the GPU, > + * nor can we tell userspace what the exact > + * swizzling is for any object. > + */ > dev_priv->quirks |= QUIRK_PIN_SWIZZLED_PAGES; > + swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN; > + swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN; > + } > } > > if (dcc == 0xffffffff) {