pan/perf: Add timing related getters

These will be used by the pps-producer.
This commit is contained in:
Christoph Pillmayer 2026-03-20 11:40:39 +01:00
parent 2e6a34bf0e
commit 1afc465345
2 changed files with 27 additions and 0 deletions

View file

@ -111,3 +111,24 @@ pan_perf_dump(struct pan_perf *perf)
{
return pan_kmod_perf_dump(perf->session);
}
uint64_t
pan_perf_get_timestamp(const struct pan_perf *perf)
{
return perf->session->data_ts;
}
bool
pan_perf_timestamp_supported(const struct pan_perf *perf)
{
return perf->session->data_ts_supported;
}
uint64_t
pan_perf_get_min_sampling_period(const struct pan_perf *perf)
{
if (pan_arch(perf->dev->props.gpu_id) < 10)
return 1000000;
else
return 500000;
}

View file

@ -95,6 +95,12 @@ void pan_perf_finish(struct pan_perf *perf);
int pan_perf_dump(struct pan_perf *perf);
uint64_t pan_perf_get_timestamp(const struct pan_perf *perf);
bool pan_perf_timestamp_supported(const struct pan_perf *perf);
uint64_t pan_perf_get_min_sampling_period(const struct pan_perf *perf);
#if defined(__cplusplus)
} // extern "C"
#endif