[PATCH 3/9] drm/xe: Switch from xe to devm actions

Cavitt, Jonathan jonathan.cavitt at intel.com
Fri Feb 14 22:18:35 UTC 2025


-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Lucas De Marchi
Sent: Friday, February 14, 2025 1:23 PM
To: intel-xe at lists.freedesktop.org
Cc: De Marchi, Lucas <lucas.demarchi at intel.com>
Subject: [PATCH 3/9] drm/xe: Switch from xe to devm actions
> 
> Now that component drivers are compatible with devm, switch to using it
> instead of our own.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Looks good to me, though since we removed all calls to
xe_device_add_action_or_reset in this patch, we may want
to consider removing the declaration here (I.E. take the
removal from patch 4 and do it here).  Alternatively, we
should probably just squash this with patch 4 in this series.

But besides that:
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 2 +-
>  drivers/gpu/drm/xe/xe_gsc_proxy.c       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index f2064cfb55cf2..5ad2c99a9ae74 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -184,7 +184,7 @@ int xe_display_init(struct xe_device *xe)
>  	if (err)
>  		return err;
>  
> -	return xe_device_add_action_or_reset(xe, xe_display_fini, xe);
> +	return devm_add_action_or_reset(xe->drm.dev, xe_display_fini, xe);
>  }
>  
>  void xe_display_register(struct xe_device *xe)
> diff --git a/drivers/gpu/drm/xe/xe_gsc_proxy.c b/drivers/gpu/drm/xe/xe_gsc_proxy.c
> index 31c90577faf0b..8cf70b228ff3b 100644
> --- a/drivers/gpu/drm/xe/xe_gsc_proxy.c
> +++ b/drivers/gpu/drm/xe/xe_gsc_proxy.c
> @@ -490,7 +490,7 @@ int xe_gsc_proxy_init(struct xe_gsc *gsc)
>  
>  	gsc->proxy.component_added = true;
>  
> -	return xe_device_add_action_or_reset(xe, xe_gsc_proxy_remove, gsc);
> +	return devm_add_action_or_reset(xe->drm.dev, xe_gsc_proxy_remove, gsc);
>  }
>  
>  /**
> -- 
> 2.48.1
> 
> 


More information about the Intel-xe mailing list