intel-gem: Disable tiling if we get junk from the MCHBAR read.

One of our systems has been returning 0xffffffff from all MCHBAR reads, which
means we'll need to figure out why, or add an alternate detection method.
main
Eric Anholt 2008-07-14 09:16:45 -07:00
parent a0474be4e7
commit 78f1fc9cbc
1 changed files with 10 additions and 1 deletions

View File

@ -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);