Commit 537e0b84 authored by Chris Wilson's avatar Chris Wilson 🤔

tests: More precautionary selfchecks to filter out broken GPUs

If the driver is already wedged, trying to use GEM will only result in
misleading failure.
Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 9f92893b
......@@ -116,6 +116,7 @@ igt_main
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
gem_require_caching(fd);
devid = intel_get_drm_devid(fd);
......
......@@ -192,6 +192,8 @@ static void run(int object_size, bool dumb)
int ring;
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
if (dumb)
handle = kmstest_dumb_create(fd, 32, 32, 32, NULL, NULL);
else
......
......@@ -69,6 +69,7 @@ igt_simple_main
memset(blob, 'A', sizeof(blob));
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
......
......@@ -104,6 +104,8 @@ igt_simple_main
int i, j;
data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
igt_require_em(data.drm_fd);
data.devid = intel_get_drm_devid(data.drm_fd);
data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
......
......@@ -255,6 +255,7 @@ igt_main
igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
......
......@@ -323,6 +323,7 @@ igt_main
igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
/* disable reuse, otherwise the test fails */
......
......@@ -161,6 +161,8 @@ igt_main
{
igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
......
......@@ -212,6 +212,7 @@ igt_main
igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
igt_require_gem(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment