[Intel-xe] [PATCH] drm/xe: Donot apply forcewake while reading actual frequency
Gupta, Anshuman
anshuman.gupta at intel.com
Wed Jun 7 11:52:17 UTC 2023
> -----Original Message-----
> From: Nilawar, Badal <badal.nilawar at intel.com>
> Sent: Wednesday, June 7, 2023 1:40 PM
> To: intel-xe at lists.freedesktop.org
> Cc: Gupta, Anshuman <anshuman.gupta at intel.com>; Belgaumkar, Vinay
> <vinay.belgaumkar at intel.com>
> Subject: [PATCH] drm/xe: Donot apply forcewake while reading actual
> frequency
>
> The registers RPSTAT1, MTL_MIRROR_TARGET_WP1 doesn't fall under any of
> the forcewake domain so doesn't require forcewake to be read.
> When GT in RC6 frequency reported will be 0.
Please mention Bspec index.
>
> Fixes: 7dbca224f176 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Checkpatch has warned on avoce commit hash.
Br,
Anshuman.
>
> Signed-off-by: Badal Nilawar <badal.nilawar at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_pc.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c
> b/drivers/gpu/drm/xe/xe_guc_pc.c index 67faa9ee0006..d04600b943e4
> 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -371,14 +371,8 @@ static ssize_t freq_act_show(struct device *dev,
> ssize_t ret;
>
> xe_device_mem_access_get(gt_to_xe(gt));
> - /*
> - * When in RC6, actual frequency is 0. Let's block RC6 so we are able
> - * to verify that our freq requests are really happening.
> - */
> - ret = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> - if (ret)
> - goto out;
>
> + /* When in RC6, actual frequency reported will be 0. */
> if (xe->info.platform == XE_METEORLAKE) {
> freq = xe_mmio_read32(gt, MTL_MIRROR_TARGET_WP1);
> freq = REG_FIELD_GET(MTL_CAGF_MASK, freq); @@ -389,8
> +383,6 @@ static ssize_t freq_act_show(struct device *dev,
>
> ret = sysfs_emit(buf, "%d\n", decode_freq(freq));
>
> - XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
> XE_FORCEWAKE_ALL));
> -out:
> xe_device_mem_access_put(gt_to_xe(gt));
> return ret;
> }
> --
> 2.25.1
More information about the Intel-xe
mailing list