Skip to content

Commit

Permalink
drm/i915/selftests: Markup impossible error pointers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chris Wilson committed Aug 27, 2019
1 parent ebfdf5c commit 21b0c32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 21b0c32

Please sign in to comment.