intel: Require kernel 2.6.39 for relaxed relocation support.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 6 Apr 2013 06:59:52 +0000 (23:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Apr 2013 18:03:08 +0000 (11:03 -0700)
Chris Wilson's relaxed relocation patch landed in March 2011.  Anyone
running pre-3.0 kernels probably isn't going to get the latest Mesa
anyway.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/intel/intel_screen.c

index 07f9f004fb82f42becdebe6eea98be71465a4b56..d2451f9c9edb3d30a04941d3170c2d1b621013bd 100644 (file)
@@ -517,8 +517,6 @@ static void brw_prepare_vertices(struct brw_context *brw)
       brw->vb.start_vertex_bias = -delta;
       delta = 0;
    }
-   if (delta && !brw->intel.intelScreen->relaxed_relocations)
-      min_index = delta = 0;
 
    /* Handle any arrays to be uploaded. */
    if (nr_uploads > 1) {
index 3ca10c8e5348e0a789b6d9bb9934c6c0a0952fb6..eb451ba546b0f0301643d06740324630b7311de3 100644 (file)
@@ -1008,9 +1008,10 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
 
    drm_intel_bufmgr_gem_enable_fenced_relocs(intelScreen->bufmgr);
 
-   intelScreen->relaxed_relocations = 0;
-   intelScreen->relaxed_relocations |=
-      intel_get_boolean(spriv, I915_PARAM_HAS_RELAXED_DELTA) << 0;
+   if (!intel_get_boolean(spriv, I915_PARAM_HAS_RELAXED_DELTA)) {
+      fprintf(stderr, "[%s: %u] Kernel 2.6.39 required.\n", __func__, __LINE__);
+      return false;
+   }
 
    return true;
 }