[Intel-gfx] [DMC_REDESIGN_V2 07/14] drm/i915/gen9: Simplify csr loading failure printing.

Marc Herbert Marc.Herbert at intel.com
Tue Oct 6 12:38:00 PDT 2015


On 30/09/15 07:28, Imre Deak wrote:
> On ke, 2015-08-26 at 16:58 +0530, Animesh Manna wrote:
>>
>> -void i915_firmware_load_error_print(const char *fw_path, int err)
>> -{
>> -	DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err);
>> -
>> -	/*
>> -	 * If the reason is not known assume -ENOENT since that's the most
>> -	 * usual failure mode.
>> -	 */
>> -	if (!err)
>> -		err = -ENOENT;
>> -
>> -	if (!(IS_BUILTIN(CONFIG_DRM_I915) && err == -ENOENT))
>> -		return;
>> -
>> -	DRM_ERROR(
>> -	  "The driver is built-in, so to load the firmware you need to\n"
>> -	  "include it either in the kernel (see CONFIG_EXTRA_FIRMWARE) or\n"
>> -	  "in your initrd/initramfs image.\n");
>> -}
>> -
>
> The point here was to clarify the reason why the loading failed, since
> that caused quite a confusion. It was a separate function since the same
> could've been called from the GuC loader too. I think the error message
> would be still useful.

Agreed 100%. The code of this function was a bit confusing, however this 
error message has proved very useful "on the field" many times already. 
Please preserve the message.




More information about the Intel-gfx mailing list