summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panfrost/panfrost_device.h
diff options
context:
space:
mode:
authorSteven Price <steven.price@arm.com>2019-10-25 14:41:43 +0100
committerRob Herring <robh@kernel.org>2019-10-29 13:01:51 -0500
commit9e62b885f71568d166c97b040b4b2e218c2a5584 (patch)
tree8512b086cf60f7ebb36fba61ff85628e75fcb119 /drivers/gpu/drm/panfrost/panfrost_device.h
parent221bc77914cbcccaac1918ba80dce807452e143d (diff)
downloadlinux-9e62b885f71568d166c97b040b4b2e218c2a5584.tar.bz2
drm/panfrost: Simplify devfreq utilisation tracking
Instead of tracking per-slot utilisation track a single value for the entire GPU. Ultimately it doesn't matter if the GPU is busy with only vertex or a combination of vertex and fragment processing - if it's busy then it's busy and devfreq should be scaling appropriately. This also makes way for being able to submit multiple jobs per slot which requires more values than the original boolean per slot. Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Steven Price <steven.price@arm.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191025134143.14324-3-steven.price@arm.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_device.h')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_device.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
index 72628f055197..06713811b92c 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.h
+++ b/drivers/gpu/drm/panfrost/panfrost_device.h
@@ -51,13 +51,6 @@ struct panfrost_features {
unsigned long hw_issues[64 / BITS_PER_LONG];
};
-struct panfrost_devfreq_slot {
- ktime_t busy_time;
- ktime_t idle_time;
- ktime_t time_last_update;
- bool busy;
-};
-
struct panfrost_device {
struct device *dev;
struct drm_device *ddev;
@@ -93,7 +86,10 @@ struct panfrost_device {
struct {
struct devfreq *devfreq;
struct thermal_cooling_device *cooling;
- struct panfrost_devfreq_slot slot[NUM_JOB_SLOTS];
+ ktime_t busy_time;
+ ktime_t idle_time;
+ ktime_t time_last_update;
+ atomic_t busy_count;
} devfreq;
};