diff options
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; |