Skip to contentSkip to conversation

tests/i915/gem_ctx_shared: Resolve missing context for exec_shared_gtt

PATCH In review Arjun Melkaveri 3 participants 3 messages Nov 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_ctx_shared: Resolve missing context for exec_shared_gtt

Resolved missing context id in exec buf by passing first context i.e ctx[0].

This change would fix test assertion in gem_execbuf for "exec_shared_gtt" subtest.

Cc Zbigniew Kempczyński <[email protected]>
Cc Ashutosh Dixit <[email protected]>
---
 tests/i915/gem_ctx_shared.c | 1 +
 1 file changed, 1 insertion(+)
tests/i915/gem_ctx_shared.c +1 -0
index ea1b5dd1..3bf700fe 100644
@@ -277,6 +277,7 @@ static void exec_shared_gtt(int i915, const intel_ctx_cfg_t *cfg,
 	scratch = gem_create(i915, 16384);
 	gem_write(i915, scratch, 0, &bbe, sizeof(bbe));
 	obj.handle = scratch;
+	execbuf.rsvd1 = ctx[0]->id;
 	gem_execbuf(i915, &execbuf);
 	obj.flags |= EXEC_OBJECT_PINNED; /* reuse this address */
 	execbuf.rsvd1 = ctx[1]->id; /* and bind the second context image */
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Arjun Melkaveri

Resolved missing context id in exec buf by passing first context i.e ctx[0].

This change would fix test assertion in gem_execbuf for "exec_shared_gtt" subtest.

Quoted 22 lines
Cc Zbigniew Kempczyński <[email protected]>
Cc Ashutosh Dixit <[email protected]>
---
 tests/i915/gem_ctx_shared.c | 1 +
 1 file changed, 1 insertion(+)
tests/i915/gem_ctx_shared.c +1 -1
index ea1b5dd1..3bf700fe 100644
@@ -277,6 +277,7 @@ static void exec_shared_gtt(int i915, const intel_ctx_cfg_t *cfg,
 	scratch = gem_create(i915, 16384);
 	gem_write(i915, scratch, 0, &bbe, sizeof(bbe));
 	obj.handle = scratch;
+	execbuf.rsvd1 = ctx[0]->id;
 	gem_execbuf(i915, &execbuf);
 	obj.flags |= EXEC_OBJECT_PINNED; /* reuse this address */
 	execbuf.rsvd1 = ctx[1]->id; /* and bind the second context image */
--

2.25.1