[PATCH i-g-t] lib/igt_kmod: Stop unloading drm

Lucas De Marchi lucas.demarchi at intel.com
Thu Feb 6 14:50:50 UTC 2025


On Tue, Feb 04, 2025 at 07:07:43PM -0800, Lucas De Marchi wrote:
>When testing i915, if there's another driver present, unloading i915 may
>cause the other driver to unload and let developers chasing ghosts when
>they think it was caused by i915.
>
>Hopefully fix the ATSM testing where AST driver is also bound to a
>a device.
>
>Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13292
>Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>---
>
>After this change, running i915_module_load at reload doesn't cause ast to
>be unloaded, but I couldn't check it really fixes the issue since I
>couldn't reproduce it.
>
> lib/igt_kmod.c | 7 -------
> 1 file changed, 7 deletions(-)
>
>diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
>index d154701c6..524c1a632 100644
>--- a/lib/igt_kmod.c
>+++ b/lib/igt_kmod.c
>@@ -690,7 +690,6 @@ int igt_kmod_unbind(const char *mod_name)
>  * igt_intel_driver_unload:
>  *
>  * Unloads an Intel driver and its dependencies.
>- *
>  */
> int
> igt_intel_driver_unload(const char *driver)
>@@ -709,12 +708,6 @@ igt_intel_driver_unload(const char *driver)
> 	}
> 	free(who);
>
>-	if (igt_kmod_is_loaded("intel-gtt"))
>-		igt_kmod_unload("intel-gtt");
>-
>-	igt_kmod_unload("drm_kms_helper");
>-	igt_kmod_unload("drm");

another thing worth noting:  both intel-gtt and drm are built-in in our
CI builds, both for xe and i915. So those calls are actually moot.

The one that makes a difference is actually drm_kms_helper. That is
built as a module:

$ curl https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16075/kconfig.txt > /tmp/kconfig.txt
$ grep -e CONFIG_INTEL_GTT= -e CONFIG_DRM= -e CONFIG_DRM_KMS_HELPER= /tmp/kconfig.txt
CONFIG_INTEL_GTT=y
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=m

Lucas De Marchi

>-
> 	if (igt_kmod_is_loaded(driver)) {
> 		igt_warn("%s.ko still loaded!\n", driver);
> 		return -EBUSY;
>-- 
>2.48.1
>


More information about the igt-dev mailing list