[PATCH] drm: Ensure Proper Unload/Reload Order of MEI Modules for i915/Xe Driver
Bommu, Krishnaiah
krishnaiah.bommu at intel.com
Tue Sep 3 06:33:17 UTC 2024
> -----Original Message-----
> From: Upadhyay, Tejas <tejas.upadhyay at intel.com>
> Sent: Tuesday, September 3, 2024 11:59 AM
> To: Bommu, Krishnaiah <krishnaiah.bommu at intel.com>; intel-
> xe at lists.freedesktop.org
> Cc: Bommu, Krishnaiah <krishnaiah.bommu at intel.com>; Kamil Konieczny
> <kamil.konieczny at linux.intel.com>; Ceraolo Spurio, Daniele
> <daniele.ceraolospurio at intel.com>; De Marchi, Lucas
> <lucas.demarchi at intel.com>
> Subject: RE: [PATCH] drm: Ensure Proper Unload/Reload Order of MEI Modules
> for i915/Xe Driver
>
>
>
> > -----Original Message-----
> > From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of
> > Bommu Krishnaiah
> > Sent: Monday, September 2, 2024 7:41 PM
> > To: intel-xe at lists.freedesktop.org
> > Cc: Bommu, Krishnaiah <krishnaiah.bommu at intel.com>; Kamil Konieczny
> > <kamil.konieczny at linux.intel.com>; Ceraolo Spurio, Daniele
> > <daniele.ceraolospurio at intel.com>; De Marchi, Lucas
> > <lucas.demarchi at intel.com>
> > Subject: [PATCH] drm: Ensure Proper Unload/Reload Order of MEI Modules
> > for i915/Xe Driver
> >
> > This update addresses the unload/reload sequence of MEI modules in
> > relation to the i915/Xe graphics driver. On platforms where the MEI
> > hardware is integrated with the graphics device (e.g., DG2/BMG), the
> > MEI modules depend on the i915/Xe driver. Conversely, on newer
> > platforms like CLS, where the MEI hardware is separate, this dependency does
> not exist.
> >
> > The changes introduced ensure that MEI modules are unloaded and
> > reloaded in the correct order based on platform-specific dependencies.
> > This is achieved by adding a MODULE_SOFTDEP directive to the i915 and
> > Xe module code.
> >
> > These changes enhance the robustness of MEI module handling across
> > different hardware platforms, ensuring that the i915/Xe driver can be
> > cleanly unloaded and reloaded without issues.
> >
> > Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
> > Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_module.c | 2 ++
> > drivers/gpu/drm/xe/xe_module.c | 2 ++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_module.c
> > b/drivers/gpu/drm/i915/i915_module.c
> > index 65acd7bf75d0..2ad079ad35db 100644
> > --- a/drivers/gpu/drm/i915/i915_module.c
> > +++ b/drivers/gpu/drm/i915/i915_module.c
> > @@ -75,6 +75,8 @@ static const struct { }; static int init_progress;
> >
> > +MODULE_SOFTDEP("pre: mei_gsc_proxy mei_gsc");
> > +
> > static int __init i915_init(void)
> > {
> > int err, i;
> > diff --git a/drivers/gpu/drm/xe/xe_module.c
> > b/drivers/gpu/drm/xe/xe_module.c index bfc3deebdaa2..5633ea1841b7
> > 100644
> > --- a/drivers/gpu/drm/xe/xe_module.c
> > +++ b/drivers/gpu/drm/xe/xe_module.c
> > @@ -127,6 +127,8 @@ static void xe_call_exit_func(unsigned int i)
> > init_funcs[i].exit();
> > }
> >
> > +MODULE_SOFTDEP("pre: mei_gsc_proxy mei_gsc");
>
> Ok, I read it again, its " MEI modules depend on the i915/Xe driver ", should it be
> reverse? I got confused.
Yes, it should be reversed, thank you for pointing out, for more info you can see IGT patch: https://patchwork.freedesktop.org/series/137343/
Regards,
Krishna.
>
> > +
> > static int __init xe_init(void)
> > {
> > int err, i;
> > --
> > 2.25.1
More information about the Intel-xe
mailing list