summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_defs.h
diff options
context:
space:
mode:
authorAnkit Goyal <layog@google.com>2021-07-13 17:21:51 +0800
committerAnkit Goyal <layog@google.com>2021-07-21 21:26:08 +0800
commit620019f26cee4f69c33fc0861a7975f50b7ce8b3 (patch)
tree35f557f1998a07f4eb35f05390250d8a3e91f63e /mali_kbase/mali_kbase_defs.h
parentced6904b8892e23333566105d5266515532a9c2c (diff)
downloadgpu-620019f26cee4f69c33fc0861a7975f50b7ce8b3.tar.gz
mali_kbase: platform: Add per-process and global sysfs nodes for GPU mem usage
Bug: 191966412 Signed-off-by: Ankit Goyal <layog@google.com> Change-Id: Id47feadaf9da7ef8e22494ab64e6263d7f87213c
Diffstat (limited to 'mali_kbase/mali_kbase_defs.h')
-rw-r--r--mali_kbase/mali_kbase_defs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mali_kbase/mali_kbase_defs.h b/mali_kbase/mali_kbase_defs.h
index 97c03cd..b01345b 100644
--- a/mali_kbase/mali_kbase_defs.h
+++ b/mali_kbase/mali_kbase_defs.h
@@ -629,6 +629,8 @@ struct kbase_devfreq_queue_info {
* Used to ensure that pages of allocation are accounted
* only once for the process, even if the allocation gets
* imported multiple times for the process.
+ * @kobj: Links to the per-process sysfs node
+ * &kbase_device.proc_sysfs_node.
*/
struct kbase_process {
pid_t tgid;
@@ -638,6 +640,8 @@ struct kbase_process {
struct rb_node kprcs_node;
struct rb_root dma_buf_root;
+
+ struct kobject kobj;
};
/**
@@ -960,6 +964,7 @@ struct kbase_process {
* @pcm_dev: The priority control manager device.
* @oom_notifier_block: notifier_block containing kernel-registered out-of-
* memory handler.
+ * @proc_sysfs_node: Sysfs directory node to store per-process stats.
*/
struct kbase_device {
u32 hw_quirks_sc;
@@ -1230,6 +1235,8 @@ struct kbase_device {
struct priority_control_manager_device *pcm_dev;
struct notifier_block oom_notifier_block;
+
+ struct kobject *proc_sysfs_node;
};
/**