Re: [Intel-gfx] [PATCH] drm/i915/selftests: Markup impossible error pointers

2019-08-27 Thread Matthew Auld

On 27/08/2019 10:49, Chris Wilson wrote:

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 
Signed-off-by: Chris Wilson 
Cc: Matthew Auld 

Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915/selftests: Markup impossible error pointers

2019-08-27 Thread Chris Wilson
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 
Signed-off-by: Chris Wilson 
Cc: Matthew Auld 
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
index 3adb60c2fd1f..37a177e37665 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
@@ -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, 
);
@@ -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, 
);
if (IS_ERR(obj)) {
-- 
2.23.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx