mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pan/perf: Add timing related getters
These will be used by the pps-producer.
This commit is contained in:
parent
2e6a34bf0e
commit
1afc465345
2 changed files with 27 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue