summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Konieczny <kamil.konieczny@linux.intel.com>2024-08-05 16:37:07 +0200
committerKamil Konieczny <kamil.konieczny@linux.intel.com>2024-08-07 15:49:46 +0200
commit91611767c5f23217528e60de998d89a9508907a0 (patch)
treeff603eb4044de0dbeeaccc9b1fe613ca1b37c769
parentd5ee880845c1276016559a31a1257880481b3674 (diff)
tests/core_hotunplug: Open the same driver
Make sure any later opens will use the same driver as the first one. Also while at this, print driver name before test starts. Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
-rw-r--r--tests/core_hotunplug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 617332b0f..cc715a234 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -681,11 +681,16 @@ igt_main
igt_fixture {
int fd_drm;
+ char driver[32] = {};
fd_drm = __drm_open_driver(DRIVER_ANY);
igt_skip_on_f(fd_drm < 0, "No known DRM device found\n");
priv.chipset = drm_get_chipset(fd_drm);
+ /* Make sure it opens the same driver */
+ __get_drm_device_name(fd_drm, driver, sizeof(driver) - 1);
+ __set_forced_driver(driver);
+ igt_info("DRM driver: %s\n", driver);
if (is_i915_device(fd_drm)) {
gem_quiescent_gpu(fd_drm);