[igt-dev] [PATCH i-g-t] tests/gem_exec_basic: Quiesce GPU before returning from test
Antonio Argenziano
antonio.argenziano at intel.com
Mon Jun 11 21:20:59 UTC 2018
On 11/06/18 14:06, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-06-11 21:58:36)
>> All subtests send a workload to the engines and then return without
>> waiting on it, while this is not a problem because the test targets the
>> API, it makes the hang detector pointless since the driver will declare
>> an hang long after the test has completed.
>>
>> Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>> ---
>> tests/gem_exec_basic.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/gem_exec_basic.c b/tests/gem_exec_basic.c
>> index 2f057ef0..473c2e8e 100644
>> --- a/tests/gem_exec_basic.c
>> +++ b/tests/gem_exec_basic.c
>> @@ -42,7 +42,9 @@ static void noop(int fd, unsigned ring)
>> execbuf.buffer_count = 1;
>> execbuf.flags = ring;
>> gem_execbuf(fd, &execbuf);
>> +
>> gem_close(fd, exec.handle);
>> + gem_quiescent_gpu(fd);
>> }
>>
>> static void readonly(int fd, unsigned ring)
>> @@ -66,8 +68,10 @@ static void readonly(int fd, unsigned ring)
>> igt_assert(mprotect(execbuf, 4096, PROT_READ) == 0);
>>
>> gem_execbuf(fd, execbuf);
>> +
>> munmap(execbuf, 4096);
>> gem_close(fd, exec.handle);
>> + gem_quiescent_gpu(fd);
>> }
>>
>> static void gtt(int fd, unsigned ring)
>> @@ -94,9 +98,11 @@ static void gtt(int fd, unsigned ring)
>> execbuf->flags = ring;
>>
>> gem_execbuf(fd, execbuf);
>> - gem_close(fd, exec->handle);
>>
>> + gem_close(fd, exec->handle);
>> munmap(execbuf, 4096);
>> +
>> + gem_quiescent_gpu(fd);
>> }
>
> As you are there, maybe
Sounds good, be right back with v2.
Thanks,
Antonio
> diff --git a/tests/gem_exec_basic.c b/tests/gem_exec_basic.c
> index 2f057ef..b1b9081 100644
> --- a/tests/gem_exec_basic.c
> +++ b/tests/gem_exec_basic.c
> @@ -25,37 +25,51 @@
>
More information about the igt-dev
mailing list