diff options
author | Ankit Goyal <layog@google.com> | 2021-07-22 17:43:43 +0800 |
---|---|---|
committer | Ankit Goyal <layog@google.com> | 2021-07-23 17:08:44 +0000 |
commit | d11022e2a8851737b87e32eba8afe495b2a39f72 (patch) | |
tree | 2ca942c93cd1ba0dafd8822a2639c083315c1177 /mali_kbase/mali_kbase_defs.h | |
parent | 17749634b3f1e8e7c2fa4e04e65b778259e1ba86 (diff) | |
download | gpu-d11022e2a8851737b87e32eba8afe495b2a39f72.tar.gz |
Revert "Revert "mali_kbase: platform: Add per-process and global account...""
This reverts commit 7bdbdbf497a4745d24b857e9bd066845682885a0.
Bug: 191966412
Signed-off-by: Ankit Goyal <layog@google.com>
Change-Id: I5986c4b612b882e85cf5e648812a9e6b5d0b4176
Diffstat (limited to 'mali_kbase/mali_kbase_defs.h')
-rw-r--r-- | mali_kbase/mali_kbase_defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mali_kbase/mali_kbase_defs.h b/mali_kbase/mali_kbase_defs.h index fd2ae1e..e072822 100644 --- a/mali_kbase/mali_kbase_defs.h +++ b/mali_kbase/mali_kbase_defs.h @@ -617,6 +617,9 @@ struct kbase_devfreq_queue_info { * @total_gpu_pages: Total gpu pages allocated across all the contexts * of this process, it accounts for both native allocations * and dma_buf imported allocations. + * @dma_buf_pages: Total dma_buf pages allocated across all the contexts + * of this process, native allocations can be accounted for + * by subtracting this from &total_gpu_pages. * @kctx_list: List of kbase contexts created for the process. * @kprcs_node: Node to a rb_tree, kbase_device will maintain a rb_tree * based on key tgid, kprcs_node is the node link to @@ -630,6 +633,7 @@ struct kbase_devfreq_queue_info { struct kbase_process { pid_t tgid; size_t total_gpu_pages; + size_t dma_buf_pages; struct list_head kctx_list; struct rb_node kprcs_node; @@ -926,6 +930,7 @@ struct kbase_process { * mapping and gpu memory usage at device level and * other one at process level. * @total_gpu_pages: Total GPU pages used for the complete GPU device. + * @dma_buf_pages: Total dma_buf pages used for GPU platform device. * @dma_buf_lock: This mutex should be held while accounting for * @total_gpu_pages from imported dma buffers. * @gpu_mem_usage_lock: This spinlock should be held while accounting @@ -1206,6 +1211,7 @@ struct kbase_device { struct rb_root dma_buf_root; size_t total_gpu_pages; + size_t dma_buf_pages; struct mutex dma_buf_lock; spinlock_t gpu_mem_usage_lock; |