Skip to content

Commit

Permalink
drm/i915/selftests: Attach the fence to the object when making busy
Browse files Browse the repository at this point in the history
make_obj_busy() makes a dummy busy object, but didn't attach the fence
to the reservation object, so it would not have registered as busy. For
completeness, attach the dummy request as the exclusive fence and mark
the object as written (in i915_vma_move_to_active)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180629133717.11761-2-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jun 29, 2018
1 parent d78e2bb commit be01de5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/i915/selftests/i915_gem_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,12 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
return PTR_ERR(rq);
}

i915_vma_move_to_active(vma, rq, 0);
i915_vma_move_to_active(vma, rq, EXEC_OBJECT_WRITE);

reservation_object_lock(vma->resv, NULL);
reservation_object_add_excl_fence(vma->resv, &rq->fence);
reservation_object_unlock(vma->resv);

i915_request_add(rq);

i915_gem_object_set_active_reference(obj);
Expand Down

0 comments on commit be01de5

Please sign in to comment.