[igt-dev] [PATCH i-g-t] lib: Force rescan when module is loaded

Sharma, Swati2 swati2.sharma at intel.com
Mon Jul 25 06:38:10 UTC 2022


Hi Lucas,

Please add Fixes tag
https://gitlab.freedesktop.org/drm/intel/-/issues/5174

With that
Reviewed-by:  Swati Sharma <swati2.sharma at intel.com>

On 24-Jul-22 12:42 AM, Lucas De Marchi wrote:
> 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 at i915_pm_rpm@module-reload
> to skip on DG2 as the previous test makes igt at i915_pm_rpm to cause a
> module reload.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>   lib/drmtest.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 09a9a229..4f9d8a11 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -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)

-- 
~Swati Sharma


More information about the igt-dev mailing list