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:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user