[Intel-xe] [PATCH v3 12/20] drm/xe: Move force_wake init to earlier point in probe

Matt Roper matthew.d.roper at intel.com
Wed Nov 15 21:59:05 UTC 2023


On Tue, Nov 14, 2023 at 02:02:23PM +0100, Michał Winiarski wrote:
> GuC will need to be loaded earlier during probe. And in order to load
> GuC, being able to take the forcewake is going to be needed.
> 
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device.c | 3 +++
>  drivers/gpu/drm/xe/xe_gt.c     | 2 --
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index a89b5a32c093d..fde597fe0b513 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -404,6 +404,9 @@ int xe_device_probe(struct xe_device *xe)
>  
>  	xe_ttm_sys_mgr_init(xe);
>  
> +	for_each_gt(gt, xe, id)
> +		xe_force_wake_init_gt(gt, gt_to_fw(gt));
> +
>  	err = drmm_add_action_or_reset(&xe->drm, xe_driver_flr_fini, xe);
>  	if (err)
>  		return err;
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 6c885dde5d59c..c8e2689873c37 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -292,8 +292,6 @@ int xe_gt_init_early(struct xe_gt *gt)
>  {
>  	int err;
>  
> -	xe_force_wake_init_gt(gt, gt_to_fw(gt));
> -
>  	err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
>  	if (err)
>  		return err;
> -- 
> 2.42.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list