]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/guc: Drop helper to read freq
authorLucas De Marchi <lucas.demarchi@intel.com>
Mon, 22 Sep 2025 19:58:31 +0000 (12:58 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 25 Sep 2025 04:23:19 +0000 (21:23 -0700)
As the forcewake is already held during GuC load, there's no need to use
a helper function to call xe_guc_pc_get_cur_freq(). Just call
xe_guc_pc_get_cur_freq_fw() directly.

Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20250922-xe-iopoll-v4-3-06438311a63f@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_guc.c

index 00789844ea4d03496aa884b22f6a4cfd89d0acd7..708e08fb0779fdec1d3222f266c5c41336f8e493 100644 (file)
@@ -1017,14 +1017,6 @@ static int guc_load_done(u32 status)
        return 0;
 }
 
-static s32 guc_pc_get_cur_freq(struct xe_guc_pc *guc_pc)
-{
-       u32 freq;
-       int ret = xe_guc_pc_get_cur_freq(guc_pc, &freq);
-
-       return ret ? ret : freq;
-}
-
 /*
  * Wait for the GuC to start up.
  *
@@ -1102,7 +1094,7 @@ static int guc_wait_ucode(struct xe_guc *guc)
 
                xe_gt_dbg(gt, "load still in progress, timeouts = %d, freq = %dMHz (req %dMHz), status = 0x%08X [0x%02X/%02X]\n",
                          count, xe_guc_pc_get_act_freq(guc_pc),
-                         guc_pc_get_cur_freq(guc_pc), status,
+                         xe_guc_pc_get_cur_freq_fw(guc_pc), status,
                          REG_FIELD_GET(GS_BOOTROM_MASK, status),
                          REG_FIELD_GET(GS_UKERNEL_MASK, status));
        } while (1);
@@ -1113,7 +1105,7 @@ static int guc_wait_ucode(struct xe_guc *guc)
 
                xe_gt_err(gt, "load failed: status = 0x%08X, time = %lldms, freq = %dMHz (req %dMHz), done = %d\n",
                          status, delta_ms, xe_guc_pc_get_act_freq(guc_pc),
-                         guc_pc_get_cur_freq(guc_pc), load_done);
+                         xe_guc_pc_get_cur_freq_fw(guc_pc), load_done);
                xe_gt_err(gt, "load failed: status: Reset = %d, BootROM = 0x%02X, UKernel = 0x%02X, MIA = 0x%02X, Auth = 0x%02X\n",
                          REG_FIELD_GET(GS_MIA_IN_RESET, status),
                          bootrom, ukernel,
@@ -1167,11 +1159,11 @@ static int guc_wait_ucode(struct xe_guc *guc)
                xe_gt_warn(gt, "excessive init time: %lldms! [status = 0x%08X, timeouts = %d]\n",
                           delta_ms, status, count);
                xe_gt_warn(gt, "excessive init time: [freq = %dMHz (req = %dMHz), before = %dMHz, perf_limit_reasons = 0x%08X]\n",
-                          xe_guc_pc_get_act_freq(guc_pc), guc_pc_get_cur_freq(guc_pc),
+                          xe_guc_pc_get_act_freq(guc_pc), xe_guc_pc_get_cur_freq_fw(guc_pc),
                           before_freq, xe_gt_throttle_get_limit_reasons(gt));
        } else {
                xe_gt_dbg(gt, "init took %lldms, freq = %dMHz (req = %dMHz), before = %dMHz, status = 0x%08X, timeouts = %d\n",
-                         delta_ms, xe_guc_pc_get_act_freq(guc_pc), guc_pc_get_cur_freq(guc_pc),
+                         delta_ms, xe_guc_pc_get_act_freq(guc_pc), xe_guc_pc_get_cur_freq_fw(guc_pc),
                          before_freq, status, count);
        }