[PATCH 4/5] drm/xe: Move xe_force_wake_init_gt() inside gt initialization

Rodrigo Vivi rodrigo.vivi at intel.com
Mon Apr 29 20:25:15 UTC 2024


On Thu, Apr 25, 2024 at 11:24:09AM -0700, Lucas De Marchi wrote:
> xe_force_wake_init_gt() is a software-only initialization and doesn't
> need to be called from xe_device_probe(). Move it to initialize
> together with the gt.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device.c | 3 ---
>  drivers/gpu/drm/xe/xe_gt.c     | 2 ++
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 8d04283b3617..d090c4e7d57a 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -572,9 +572,6 @@ int xe_device_probe(struct xe_device *xe)
>  			return err;
>  	}
>  
> -	for_each_gt(gt, xe, id)
> -		xe_force_wake_init_gt(gt, gt_to_fw(gt));
> -
>  	for_each_tile(tile, xe, id) {
>  		err = xe_ggtt_init_early(tile->mem.ggtt);
>  		if (err)
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 805fd0acfc03..2e8efce2799a 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -328,6 +328,8 @@ int xe_gt_init_early(struct xe_gt *gt)
>  	xe_wa_process_oob(gt);
>  	xe_tuning_process_gt(gt);
>  
> +	xe_force_wake_init_gt(gt, gt_to_fw(gt));
> +
>  	return 0;
>  }
>  
> -- 
> 2.43.0
> 


More information about the Intel-xe mailing list