Commit 82c7c4fc authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Free the batch along the contexts error path

Remember to release the batch bo reference if we hit an error trying to
submit our MI_STORE_DWORD_IMM.

References: https://bugs.freedesktop.org/show_bug.cgi?id=107979Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180919195544.1511-9-chris@chris-wilson.co.uk
parent 9e3b5ce9
...@@ -195,6 +195,7 @@ static int gpu_fill(struct drm_i915_gem_object *obj, ...@@ -195,6 +195,7 @@ static int gpu_fill(struct drm_i915_gem_object *obj,
i915_request_add(rq); i915_request_add(rq);
err_batch: err_batch:
i915_vma_unpin(batch); i915_vma_unpin(batch);
i915_vma_put(batch);
err_vma: err_vma:
i915_vma_unpin(vma); i915_vma_unpin(vma);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment