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 <[email protected]>
Cc: [email protected]
---
 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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to