[PATCH v4 02/11] drm/xe: Print module init abort code

Michal Wajdeczko michal.wajdeczko at intel.com
Mon Jul 28 19:51:12 UTC 2025



On 7/28/2025 9:39 PM, Rodrigo Vivi wrote:
> On Sun, Jul 27, 2025 at 07:19:59PM +0200, Michal Wajdeczko wrote:
>> We should provide a hint to the user why the module refused to
>> load. This will also allow us to drop individual error messages
>> from init steps.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_module.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
>> index 593bc9e5851a..23be7c4cfde1 100644
>> --- a/drivers/gpu/drm/xe/xe_module.c
>> +++ b/drivers/gpu/drm/xe/xe_module.c
>> @@ -155,6 +155,8 @@ static int __init xe_init(void)
>>  	for (i = 0; i < ARRAY_SIZE(init_funcs); i++) {
>>  		err = xe_call_init_func(&init_funcs[i]);
>>  		if (err) {
>> +			pr_info("%s: module_init aborted at %ps %pe\n",
>> +				DRIVER_NAME, init_funcs[i].init, ERR_PTR(err));
> 
> pr_err ?!

that was also my first choice, but then noticed

	.init = xe_check_nomodeset,

which is used to skip driver load on purpose, but not due
to a real error, so I decided to switch back to pr_info

but if you insist ...

> 
>>  			while (i--)
>>  				xe_call_exit_func(&init_funcs[i]);
>>  			return err;
>> -- 
>> 2.47.1
>>



More information about the Intel-xe mailing list