diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-31 06:49:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:19 -0400 |
commit | 42852f182a783e7bcd157fa0a9390c77e9376a60 (patch) | |
tree | 1a781297018d65c5ef9c5b5aa61b44639f5a0ae2 /drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h | |
parent | 468d6888fc6db207cb239e270752f3f8f2f0ed87 (diff) |
gpu: nvgpu: use nvgpu list for cycle stats snapshot clients
Use nvgpu list APIs instead of linux list APIs
for cycle stats snapshot clients list
Jira NVGPU-13
Change-Id: I124812b70ca8deb26ee1644d4d79cc404fd2aed9
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1454010
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h index be638abf..d6cea7c6 100644 --- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.h | |||
@@ -88,7 +88,7 @@ struct gk20a_cs_snapshot_fifo_entry { | |||
88 | 88 | ||
89 | /* cycle stats snapshot client data (e.g. associated with channel) */ | 89 | /* cycle stats snapshot client data (e.g. associated with channel) */ |
90 | struct gk20a_cs_snapshot_client { | 90 | struct gk20a_cs_snapshot_client { |
91 | struct list_head list; | 91 | struct nvgpu_list_node list; |
92 | u32 dmabuf_fd; | 92 | u32 dmabuf_fd; |
93 | struct dma_buf *dma_handler; | 93 | struct dma_buf *dma_handler; |
94 | struct gk20a_cs_snapshot_fifo *snapshot; | 94 | struct gk20a_cs_snapshot_fifo *snapshot; |
@@ -97,6 +97,13 @@ struct gk20a_cs_snapshot_client { | |||
97 | u32 perfmon_count; | 97 | u32 perfmon_count; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static inline struct gk20a_cs_snapshot_client * | ||
101 | gk20a_cs_snapshot_client_from_list(struct nvgpu_list_node *node) | ||
102 | { | ||
103 | return (struct gk20a_cs_snapshot_client *) | ||
104 | ((uintptr_t)node - offsetof(struct gk20a_cs_snapshot_client, list)); | ||
105 | }; | ||
106 | |||
100 | /* should correlate with size of gk20a_cs_snapshot_fifo_entry::perfmon_id */ | 107 | /* should correlate with size of gk20a_cs_snapshot_fifo_entry::perfmon_id */ |
101 | #define CSS_MAX_PERFMON_IDS 256 | 108 | #define CSS_MAX_PERFMON_IDS 256 |
102 | 109 | ||
@@ -106,7 +113,7 @@ struct gk20a_cs_snapshot_client { | |||
106 | /* cycle stats snapshot control structure for one HW entry and many clients */ | 113 | /* cycle stats snapshot control structure for one HW entry and many clients */ |
107 | struct gk20a_cs_snapshot { | 114 | struct gk20a_cs_snapshot { |
108 | unsigned long perfmon_ids[PM_BITMAP_SIZE]; | 115 | unsigned long perfmon_ids[PM_BITMAP_SIZE]; |
109 | struct list_head clients; | 116 | struct nvgpu_list_node clients; |
110 | struct mem_desc hw_memdesc; | 117 | struct mem_desc hw_memdesc; |
111 | /* pointer to allocated cpu_va memory where GPU place data */ | 118 | /* pointer to allocated cpu_va memory where GPU place data */ |
112 | struct gk20a_cs_snapshot_fifo_entry *hw_snapshot; | 119 | struct gk20a_cs_snapshot_fifo_entry *hw_snapshot; |