[PATCH 1/2] drm/xe: Always allow to override firmware

Francois Dugast francois.dugast at intel.com
Fri Feb 2 11:50:22 UTC 2024


On Thu, Feb 01, 2024 at 02:47:23PM -0800, Lucas De Marchi wrote:
> The current logic for firmware selection is reminiscent from i915 where
> there are 2 backends and several platforms support only 1: execlist or
> GuC. The xe driver has only the GuC backend and it simply doesn't work
> without it. Allow developers to override the firmware path even if there
> isn't a firmware entry in the table yet: this allows developers to more
> easily test the very first firmware before adding it there.
> 
> The justification above is only true for GuC, however those override
> paths should really be viewed as developer aid param. Simply make the
> same logic for all firmwares and allow the override path to be used
> for all of them.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Francois Dugast <francois.dugast at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_uc_fw.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 8debea47a5b4..c7541f1a5c0b 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -660,6 +660,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  	xe_assert(xe, !uc_fw->path);
>  
>  	uc_fw_auto_select(xe, uc_fw);
> +	uc_fw_override(uc_fw);
>  	xe_uc_fw_change_status(uc_fw, uc_fw->path ?
>  			       XE_UC_FIRMWARE_SELECTED :
>  			       XE_UC_FIRMWARE_NOT_SUPPORTED);
> @@ -667,8 +668,6 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  	if (!xe_uc_fw_is_supported(uc_fw))
>  		return 0;
>  
> -	uc_fw_override(uc_fw);
> -
>  	/* an empty path means the firmware is disabled */
>  	if (!xe_device_uc_enabled(xe) || !(*uc_fw->path)) {
>  		xe_uc_fw_change_status(uc_fw, XE_UC_FIRMWARE_DISABLED);
> -- 
> 2.43.0
> 


More information about the Intel-xe mailing list