[igt-dev] [PATCH i-g-t] tests/i915/gem_softpin: Use valid context when iterating over engines

Das, Nirmoy nirmoy.das at linux.intel.com
Mon Apr 4 18:07:24 UTC 2022


LGTM Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>

On 4/4/2022 7:15 PM, Zbigniew Kempczyński wrote:
> For previous gens this bug was not discovered because newly created
> context over physical engines has same number of engines. For discrete
> this is not true so using bigger index taken from new context on
> default is leading to -EINVAL.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>   tests/i915/gem_softpin.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
> index 34fc9983ff..448b4c4b9e 100644
> --- a/tests/i915/gem_softpin.c
> +++ b/tests/i915/gem_softpin.c
> @@ -1002,6 +1002,7 @@ static void test_allocator_evict(int fd, const intel_ctx_t *ctx,
>   	execbuf.buffer_count = 1;
>   	if (gen < 6)
>   		execbuf.flags |= I915_EXEC_SECURE;
> +	execbuf.rsvd1 = ctx->id;
>   
>   	batches = calloc(count, sizeof(*batches));
>   	igt_assert(batches);


More information about the igt-dev mailing list