|
@@ -102,22 +102,33 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
|
|
swizzle_x = I915_BIT_6_SWIZZLE_NONE;
|
|
swizzle_x = I915_BIT_6_SWIZZLE_NONE;
|
|
swizzle_y = I915_BIT_6_SWIZZLE_NONE;
|
|
swizzle_y = I915_BIT_6_SWIZZLE_NONE;
|
|
} else if (INTEL_INFO(dev)->gen >= 6) {
|
|
} else if (INTEL_INFO(dev)->gen >= 6) {
|
|
- uint32_t dimm_c0, dimm_c1;
|
|
|
|
- dimm_c0 = I915_READ(MAD_DIMM_C0);
|
|
|
|
- dimm_c1 = I915_READ(MAD_DIMM_C1);
|
|
|
|
- dimm_c0 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_B_SIZE_MASK;
|
|
|
|
- dimm_c1 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_B_SIZE_MASK;
|
|
|
|
- /* Enable swizzling when the channels are populated with
|
|
|
|
- * identically sized dimms. We don't need to check the 3rd
|
|
|
|
- * channel because no cpu with gpu attached ships in that
|
|
|
|
- * configuration. Also, swizzling only makes sense for 2
|
|
|
|
- * channels anyway. */
|
|
|
|
- if (dimm_c0 == dimm_c1) {
|
|
|
|
- swizzle_x = I915_BIT_6_SWIZZLE_9_10;
|
|
|
|
- swizzle_y = I915_BIT_6_SWIZZLE_9;
|
|
|
|
|
|
+ if (dev_priv->preserve_bios_swizzle) {
|
|
|
|
+ if (I915_READ(DISP_ARB_CTL) &
|
|
|
|
+ DISP_TILE_SURFACE_SWIZZLING) {
|
|
|
|
+ swizzle_x = I915_BIT_6_SWIZZLE_9_10;
|
|
|
|
+ swizzle_y = I915_BIT_6_SWIZZLE_9;
|
|
|
|
+ } else {
|
|
|
|
+ swizzle_x = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
+ swizzle_y = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- swizzle_x = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
- swizzle_y = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
|
|
+ uint32_t dimm_c0, dimm_c1;
|
|
|
|
+ dimm_c0 = I915_READ(MAD_DIMM_C0);
|
|
|
|
+ dimm_c1 = I915_READ(MAD_DIMM_C1);
|
|
|
|
+ dimm_c0 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_B_SIZE_MASK;
|
|
|
|
+ dimm_c1 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_B_SIZE_MASK;
|
|
|
|
+ /* Enable swizzling when the channels are populated
|
|
|
|
+ * with identically sized dimms. We don't need to check
|
|
|
|
+ * the 3rd channel because no cpu with gpu attached
|
|
|
|
+ * ships in that configuration. Also, swizzling only
|
|
|
|
+ * makes sense for 2 channels anyway. */
|
|
|
|
+ if (dimm_c0 == dimm_c1) {
|
|
|
|
+ swizzle_x = I915_BIT_6_SWIZZLE_9_10;
|
|
|
|
+ swizzle_y = I915_BIT_6_SWIZZLE_9;
|
|
|
|
+ } else {
|
|
|
|
+ swizzle_x = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
+ swizzle_y = I915_BIT_6_SWIZZLE_NONE;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else if (IS_GEN5(dev)) {
|
|
} else if (IS_GEN5(dev)) {
|
|
/* On Ironlake whatever DRAM config, GPU always do
|
|
/* On Ironlake whatever DRAM config, GPU always do
|