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
6868 if (tiling_mode == I915_TILING_NONE)
6969 return true;
7070
71+ if (tiling_mode > I915_TILING_LAST)
72+ return false;
73+
7174 if (IS_GEN2(dev) ||
7275 (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
7376 tile_width = 128;
include/uapi/drm/i915_drm.h+1−0
@@ -926,6 +926,7 @@ struct drm_i915_gem_caching { · 925 unmodified lines
926926 #define I915_TILING_NONE 0
927927 #define I915_TILING_X 1
928928 #define I915_TILING_Y 2
929+#define I915_TILING_LAST I915_TILING_Y
929930
930931 #define I915_BIT_6_SWIZZLE_NONE 0
931932 #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