mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 08:12:41 -04:00
drm/i915/selftests: Markup impossible error pointers
If we create a new live_context() we should have a mapping for each engine. Document that assumption with an assertion. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190827094933.13778-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -397,6 +397,7 @@ static int igt_ctx_exec(void *arg)
|
||||
}
|
||||
|
||||
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
|
||||
GEM_BUG_ON(IS_ERR(ce));
|
||||
|
||||
if (!obj) {
|
||||
obj = create_test_object(ce->vm, file, &objects);
|
||||
@@ -521,6 +522,8 @@ static int igt_shared_ctx_exec(void *arg)
|
||||
__assign_ppgtt(ctx, parent->vm);
|
||||
|
||||
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
|
||||
GEM_BUG_ON(IS_ERR(ce));
|
||||
|
||||
if (!obj) {
|
||||
obj = create_test_object(parent->vm, file, &objects);
|
||||
if (IS_ERR(obj)) {
|
||||
|
||||
Reference in New Issue
Block a user