Skip to content

Commit

Permalink
drm/i915/gt: Restore check for invalid vma for fencing
Browse files Browse the repository at this point in the history
Apparently we do try and attach a fence to an invalid vma (during
execbuf) so we cannot simply assert it never happens and report EINVAL
instead.

Fixes: dec9cf9 ("drm/i915/gt: Pull restoration of GGTT fences underneath the GT")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200316205450.15843-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 17, 2020
1 parent 0b6bc81 commit 220a670
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,12 @@ static int fence_update(struct i915_fence_reg *fence,
int ret;

if (vma) {
GEM_BUG_ON(!i915_vma_is_map_and_fenceable(vma));
GEM_BUG_ON(!i915_gem_object_get_stride(vma->obj) ||
!i915_gem_object_get_tiling(vma->obj));

if (!i915_vma_is_map_and_fenceable(vma))
return -EINVAL;

ret = i915_vma_sync(vma);
if (ret)
return ret;
Expand Down

0 comments on commit 220a670

Please sign in to comment.