drm/i915: avoid uninitialised var in eb_parse()
The backport ofc9d9fdbc10to 5.10 in6976f3cf34removed more than it should have leading to 'batch' being used uninitialised. The 5.13 backport and the mainline commit did not remove the portion this patch adds back. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Fixes:6976f3cf34("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"") Cc: <stable@vger.kernel.org> # 5.10 Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a3e6bd0c71
commit
11891adab2
@@ -2351,6 +2351,12 @@ static int eb_parse(struct i915_execbuffer *eb)
|
|||||||
eb->batch_flags |= I915_DISPATCH_SECURE;
|
eb->batch_flags |= I915_DISPATCH_SECURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
batch = eb_dispatch_secure(eb, shadow);
|
||||||
|
if (IS_ERR(batch)) {
|
||||||
|
err = PTR_ERR(batch);
|
||||||
|
goto err_trampoline;
|
||||||
|
}
|
||||||
|
|
||||||
err = intel_engine_cmd_parser(eb->engine,
|
err = intel_engine_cmd_parser(eb->engine,
|
||||||
eb->batch->vma,
|
eb->batch->vma,
|
||||||
eb->batch_start_offset,
|
eb->batch_start_offset,
|
||||||
@@ -2377,6 +2383,7 @@ secure_batch:
|
|||||||
err_unpin_batch:
|
err_unpin_batch:
|
||||||
if (batch)
|
if (batch)
|
||||||
i915_vma_unpin(batch);
|
i915_vma_unpin(batch);
|
||||||
|
err_trampoline:
|
||||||
if (trampoline)
|
if (trampoline)
|
||||||
i915_vma_unpin(trampoline);
|
i915_vma_unpin(trampoline);
|
||||||
err_shadow:
|
err_shadow:
|
||||||
|
|||||||
Reference in New Issue
Block a user