drm/i915: Fix tiling pitch handling on 8xx.
authorEric Anholt <eric@anholt.net>
Wed, 27 May 2009 00:44:56 +0000 (17:44 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 27 May 2009 02:11:31 +0000 (19:11 -0700)
commite76a16deb8785317a23cca7204331af053e0fb4e
tree5a5c2197914c84d21ce4e31942ecfcc9d083b602
parentcd86a536c81e9300d984327517548ca0652eebf9
drm/i915: Fix tiling pitch handling on 8xx.

The pitch field is an exponent on pre-965, so we were rejecting buffers
on 8xx that we shouldn't have.  915 got lucky in that the largest legal
value happened to match (8KB / 512 = 0x10), but 8xx has a smaller tile width.
Additionally, we programmed that bad value into the register on 8xx, so the
only pitch that would work correctly was 4096 (512-1023 pixels), while others
would probably give bad rendering or hangs.

Signed-off-by: Eric Anholt <eric@anholt.net>
fd.o bug #20473.
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_tiling.c
drivers/gpu/drm/i915/i915_reg.h