summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-03-12 16:56:27 -0700
committerEric Anholt <eric@anholt.net>2009-04-08 10:50:57 -0700
commit280b713b5b0fd84cf2469098aee88acbb5de859c (patch)
tree42a891344f7999da87adb8f6c6092e9adae3f7d4 /include/drm
parente5e9ecde63ba365b510df0f4a9cb3b048a0ad785 (diff)
downloadop-kernel-dev-280b713b5b0fd84cf2469098aee88acbb5de859c.zip
op-kernel-dev-280b713b5b0fd84cf2469098aee88acbb5de859c.tar.gz
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>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/i915_drm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 67e3353..95962fa 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -594,6 +594,9 @@ struct drm_i915_gem_busy {
#define I915_BIT_6_SWIZZLE_9_10_11 4
/* Not seen by userland */
#define I915_BIT_6_SWIZZLE_UNKNOWN 5
+/* Seen by userland. */
+#define I915_BIT_6_SWIZZLE_9_17 6
+#define I915_BIT_6_SWIZZLE_9_10_17 7
struct drm_i915_gem_set_tiling {
/** Handle of the buffer to have its tiling state updated */
OpenPOWER on IntegriCloud