Skip to contentSkip to conversation

lib: Force rescan when module is loaded

PATCH New Lucas De Marchi 1 participant 1 message Jul 23, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: Force rescan when module is loaded

Whenever we load a drm module we need to force a rescan of igt devices so we update the list. Otherwise any place trying to open the device and then falling back to loading the driver and loading it, will not have a proper fallback. Currently this makes igt@i915_pm_rpm@module-reload to skip on DG2 as the previous test makes igt@i915_pm_rpm to cause a module reload.

---
 lib/drmtest.c | 1 +
 1 file changed, 1 insertion(+)
lib/drmtest.c +1 -0
index 09a9a229..4f9d8a11 100644
@@ -313,6 +313,7 @@ void drm_load_module(unsigned int chipset)
 		}
 	}
 	pthread_mutex_unlock(&mutex);
+	igt_devices_scan(true);
 }
 
 static int __open_driver(const char *base, int offset, unsigned int chipset, int as_idx)
Signature · 1 line
2.37.1