[PATCH] drm/xe: Always check force_wake_get return code

Jani Nikula jani.nikula at linux.intel.com
Wed Mar 13 08:31:44 UTC 2024


On Tue, 12 Mar 2024, Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com> wrote:
> diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
> index d9aa815a5bc2..902c52d95a8a 100644
> --- a/drivers/gpu/drm/xe/xe_gsc.c
> +++ b/drivers/gpu/drm/xe/xe_gsc.c
> @@ -287,7 +287,7 @@ static void gsc_work(struct work_struct *work)
>  	spin_unlock_irq(&gsc->lock);
>  
>  	xe_pm_runtime_get(xe);
> -	xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC);
> +	XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC));

Up to the xe maintainers to decide, but I'm really not a fan of hiding
functionality inside warn ons. My approach usually is, would it work if
all the warns were removed? If yes, it's good. If not, maybe reconsider.

BR,
Jani.


-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list