[PATCH v1] drm/xe/guc: Disable lite restore for MTL

Michal Wajdeczko michal.wajdeczko at intel.com
Tue Mar 18 14:35:37 UTC 2025



On 18.03.2025 15:18, Zhanjun Dong wrote:
> Lite restore for MTL is not POR for Xe, then disable it for MTL.
> 
> Signed-off-by: Zhanjun Dong <zhanjun.dong at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index bc5714a5b36b..0c2629e578d9 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -80,7 +80,9 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
>  
>  static u32 guc_ctl_feature_flags(struct xe_guc *guc)
>  {
> -	u32 flags = GUC_CTL_ENABLE_LITE_RESTORE;
> +	u32 flags = (guc_to_xe(guc)->info.platform == XE_METEORLAKE) ?
> +		    0 : GUC_CTL_ENABLE_LITE_RESTORE;
> +

please avoid long conditional initialization code,
all this could be done in a simpler/unified way:

	struct xe_device *xe = guc_to_xe(guc);
	u32 flags = 0;

	if (xe->info.platform != XE_METEORLAKE)
		flags |= GUC_CTL_ENABLE_LITE_RESTORE;

>  
>  	if (!guc_to_xe(guc)->info.skip_guc_pc)
>  		flags |= GUC_CTL_ENABLE_SLPC;



More information about the Intel-xe mailing list