[PATCH v8 06/26] drm/xe/device: Update handling of xe_force_wake_get return

Jani Nikula jani.nikula at linux.intel.com
Wed Oct 9 11:30:56 UTC 2024


On Tue, 08 Oct 2024, Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com> wrote:
>  void xe_device_l2_flush(struct xe_device *xe)
>  {
>  	struct xe_gt *gt;
> -	int err;
> +	uint fw_ref;

uint?

>  
>  	gt = xe_root_mmio_gt(xe);
>  
>  	if (!XE_WA(gt, 16023588340))
>  		return;
>  
> -	err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> -	if (err)
> +	fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> +	if (!fw_ref)
>  		return;
>  
>  	spin_lock(&gt->global_invl_lock);
> @@ -929,7 +932,7 @@ void xe_device_l2_flush(struct xe_device *xe)
>  		xe_gt_err_once(gt, "Global invalidation timeout\n");
>  	spin_unlock(&gt->global_invl_lock);
>  
> -	xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> +	xe_force_wake_put(gt_to_fw(gt), fw_ref);
>  }
>  
>  u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size)

-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list