mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pan/pps: Generalize timing related settings
This commit is contained in:
parent
1afc465345
commit
fd5b441d35
1 changed files with 14 additions and 4 deletions
|
|
@ -69,17 +69,22 @@ bool
|
|||
PanfrostPerf::dump_perfcnt()
|
||||
{
|
||||
assert(perf);
|
||||
last_dump_ts = perfetto::base::GetBootTimeNs().count();
|
||||
|
||||
int ret = pan_perf_dump(perf);
|
||||
|
||||
if (pan_perf_timestamp_supported(perf))
|
||||
last_dump_ts = pan_perf_get_timestamp(perf);
|
||||
else
|
||||
last_dump_ts = perfetto::base::GetBootTimeNs().count();
|
||||
|
||||
return !!(ret >= 0);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
PanfrostPerf::get_min_sampling_period_ns()
|
||||
{
|
||||
return 1000000;
|
||||
assert(perf);
|
||||
return pan_perf_get_min_sampling_period(perf);
|
||||
}
|
||||
|
||||
void *
|
||||
|
|
@ -196,19 +201,24 @@ PanfrostPerf::next()
|
|||
uint32_t
|
||||
PanfrostPerf::gpu_clock_id() const
|
||||
{
|
||||
return perfetto::protos::pbzero::BUILTIN_CLOCK_BOOTTIME;
|
||||
assert(perf);
|
||||
if (pan_perf_timestamp_supported(perf))
|
||||
return perfetto::protos::pbzero::BUILTIN_CLOCK_MONOTONIC_RAW;
|
||||
else
|
||||
return perfetto::protos::pbzero::BUILTIN_CLOCK_BOOTTIME;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
PanfrostPerf::gpu_timestamp() const
|
||||
{
|
||||
// TODO (panthor) This information is present in the dump
|
||||
return perfetto::base::GetBootTimeNs().count();
|
||||
}
|
||||
|
||||
bool
|
||||
PanfrostPerf::cpu_gpu_timestamp(uint64_t &, uint64_t &) const
|
||||
{
|
||||
/* Not supported */
|
||||
// TODO (panthor) Start using the appropriate IOCTL to get these values
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue