[PATCH 3/5] drm/xe: Move xe_gt_init_early() where it belongs

Belgaumkar, Vinay vinay.belgaumkar at intel.com
Fri Apr 26 15:52:19 UTC 2024


On 4/25/2024 11:24 AM, Lucas De Marchi wrote:
> Early shall be early enough, stop doing other things with gt before it.
> Now that xe_gt_init_early() doesn't need forcewake and doesn't depend on
> the fake engine_mask initialization, move it where it belongs: it
> doesn't need to be after hwconfig config anymore.

LGTM,

Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>

>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_device.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index bb4fbae5edb6..8d04283b3617 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -566,6 +566,12 @@ int xe_device_probe(struct xe_device *xe)
>   
>   	xe_ttm_sys_mgr_init(xe);
>   
> +	for_each_gt(gt, xe, id) {
> +		err = xe_gt_init_early(gt);
> +		if (err)
> +			return err;
> +	}
> +
>   	for_each_gt(gt, xe, id)
>   		xe_force_wake_init_gt(gt, gt_to_fw(gt));
>   
> @@ -604,12 +610,6 @@ int xe_device_probe(struct xe_device *xe)
>   	if (err)
>   		goto err;
>   
> -	for_each_gt(gt, xe, id) {
> -		err = xe_gt_init_early(gt);
> -		if (err)
> -			goto err_irq_shutdown;
> -	}
> -
>   	err = xe_device_set_has_flat_ccs(xe);
>   	if (err)
>   		goto err_irq_shutdown;


More information about the Intel-xe mailing list