diff mbox

[0046/1094] Revert "drm/i915: Do not allow buffers at offset 0"

Message ID 1413889294-31328-47-git-send-email-dheerajx.s.jamwal@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dheeraj Jamwal Oct. 21, 2014, 10:44 a.m. UTC
From: Daniel Vetter <daniel.vetter@ffwll.ch>

This reverts commit 4fe9adbc36097317864bfec3c32047da7c45a2fa.

The patch completely lacks a detailed explanation of what exactly
blows up and how, so is insufficiently justified as a band-aid.

Otoh the justification as a safety measure against userspace botching
up relocations is also fairly weak: If we want real project we need to
at least make the gab big enough that the gpu doesn't scribble over
more important stuff. With 4k screens that would be 32MB.

Also I think this would be much better in conjunction with a (debug)
switch to disable our use of the scratch page.

Hence revert this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit bfca05275a594920ad5111f5a23ec6fadc0d0780)

Signed-off-by: Dheeraj Jamwal <dheerajx.s.jamwal@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 856cf83..3cdbd74 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3328,11 +3328,9 @@  i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
 	}
 
 search_free:
-	/* FIXME: Some tests are failing when they receive a reloc of 0. To
-	 * prevent this, we simply don't allow the 0th offset. */
 	ret = drm_mm_insert_node_in_range_generic(&vm->mm, &vma->node,
 						  size, alignment,
-						  obj->cache_level, 1, gtt_max,
+						  obj->cache_level, 0, gtt_max,
 						  DRM_MM_SEARCH_DEFAULT);
 	if (ret) {
 		ret = i915_gem_evict_something(dev, vm, size, alignment,