summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-05-09 18:23:51 -0700
committerEric Anholt <eric@anholt.net>2008-05-09 18:23:51 -0700
commit48a8531aa403ea250696338aa8717e3e36477370 (patch)
tree6b0b05589c893b66f0cbf12f6fbf147cf31a0ed2
parentc5c59eab809604e4d0d4d1dc71fc11186d0220f8 (diff)
GEM: Fix arguments to drm_memrange_init so we don't exceed our allocation.
It takes (offset, size), not (offset, end).
-rw-r--r--linux-core/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index ec5a9872..37a4e503 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -48,7 +48,7 @@ i915_gem_init_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
drm_memrange_init(&dev_priv->mm.gtt_space, args->gtt_start,
- args->gtt_end);
+ args->gtt_end - args->gtt_start);
return 0;
}