diff options
author | Eric Anholt <eric@anholt.net> | 2008-07-30 14:14:44 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-07-30 14:16:33 -0700 |
commit | c9120a0d1928f8ca6114923fd307fbc5c358eb0b (patch) | |
tree | 9c2dca938e72afb4e2e3076bb9edf7557eac39a3 /src | |
parent | 902e401a384a8213d1239aae42bc2b7071ad6bd8 (diff) |
intel-gem: Use new getparam to detect kernel GEM support.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 082dfe87e3..8a4d5d2114 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -464,7 +464,14 @@ intel_init_bufmgr(struct intel_context *intel) { intelScreenPrivate *intelScreen = intel->intelScreen; GLboolean gem_disable = getenv("INTEL_NO_GEM") != NULL; + int gem_kernel = 0; GLboolean gem_supported; + struct drm_i915_getparam gp; + + gp.param = I915_PARAM_HAS_GEM; + gp.value = &gem_kernel; + + (void) drmCommandWriteRead(intel->driFd, DRM_I915_GETPARAM, &gp, sizeof(gp)); /* If we've got a new enough DDX that's initializing GEM and giving us * object handles for the shared buffers, use that. @@ -473,7 +480,7 @@ intel_init_bufmgr(struct intel_context *intel) if (intel->intelScreen->driScrnPriv->dri2.enabled) gem_supported = GL_TRUE; else if (intel->intelScreen->driScrnPriv->ddx_version.minor >= 9 && - intel->intelScreen->drmMinor >= 11 && + gem_kernel && intel->intelScreen->front.bo_handle != -1) gem_supported = GL_TRUE; else |