Skip to content

Commit b612eda

Browse files
anholtairlied
authored andcommitted
i915: GM45 has GM965-style MCH setup.
Fixes tiling swizzling mode failures that manifest in glReadPixels(). Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 6dbe277 commit b612eda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/i915/i915_gem_tiling.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
9696
*/
9797
swizzle_x = I915_BIT_6_SWIZZLE_NONE;
9898
swizzle_y = I915_BIT_6_SWIZZLE_NONE;
99-
} else if ((!IS_I965G(dev) && !IS_G33(dev)) || IS_I965GM(dev)) {
99+
} else if ((!IS_I965G(dev) && !IS_G33(dev)) || IS_I965GM(dev) ||
100+
IS_GM45(dev)) {
100101
uint32_t dcc;
101102

102103
/* On 915-945 and GM965, channel interleave by the CPU is
@@ -118,7 +119,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
118119
dcc & DCC_CHANNEL_XOR_DISABLE) {
119120
swizzle_x = I915_BIT_6_SWIZZLE_9_10;
120121
swizzle_y = I915_BIT_6_SWIZZLE_9;
121-
} else if (IS_I965GM(dev)) {
122+
} else if (IS_I965GM(dev) || IS_GM45(dev)) {
122123
/* GM965 only does bit 11-based channel
123124
* randomization
124125
*/

0 commit comments

Comments
 (0)