mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
drm/xe/guc: Drop helper to read freq
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user