[PATCH i-g-t v1 5/7] tests/core_hotunplug: Open the same driver
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Jun 7 15:36:17 UTC 2024
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 at linux.intel.com>
---
tests/core_hotunplug.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 7ed9abd37..ddf11bb00 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -710,11 +710,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);
--
2.43.0
More information about the igt-dev
mailing list