From: "Wang, X" <x.wang@intel.com>
To: Shuicheng Lin <shuicheng.lin@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Matthew Auld <matthew.auld@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH] drm/xe/gt: Use CLASS() for forcewake in xe_gt_enable_comp_1wcoh
Date: Fri, 23 Jan 2026 10:29:54 -0800 [thread overview]
Message-ID: <3de99a54-eb3b-4464-8ef6-c42ddac7e486@intel.com> (raw)
In-Reply-To: <20260123180425.3262944-2-shuicheng.lin@intel.com>
On 1/23/2026 10:04, Shuicheng Lin wrote:
> Adopt the scoped forcewake management using CLASS(xe_force_wake, ...)
> to simplify the code and ensure proper resource release.
>
> Cc: Xin Wang <x.wang@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 9d090d0f2438..22132467ff4f 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -141,15 +141,14 @@ static void xe_gt_disable_host_l2_vram(struct xe_gt *gt)
> static void xe_gt_enable_comp_1wcoh(struct xe_gt *gt)
> {
> struct xe_device *xe = gt_to_xe(gt);
> - unsigned int fw_ref;
> u32 reg;
>
> if (IS_SRIOV_VF(xe))
> return;
>
> if (GRAPHICS_VER(xe) >= 30 && xe->info.has_flat_ccs) {
> - fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> - if (!fw_ref)
> + CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FW_GT);
> + if (!fw_ref.domains)
> return;
>
> reg = xe_gt_mcr_unicast_read_any(gt, XE2_GAMREQSTRM_CTRL);
> @@ -163,8 +162,6 @@ static void xe_gt_enable_comp_1wcoh(struct xe_gt *gt)
> reg |= EN_CMP_1WCOH_GW;
> xe_gt_mcr_multicast_write(gt, XE2_GAMWALK_CTRL_3D, reg);
> }
> -
> - xe_force_wake_put(gt_to_fw(gt), fw_ref);
Thanks for the fix, LGTM.
Reviewed-by: Xin Wang <x.wang@intel.com>
> }
> }
>
next prev parent reply other threads:[~2026-01-23 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 18:04 [PATCH] drm/xe/gt: Use CLASS() for forcewake in xe_gt_enable_comp_1wcoh Shuicheng Lin
2026-01-23 18:29 ` Wang, X [this message]
2026-01-23 18:46 ` ✓ CI.KUnit: success for " Patchwork
2026-01-23 19:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-23 21:34 ` [PATCH] " Matt Roper
2026-01-24 4:29 ` ✗ Xe.CI.Full: failure for " Patchwork
2026-01-29 2:19 ` Lin, Shuicheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3de99a54-eb3b-4464-8ef6-c42ddac7e486@intel.com \
--to=x.wang@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=shuicheng.lin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox