summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2013-11-11 20:36:34 -0800
committerBen Widawsky <benjamin.widawsky@intel.com>2013-12-06 11:00:23 -0800
commitd4727a88f4ae86cd8d734a5cf723429fa631c874 (patch)
treea56b5dfa77a33060ed3d7460395370459a0afa70
parent8973883e5e61da824323ea4fb747222d70c97c49 (diff)
drm/i915: Warn on gem_pin usage
The pin IOCTL is leftover from the days of yore. It allows you to take a buffer, pin it, and receive the offset of that buffer. The IOCTL does not support the newer notion of contexts and VM, and therefore is not suitable for modern usage. The unsolvable problem is, "which address space do I pin this in?" As there are still mechanisms to do things only with the GGTT, and this could potentially have benefit as workarounds, leave it in place, but provide a warning to users. Request-to-not-deprecate-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f7114ae2a388..a03c262cb8ff 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3950,6 +3950,8 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,
goto out;
}
+ if (USES_FULL_PPGTT(dev))
+ DRM_DEBUG_DRIVER("Pinning with full PPGTT is not recommended\n");
obj->user_pin_count++;
obj->pin_filp = file;