mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/i915/gt: Hold request reference while waiting for w/a verification
As we wait upon a request, we must be holding a reference to it, and be wary that i915_request_add() consumes the passed in reference. 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/20191121093326.134774-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
2d0fb25136
commit
090a82e916
1 changed files with 5 additions and 2 deletions
|
@ -1592,16 +1592,17 @@ static int engine_wa_list_verify(struct intel_context *ce,
|
|||
if (err)
|
||||
goto err_vma;
|
||||
|
||||
i915_request_get(rq);
|
||||
i915_request_add(rq);
|
||||
if (i915_request_wait(rq, 0, HZ / 5) < 0) {
|
||||
err = -ETIME;
|
||||
goto err_vma;
|
||||
goto err_rq;
|
||||
}
|
||||
|
||||
results = i915_gem_object_pin_map(vma->obj, I915_MAP_WB);
|
||||
if (IS_ERR(results)) {
|
||||
err = PTR_ERR(results);
|
||||
goto err_vma;
|
||||
goto err_rq;
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
@ -1615,6 +1616,8 @@ static int engine_wa_list_verify(struct intel_context *ce,
|
|||
|
||||
i915_gem_object_unpin_map(vma->obj);
|
||||
|
||||
err_rq:
|
||||
i915_request_put(rq);
|
||||
err_vma:
|
||||
i915_vma_unpin(vma);
|
||||
i915_vma_put(vma);
|
||||
|
|
Loading…
Add table
Reference in a new issue