Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>, stable@vger.kernel.org
Subject: [PATCH 2/2] drm/i915: Pin unknown swizzle pages
Date: Tue, 17 Nov 2015 10:40:52 +0000	[thread overview]
Message-ID: <1447756852-15183-2-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1447756852-15183-1-git-send-email-chris@chris-wilson.co.uk>

Another oddity associated with gen4 desktop is that some machines
experience swizzling corruption across swapping. Typically this would
imply that those machines have bit17 swizzling (where the swizzle
depends upon the physical address of the page). Play it safe and apply
the bit17 quirk to keep unknown swizzle pages pinned.

References: https://bugs.freedesktop.org/show_bug.cgi?id=90725
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/i915_gem_fence.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_fence.c b/drivers/gpu/drm/i915/i915_gem_fence.c
index 6ba68083aa95..b5ae97c3d3b2 100644
--- a/drivers/gpu/drm/i915/i915_gem_fence.c
+++ b/drivers/gpu/drm/i915/i915_gem_fence.c
@@ -687,6 +687,10 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
 
 	dev_priv->mm.bit_6_swizzle_x = swizzle_x;
 	dev_priv->mm.bit_6_swizzle_y = swizzle_y;
+
+	if (swizzle_x == I915_BIT_6_SWIZZLE_UNKNOWN ||
+	    swizzle_y == I915_BIT_6_SWIZZLE_UNKNOWN)
+		dev_priv->quirks |= QUIRK_PIN_SWIZZLED_PAGES;
 }
 
 /*
-- 
2.6.2


  reply	other threads:[~2015-11-17 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 10:40 [PATCH 1/2] drm/i915: Mark uneven memory banks on gen4 desktop as unknown swizzling Chris Wilson
2015-11-17 10:40 ` Chris Wilson [this message]
2015-11-17 10:51 ` Chris Wilson
2015-11-18 10:05 ` Chris Wilson
2015-11-18 16:46 ` [Intel-gfx] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447756852-15183-2-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox