drm/i915: Refactor export_fence() after i915_vma_move_to_active()
Currently all callers are responsible for adding the vma to the active timeline and then exporting its fence. Combine the two operations into i915_vma_move_to_active() to move all the extra handling from the callers to the single site. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180706103947.15919-1-chris@chris-wilson.co.uk
Этот коммит содержится в:
@@ -998,10 +998,6 @@ static int gpu_write(struct i915_vma *vma,
|
||||
|
||||
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);
|
||||
|
||||
err_request:
|
||||
i915_request_add(rq);
|
||||
|
||||
|
@@ -225,10 +225,6 @@ static int gpu_set(struct drm_i915_gem_object *obj,
|
||||
i915_vma_move_to_active(vma, rq, EXEC_OBJECT_WRITE);
|
||||
i915_vma_unpin(vma);
|
||||
|
||||
reservation_object_lock(obj->resv, NULL);
|
||||
reservation_object_add_excl_fence(obj->resv, &rq->fence);
|
||||
reservation_object_unlock(obj->resv);
|
||||
|
||||
i915_request_add(rq);
|
||||
|
||||
return 0;
|
||||
|
@@ -178,10 +178,6 @@ static int gpu_fill(struct drm_i915_gem_object *obj,
|
||||
i915_vma_move_to_active(vma, rq, EXEC_OBJECT_WRITE);
|
||||
i915_vma_unpin(vma);
|
||||
|
||||
reservation_object_lock(obj->resv, NULL);
|
||||
reservation_object_add_excl_fence(obj->resv, &rq->fence);
|
||||
reservation_object_unlock(obj->resv);
|
||||
|
||||
i915_request_add(rq);
|
||||
|
||||
return 0;
|
||||
|
@@ -466,10 +466,6 @@ static int make_obj_busy(struct drm_i915_gem_object *obj)
|
||||
|
||||
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);
|
||||
|
@@ -68,9 +68,6 @@ read_nonprivs(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
|
||||
intel_ring_advance(rq, cs);
|
||||
|
||||
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_gem_object_get(result);
|
||||
i915_gem_object_set_active_reference(result);
|
||||
|
Ссылка в новой задаче
Block a user