mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 10:07:26 -04:00
drm/i915: Document and reject invalid tiling modes
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. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-17-git-send-email-chris@chris-wilson.co.uk
This commit is contained in:
@@ -68,6 +68,9 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
|
|||||||
if (tiling_mode == I915_TILING_NONE)
|
if (tiling_mode == I915_TILING_NONE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (tiling_mode > I915_TILING_LAST)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (IS_GEN2(dev) ||
|
if (IS_GEN2(dev) ||
|
||||||
(tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
|
(tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
|
||||||
tile_width = 128;
|
tile_width = 128;
|
||||||
|
|||||||
@@ -926,6 +926,7 @@ struct drm_i915_gem_caching {
|
|||||||
#define I915_TILING_NONE 0
|
#define I915_TILING_NONE 0
|
||||||
#define I915_TILING_X 1
|
#define I915_TILING_X 1
|
||||||
#define I915_TILING_Y 2
|
#define I915_TILING_Y 2
|
||||||
|
#define I915_TILING_LAST I915_TILING_Y
|
||||||
|
|
||||||
#define I915_BIT_6_SWIZZLE_NONE 0
|
#define I915_BIT_6_SWIZZLE_NONE 0
|
||||||
#define I915_BIT_6_SWIZZLE_9 1
|
#define I915_BIT_6_SWIZZLE_9 1
|
||||||
|
|||||||
Reference in New Issue
Block a user