freedreno/perfetto+fdperf: Set SYSPROF param

No need to check error return and deal with older kernels.  Older
kernels won't have this param but their default behavior allows for
systemwide perfcntr collection.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15236>
This commit is contained in:
Rob Clark 2022-03-03 15:38:22 -08:00
parent af4b7f74b2
commit e9cd4fba6f
2 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,8 @@ FreedrenoDriver::init_perfcnt()
has_suspend_count = true;
}
fd_pipe_set_param(pipe, FD_SYSPROF, 1);
perfcntrs = fd_perfcntrs(fd_pipe_dev_id(pipe), &num_perfcntrs);
if (num_perfcntrs == 0) {
PERFETTO_FATAL("No hw counters available");

View File

@ -159,6 +159,8 @@ find_device(void)
if (!dev.io) {
err(1, "could not map device");
}
fd_pipe_set_param(dev.pipe, FD_SYSPROF, 1);
}
/*