[Intel-gfx] [PATCH i-g-t 1/8] i915/gem_eio: Check that context create fails when wedged

Antonio Argenziano antonio.argenziano at intel.com
Tue Feb 19 16:53:48 UTC 2019



On 17/02/19 06:35, Chris Wilson wrote:
> Lock down the new uABI that DRM_IOCTL_I915_GEM_CONTEXT_CREATE returns
> -EIO when wedged.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>

LGTM.

Reviewed-by: Antonio Argenziano <antonio.argenziano at intel.com>

> ---
>   tests/i915/gem_eio.c | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
> index ac85a2eff..3c54820c9 100644
> --- a/tests/i915/gem_eio.c
> +++ b/tests/i915/gem_eio.c
> @@ -118,6 +118,17 @@ static void test_throttle(int fd)
>   	trigger_reset(fd);
>   }
>   
> +static void test_context_create(int fd)
> +{
> +	uint32_t ctx;
> +
> +	wedge_gpu(fd);
> +
> +	igt_assert_eq(__gem_context_create(fd, &ctx), -EIO);
> +
> +	trigger_reset(fd);
> +}
> +
>   static void test_execbuf(int fd)
>   {
>   	struct drm_i915_gem_execbuffer2 execbuf;
> @@ -807,6 +818,9 @@ igt_main
>   	igt_subtest("throttle")
>   		test_throttle(fd);
>   
> +	igt_subtest("context-create")
> +		test_context_create(fd);
> +
>   	igt_subtest("execbuf")
>   		test_execbuf(fd);
>   
> 


More information about the Intel-gfx mailing list