Through the GTT interface to the fence registers, we can only handle linear, X and Y tiling. The more esoteric tiling patterns are ignored. Document that the tiling ABI only supports upto Y tiling, and reject any attempts to set a tiling mode other than NONE, X or Y.
Unified · Split
| @@ -68,6 +68,9 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode) · 67 unmodified lines | |||
| 68 | if (tiling_mode == I915_TILING_NONE) | 68 | if (tiling_mode == I915_TILING_NONE) |
| 69 | return true; | 69 | return true; |
| 70 | 70 | ||
| 71 | if (tiling_mode > I915_TILING_LAST) | ||
| 72 | return false; | ||
| 73 | |||
| 71 | if (IS_GEN2(dev) || | 74 | if (IS_GEN2(dev) || |
| 72 | (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))) | 75 | (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))) |
| 73 | tile_width = 128; | 76 | tile_width = 128; |
| @@ -926,6 +926,7 @@ struct drm_i915_gem_caching { · 925 unmodified lines | |||
| 926 | #define I915_TILING_NONE 0 | 926 | #define I915_TILING_NONE 0 |
| 927 | #define I915_TILING_X 1 | 927 | #define I915_TILING_X 1 |
| 928 | #define I915_TILING_Y 2 | 928 | #define I915_TILING_Y 2 |
| 929 | #define I915_TILING_LAST I915_TILING_Y | ||
| 929 | 930 | ||
| 930 | #define I915_BIT_6_SWIZZLE_NONE 0 | 931 | #define I915_BIT_6_SWIZZLE_NONE 0 |
| 931 | #define I915_BIT_6_SWIZZLE_9 1 | 932 | #define I915_BIT_6_SWIZZLE_9 1 |