diff mbox

[i-g-t,1/2] igt/gem_gpgpu_fill: Check for GEM before use

Message ID 20180712153709.10125-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 12, 2018, 3:37 p.m. UTC
As we need GEM and the GPU to do a GPGPU fill, we should check that it
is operable before using -- skipping rather than failing when the device
is wedged.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_gpgpu_fill.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ville Syrjälä July 12, 2018, 7:01 p.m. UTC | #1
On Thu, Jul 12, 2018 at 04:37:08PM +0100, Chris Wilson wrote:
> As we need GEM and the GPU to do a GPGPU fill, we should check that it
> is operable before using -- skipping rather than failing when the device
> is wedged.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  tests/gem_gpgpu_fill.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/gem_gpgpu_fill.c b/tests/gem_gpgpu_fill.c
> index 8ef05a3f0..dfb581652 100644
> --- a/tests/gem_gpgpu_fill.c
> +++ b/tests/gem_gpgpu_fill.c
> @@ -104,6 +104,7 @@ igt_simple_main
>  
>  	data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
>  	data.devid = intel_get_drm_devid(data.drm_fd);
> +	igt_require_gem(data.drm_fd);
>  
>  	data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
>  	igt_assert(data.bufmgr);
> -- 
> 2.18.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/tests/gem_gpgpu_fill.c b/tests/gem_gpgpu_fill.c
index 8ef05a3f0..dfb581652 100644
--- a/tests/gem_gpgpu_fill.c
+++ b/tests/gem_gpgpu_fill.c
@@ -104,6 +104,7 @@  igt_simple_main
 
 	data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
 	data.devid = intel_get_drm_devid(data.drm_fd);
+	igt_require_gem(data.drm_fd);
 
 	data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
 	igt_assert(data.bufmgr);