[igt-dev] [PATCH i-g-t 1/1] tests/i915/gem_exec_parallel: Set engine map to default context

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Jan 17 08:15:55 UTC 2020


On Fri, 17 Jan 2020 06:39:36 -0800, Sreedhar Telukuntla wrote:
>
> All the *-fds tests are using default kernel context for submitting
> the workload to gpu. As CCS0 is not supported in legacy exec flow,
> CCS0-fds is failing with error -22. Set the supported engine map to
> default context to allow the workload submission to CCS engine.
>
> Signed-off-by: Sreedhar Telukuntla <sreedhar.telukuntla at intel.com>
> ---
>  tests/i915/gem_exec_parallel.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c
> index 56b26cf4..31cd33b0 100644
> --- a/tests/i915/gem_exec_parallel.c
> +++ b/tests/i915/gem_exec_parallel.c
> @@ -130,6 +130,8 @@ static void *thread(void *data)
>		execbuf.rsvd1 = gem_context_create(fd);
>		gem_context_set_all_engines(fd, execbuf.rsvd1);
>	}
> +	if (t->gen & FDS)
> +		gem_context_set_all_engines(fd, 0);

Shouldn't this patch be (i.e. also handle the case where FDS is not set):

diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c
index 56b26cf4d..0c08aefc5 100644
--- a/tests/i915/gem_exec_parallel.c
+++ b/tests/i915/gem_exec_parallel.c
@@ -83,10 +83,12 @@ static void *thread(void *data)
                pthread_cond_wait(t->cond, t->mutex);
        pthread_mutex_unlock(t->mutex);

-       if (t->flags & FDS)
+       if (t->flags & FDS) {
                fd = drm_open_driver(DRIVER_INTEL);
-       else
+               gem_context_set_all_engines(fd, 0);
+       } else {
                fd = t->fd;
+       }

        i = 0;
        batch[i] = MI_STORE_DWORD_IMM | (t->gen < 6 ? 1 << 22 : 0);
@@ -246,6 +248,8 @@ igt_main

        igt_fixture {
                fd = drm_open_driver_master(DRIVER_INTEL);
+               gem_context_set_all_engines(fd, 0);
+
                igt_require_gem(fd);

                igt_fork_hang_detector(fd);


More information about the igt-dev mailing list