summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-01-27 13:12:33 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-01-29 23:42:53 +0000
commita5211ea15c324f7789c0284a685dd2642d57b661 (patch)
treeb578d0fa11f009d01ef9fafc9990f33ae5609e9f /tests
parentd8f9f063dfc440994fd097b0238ab11f3d299bc6 (diff)
i915/pm_rpm: Check for functional GEM before use
Check the GPU (using GEM) is up and operational before submitting commands. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/pm_rpm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 7dcb5586..be296f52 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -1220,6 +1220,8 @@ static void gem_execbuf_subtest(void)
int sq_x = 5, sq_y = 10, sq_w = 15, sq_h = 20;
uint32_t color;
+ igt_require_gem(drm_fd);
+
/* Create and set data while the device is active. */
enable_one_screen_and_wait(&ms_data);
@@ -1308,6 +1310,8 @@ static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
struct drm_i915_gem_execbuffer2 execbuf = {};
struct drm_i915_gem_exec_object2 objs[1] = {{}};
+ igt_require_gem(drm_fd);
+
if (wait_flags & WAIT_PC8_RES)
igt_require(has_pc8);