diff mbox

[i-g-t] igt/gem_pwrite_snooped: Check for GEM before use

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

Commit Message

Chris Wilson July 13, 2018, 5:29 p.m. UTC
As we try to blit into the buffer to check CPU<->GPU snooping, we have
to check we have a functional GPU first.

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

Comments

Vinay Belgaumkar July 16, 2018, 6:43 p.m. UTC | #1
On 07/13/2018 10:29 AM, Chris Wilson wrote:
> As we try to blit into the buffer to check CPU<->GPU snooping, we have
> to check we have a functional GPU first.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/gem_pwrite_snooped.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c
> index b19339560..47ccce8b7 100644
> --- a/tests/gem_pwrite_snooped.c
> +++ b/tests/gem_pwrite_snooped.c
> @@ -130,6 +130,8 @@ igt_simple_main
>   	igt_skip_on_simulation();
>   
>   	fd = drm_open_driver(DRIVER_INTEL);
> +	igt_require_gem(fd);
> +

Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>

>   	devid = intel_get_drm_devid(fd);
>   	bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
>
diff mbox

Patch

diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c
index b19339560..47ccce8b7 100644
--- a/tests/gem_pwrite_snooped.c
+++ b/tests/gem_pwrite_snooped.c
@@ -130,6 +130,8 @@  igt_simple_main
 	igt_skip_on_simulation();
 
 	fd = drm_open_driver(DRIVER_INTEL);
+	igt_require_gem(fd);
+
 	devid = intel_get_drm_devid(fd);
 	bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);