[PATCH v4] drm/xe/pmu: Add GT frequency events
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Mar 25 00:18:58 UTC 2025
On Mon, 24 Mar 2025 16:24:02 -0700, Vinay Belgaumkar wrote:
>
> @@ -266,11 +274,24 @@ static u64 __xe_pmu_event_read(struct perf_event *event)
> case XE_PMU_EVENT_ENGINE_ACTIVE_TICKS:
> case XE_PMU_EVENT_ENGINE_TOTAL_TICKS:
> return read_engine_events(gt, event);
> + case XE_PMU_EVENT_GT_ACTUAL_FREQUENCY:
> + return xe_guc_pc_get_act_freq(>->uc.guc.pc);
> + case XE_PMU_EVENT_GT_REQUESTED_FREQUENCY:
> + if (!xe_guc_pc_get_cur_freq(>->uc.guc.pc, &cur_gt_freq))
This is unconditionally taking the forcewake and waking the card up just to
get the sample. Do we really want to do that?
So if we don't do that, both the actual and requested freq will be 0 if gt
is in C6.
> + return cur_gt_freq;
More information about the Intel-xe
mailing list