diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-19 10:30:42 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-21 11:45:03 -0500 |
commit | be7cb6347e0c3aa1956748a860a2465a7ea128c4 (patch) | |
tree | 667a07555395601d0666c1fda1c8f16e7cb07217 /drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
parent | b92fa839015f27ba0f5c7ef9812eba9ecff538c2 (diff) |
drm/i915: Remove bogus test for a present execbuffer
The intention of checking obj->gtt_offset!=0 is to verify that the
target object was listed in the execbuffer and had been bound into the
GTT. This is guarranteed by the earlier rearrangement to split the
execbuffer operation into reserve and relocation phases and then
verified by the check that the target handle had been processed during
the reservation phase.
However, the actual checking of obj->gtt_offset==0 is bogus as we can
indeed reference an object at offset 0. For instance, the framebuffer
installed by the BIOS often resides at offset 0 - causing EINVAL as we
legimately try to render using the stolen fb.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index d80e9dd00c48..48e4317e72dc 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -128,15 +128,6 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, | |||
128 | target_i915_obj->cache_level); | 128 | target_i915_obj->cache_level); |
129 | } | 129 | } |
130 | 130 | ||
131 | /* The target buffer should have appeared before us in the | ||
132 | * exec_object list, so it should have a GTT space bound by now. | ||
133 | */ | ||
134 | if (unlikely(target_offset == 0)) { | ||
135 | DRM_DEBUG("No GTT space found for object %d\n", | ||
136 | reloc->target_handle); | ||
137 | return ret; | ||
138 | } | ||
139 | |||
140 | /* Validate that the target is in a valid r/w GPU domain */ | 131 | /* Validate that the target is in a valid r/w GPU domain */ |
141 | if (unlikely(reloc->write_domain & (reloc->write_domain - 1))) { | 132 | if (unlikely(reloc->write_domain & (reloc->write_domain - 1))) { |
142 | DRM_DEBUG("reloc with multiple write domains: " | 133 | DRM_DEBUG("reloc with multiple write domains: " |