History

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.

Chris Wilson committed 10 years ago

Commit deeb1511 parent 9ad36762 files · +4 −0Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/i915/i915_gem_tiling.c +3 −0
  2. include/uapi/drm/i915_drm.h +1 −0
drivers/gpu/drm/i915/i915_gem_tiling.c+3−0
@@ -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;
include/uapi/drm/i915_drm.h+1−0
@@ -926,6 +926,7 @@ struct drm_i915_gem_caching { · 925 unmodified lines
926#define I915_TILING_NONE 0926#define I915_TILING_NONE 0
927#define I915_TILING_X 1927#define I915_TILING_X 1
928#define I915_TILING_Y 2928#define I915_TILING_Y 2
929#define I915_TILING_LAST I915_TILING_Y
929 930
930#define I915_BIT_6_SWIZZLE_NONE 0931#define I915_BIT_6_SWIZZLE_NONE 0
931#define I915_BIT_6_SWIZZLE_9 1932#define I915_BIT_6_SWIZZLE_9 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t