Commit 2c59fd06 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gem: Cleanup shadow batch after I915_EXEC_SECURE

Tidy up after a call to eb_parse() if a later bind fails.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1312Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200225082233.274530-4-chris@chris-wilson.co.uk
parent 12b37880
...@@ -2713,7 +2713,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, ...@@ -2713,7 +2713,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
vma = i915_gem_object_ggtt_pin(eb.batch->obj, NULL, 0, 0, 0); vma = i915_gem_object_ggtt_pin(eb.batch->obj, NULL, 0, 0, 0);
if (IS_ERR(vma)) { if (IS_ERR(vma)) {
err = PTR_ERR(vma); err = PTR_ERR(vma);
goto err_vma; goto err_parse;
} }
eb.batch = vma; eb.batch = vma;
...@@ -2792,6 +2792,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, ...@@ -2792,6 +2792,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
err_batch_unpin: err_batch_unpin:
if (eb.batch_flags & I915_DISPATCH_SECURE) if (eb.batch_flags & I915_DISPATCH_SECURE)
i915_vma_unpin(eb.batch); i915_vma_unpin(eb.batch);
err_parse:
if (eb.batch->private) if (eb.batch->private)
intel_engine_pool_put(eb.batch->private); intel_engine_pool_put(eb.batch->private);
err_vma: err_vma:
......
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