summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-29 12:23:59 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2011-03-16 21:38:54 +0000
commit56aa9f2ea27e4feaaa47ba4092bdde4252b85dc1 (patch)
tree6a73b6d458865659dcbf600e2c2550e34ffe031e
parent75a854a7a86776789225743bb9d469f9fd9033da (diff)
intel: don't pass a dangling pointer to GET_PARAM
I fail at cut'n'paste. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 5afc7472b155e8e940f12a38baf80c298dc3b364) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--src/intel_memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_memory.c b/src/intel_memory.c
index 2b80df21..90e7be7d 100644
--- a/src/intel_memory.c
+++ b/src/intel_memory.c
@@ -1318,7 +1318,7 @@ void intel_set_gem_max_sizes(ScrnInfoPtr scrn)
intel_screen_private *intel = intel_get_screen_private(scrn);
struct drm_i915_gem_get_aperture aperture;
drm_i915_getparam_t gp;
- int ret;
+ int ret, value;
aperture.aper_available_size = 0;
drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
@@ -1327,6 +1327,7 @@ void intel_set_gem_max_sizes(ScrnInfoPtr scrn)
intel_set_max_gtt_map_size(intel, &aperture);
intel_set_max_tiling_size(intel, &aperture);
+ gp.value = &value;
gp.param = I915_PARAM_HAS_RELAXED_FENCING;
ret = drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GETPARAM, &gp);
intel->has_relaxed_fencing = ret == 0;