From: Raag Jadav Date: Mon, 27 Apr 2026 09:29:27 +0000 (+0530) Subject: drm/xe/guc_pc: Reorder forcewake in xe_guc_pc_fini_hw() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8edb1f2c729c00a6d909897574e5f9b5faf02e94;p=thirdparty%2Fkernel%2Flinux.git drm/xe/guc_pc: Reorder forcewake in xe_guc_pc_fini_hw() xe_guc_pc_stop() doesn't perform any MMIO operation that requires forcewake in it's code path. Move it before pc_set_cur_freq() which writes to RPNSWREQ and actually requires it. Signed-off-by: Raag Jadav Reviewed-by: Rodrigo Vivi Link: https://patch.msgid.link/20260427092928.1181893-3-raag.jadav@intel.com Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 9530cddbd11de..59f2fa79ad422 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -1340,10 +1340,10 @@ static void xe_guc_pc_fini_hw(void *arg) if (xe_device_wedged(xe)) return; - CLASS(xe_force_wake, fw_ref)(gt_to_fw(pc_to_gt(pc)), XE_FW_GT); xe_guc_pc_stop(pc); /* Bind requested freq to mert_freq_cap before unload */ + CLASS(xe_force_wake, fw_ref)(gt_to_fw(pc_to_gt(pc)), XE_FW_GT); pc_set_cur_freq(pc, min(pc_max_freq_cap(pc), xe_guc_pc_get_rpe_freq(pc))); }