summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarad Gautam <varadgautam@google.com>2023-07-25 13:10:02 +0000
committerVarad Gautam <varadgautam@google.com>2023-09-19 14:51:42 +0000
commit869556c931d81867b14a130a838a70d6561b9ba8 (patch)
treedc7ea2ca711185b772526f5bc20d86b24267ba8b
parent47828111cebaee9914c4ffaf1ea3faffcf4b03d0 (diff)
downloadgpu-869556c931d81867b14a130a838a70d6561b9ba8.tar.gz
mali_kbase: Add tracepoints to hint_min_freq / hint_max_freq
Bug: 291855615 Test: Record manual trace. Signed-off-by: Varad Gautam <varadgautam@google.com> Change-Id: Id4341c3809b2e3b147122adaabaa01ac7b265dfc
-rw-r--r--mali_kbase/platform/pixel/pixel_gpu_sysfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
index c816460..f6164f9 100644
--- a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
+++ b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
@@ -7,6 +7,7 @@
/* Mali core includes */
#include <mali_kbase.h>
+#include <trace/events/power.h>
/* Pixel integration includes */
#include "mali_kbase_config_platform.h"
@@ -445,6 +446,8 @@ static ssize_t hint_max_freq_store(struct device *dev, struct device_attribute *
if (level < 0)
return -EINVAL;
+ trace_clock_set_rate("gpu_hint_max", clock, raw_smp_processor_id());
+
mutex_lock(&pc->dvfs.lock);
gpu_dvfs_update_level_lock(kbdev, GPU_DVFS_LEVEL_LOCK_HINT, -1, level);
gpu_dvfs_select_level(kbdev);
@@ -489,6 +492,8 @@ static ssize_t hint_min_freq_store(struct device *dev, struct device_attribute *
if (level < 0)
return -EINVAL;
+ trace_clock_set_rate("gpu_hint_min", clock, raw_smp_processor_id());
+
mutex_lock(&pc->dvfs.lock);
gpu_dvfs_update_level_lock(kbdev, GPU_DVFS_LEVEL_LOCK_HINT, level, -1);
gpu_dvfs_select_level(kbdev);