diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-04 15:49:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-05 07:58:03 +0100 |
commit | 5a160e9e1fe19c67e58e9c298303cb94c96aeb7d (patch) | |
tree | 1ddfd8003b59c8a3248ee33199535d9cdff53b8e /tests/perf.c | |
parent | aaa23eff21a148809beb22e928f3cd72530ea3de (diff) |
igt/perf: Check the GPU is not wedged before running
If the GPU is not usable, we will not be able to submit workloads to be
measured and so observing them will fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'tests/perf.c')
-rw-r--r-- | tests/perf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/perf.c b/tests/perf.c index 95048bfa..2736918f 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -4109,7 +4109,10 @@ igt_main * should have closed drm_fd... */ igt_assert_eq(drm_fd, -1); + drm_fd = drm_open_driver(DRIVER_INTEL); + igt_require_gem(drm_fd); + devid = intel_get_drm_devid(drm_fd); sysfs = igt_sysfs_open(drm_fd, &card); |