]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
authorEric Anholt <eric@anholt.net>
Thu, 12 Mar 2009 23:56:27 +0000 (16:56 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 8 Apr 2009 17:50:57 +0000 (10:50 -0700)
commit37e220a5ddb2a6200fbc694476317e158f592e52
tree42a891344f7999da87adb8f6c6092e9adae3f7d4
parent490d54bd9d9f2fdb1cc139801adc03fd01129f5b
drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.

Save the bit 17 state of the pages when freeing the page list, and
reswizzle them if necessary when rebinding the pages (in case they were
swapped out).  Since we have userland with expectations that the swizzle
enums let it pread and pwrite contents accurately, we can't expose a new
swizzle enum for bit 17 (which it would have to GTT map to handle), so we
handle it down in pread and pwrite by swizzling the copy when bit 17 of the
page address is set.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_tiling.c
include/drm/i915_drm.h