summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_gem_tiling.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/linux-core/i915_gem_tiling.c b/linux-core/i915_gem_tiling.c
index d66276d6..ddf83ce4 100644
--- a/linux-core/i915_gem_tiling.c
+++ b/linux-core/i915_gem_tiling.c
@@ -155,7 +155,10 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
*/
chdecmisc = readb(mchbar + CHDECMISC);
- if (chdecmisc & CHDECMISC_FLEXMEMORY) {
+ if (chdecmisc == 0xff) {
+ DRM_ERROR("Couldn't read from MCHBAR. "
+ "Disabling tiling.\n");
+ } else if (chdecmisc & CHDECMISC_FLEXMEMORY) {
swizzle_x = I915_BIT_6_SWIZZLE_NONE;
swizzle_y = I915_BIT_6_SWIZZLE_NONE;
} else {
@@ -197,6 +200,12 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
}
break;
}
+ if (dcc == 0xffffffff) {
+ DRM_ERROR("Couldn't read from MCHBAR. "
+ "Disabling tiling.\n");
+ swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
+ swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
+ }
}
iounmap(mchbar);