diff options
author | Kevin DuBois <kevindubois@google.com> | 2021-02-04 08:16:59 -0800 |
---|---|---|
committer | Kevin DuBois <kevindubois@google.com> | 2021-03-11 23:18:30 +0000 |
commit | 75c4015bf2f845f1aac1e51f7a6daf910b517b2e (patch) | |
tree | 02dc58910f0bf8abece8391632e5ac27a10fb455 /mali_kbase/platform/pixel/pixel_gpu_sysfs.c | |
parent | 54fa93829ad98b7a1bab0a99eb96e29b7638c5b7 (diff) | |
download | gpu-75c4015bf2f845f1aac1e51f7a6daf910b517b2e.tar.gz |
mali_kbase: dvfs: add min gpu level for compute.
Adds a DTBO entry that can be used to set the minimum dvfs OPP when
compute contexts are detected running. This effectively uses compute as
a proxy signal that there are realtime workloads present
Bug: 178234323
Test: tflite does up gpu frequency.
Test: UI does not up gpu frequency.
Change-Id: Iea8e03e242cee9451ef8500df060b53607789f2b
Diffstat (limited to 'mali_kbase/platform/pixel/pixel_gpu_sysfs.c')
-rw-r--r-- | mali_kbase/platform/pixel/pixel_gpu_sysfs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c index d475b7c..45b07da 100644 --- a/mali_kbase/platform/pixel/pixel_gpu_sysfs.c +++ b/mali_kbase/platform/pixel/pixel_gpu_sysfs.c @@ -410,6 +410,19 @@ static ssize_t min_freq_show(struct device *dev, struct device_attribute *attr, return scnprintf(buf, PAGE_SIZE, "%d\n", pc->dvfs.table[pc->dvfs.level_min].clk1); } +static ssize_t scaling_min_compute_freq_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct kbase_device *kbdev = dev->driver_data; + struct pixel_context *pc = kbdev->platform_context; + + if (!pc) + return -ENODEV; + + return scnprintf(buf, PAGE_SIZE, "%d\n", + pc->dvfs.table[pc->dvfs.level_scaling_compute_min].clk1); +} + static ssize_t scaling_max_freq_show(struct device *dev, struct device_attribute *attr, char *buf) { struct kbase_device *kbdev = dev->driver_data; @@ -596,6 +609,7 @@ DEVICE_ATTR_RO(available_frequencies); DEVICE_ATTR_RO(cur_freq); DEVICE_ATTR_RO(max_freq); DEVICE_ATTR_RO(min_freq); +DEVICE_ATTR_RO(scaling_min_compute_freq); DEVICE_ATTR_RW(scaling_max_freq); DEVICE_ATTR_RW(scaling_min_freq); DEVICE_ATTR_RO(time_in_state); @@ -627,6 +641,7 @@ static struct { { "cur_freq", &dev_attr_cur_freq }, { "max_freq", &dev_attr_max_freq }, { "min_freq", &dev_attr_min_freq }, + { "min_compute_freq", &dev_attr_scaling_min_compute_freq }, { "scaling_max_freq", &dev_attr_scaling_max_freq }, { "scaling_min_freq", &dev_attr_scaling_min_freq }, { "time_in_state", &dev_attr_time_in_state }, |