[PATCH i-g-t v3 3/3] lib/igt_kmod: Do not explicitly unload intel mei driver
Daniele Ceraolo Spurio
daniele.ceraolospurio at intel.com
Fri Dec 20 19:04:40 UTC 2024
The mei driver is a child of i915 on discrete, but not on integrated.
This means we want to unplug it before removing i915 in the former case
but not in the latter. Therefore, instead of manually unloading the mei
driver, we can unbind i915 and leave it to the kernel to unplug all the
dependencies. This also means that we don't need to explicitly disable
the vtcon anymore.
The other 2 dependencies are left untouched:
- intel_ips uses symbol_get, so the automatic dependency detection won't
unload it.
- the hotunplug test mentions that the sound driver can throw errors on
i915 unbind, so we need to keep the explicit unload.
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
lib/igt_kmod.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 95c5b79cc..d154701c6 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -612,16 +612,9 @@ int __igt_intel_driver_unload(char **who, const char *driver)
const char *aux[] = {
/* gen5: ips uses symbol_get() so only a soft module dependency */
"intel_ips",
- /* mei_gsc uses an i915 aux dev and the other mei mods depend on it */
- "mei_pxp",
- "mei_hdcp",
- "mei_gsc",
NULL,
};
- /* unbind vt */
- bind_fbcon(false);
-
ret = igt_audio_driver_unload(who);
if (ret)
return ret;
@@ -640,6 +633,8 @@ int __igt_intel_driver_unload(char **who, const char *driver)
}
if (igt_kmod_is_loaded(driver)) {
+ igt_kmod_unbind(driver);
+
ret = igt_kmod_unload(driver);
if (ret) {
if (who)
--
2.43.0
More information about the igt-dev
mailing list