summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-01-24 08:30:42 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-02-22 07:15:02 -0500
commit8ee3aa4b3175d8d27e57a0f5d5e2cdf3d78a4a58 (patch)
tree505dfd2ea2aca2f1cbdb254baee980862d21e04d /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
parent1f855af63fdd31fe3dcfee75f4f5f9b62f30d87e (diff)
gpu: nvgpu: use common nvgpu mutex/spinlock APIs
Instead of using Linux APIs for mutex and spinlocks directly, use new APIs defined in <nvgpu/lock.h> Replace Linux specific mutex/spinlock declaration, init, lock, unlock APIs with new APIs e.g struct mutex is replaced by struct nvgpu_mutex and mutex_lock() is replaced by nvgpu_mutex_acquire() And also include <nvgpu/lock.h> instead of including <linux/mutex.h> and <linux/spinlock.h> Add explicit nvgpu/lock.h includes to below files to fix complilation failures. gk20a/platform_gk20a.h include/nvgpu/allocator.h Jira NVGPU-13 Change-Id: I81a05d21ecdbd90c2076a9f0aefd0e40b215bd33 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1293187 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index 20baf9de..1a248dba 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -41,7 +41,7 @@ struct fifo_runlist_info_gk20a {
41 u32 total_entries; 41 u32 total_entries;
42 bool stopped; 42 bool stopped;
43 bool support_tsg; 43 bool support_tsg;
44 struct mutex mutex; /* protect channel preempt and runlist upate */ 44 struct nvgpu_mutex mutex; /* protect channel preempt and runlist update */
45}; 45};
46 46
47enum { 47enum {
@@ -120,18 +120,18 @@ struct fifo_gk20a {
120 struct channel_gk20a *channel; 120 struct channel_gk20a *channel;
121 /* zero-kref'd channels here */ 121 /* zero-kref'd channels here */
122 struct list_head free_chs; 122 struct list_head free_chs;
123 struct mutex free_chs_mutex; 123 struct nvgpu_mutex free_chs_mutex;
124 struct mutex gr_reset_mutex; 124 struct nvgpu_mutex gr_reset_mutex;
125 125
126 struct tsg_gk20a *tsg; 126 struct tsg_gk20a *tsg;
127 struct mutex tsg_inuse_mutex; 127 struct nvgpu_mutex tsg_inuse_mutex;
128 128
129 void (*remove_support)(struct fifo_gk20a *); 129 void (*remove_support)(struct fifo_gk20a *);
130 bool sw_ready; 130 bool sw_ready;
131 struct { 131 struct {
132 /* share info between isrs and non-isr code */ 132 /* share info between isrs and non-isr code */
133 struct { 133 struct {
134 struct mutex mutex; 134 struct nvgpu_mutex mutex;
135 } isr; 135 } isr;
136 struct { 136 struct {
137 u32 device_fatal_0; 137 u32 device_fatal_0;
@@ -147,7 +147,7 @@ struct fifo_gk20a {
147 147
148 unsigned long deferred_fault_engines; 148 unsigned long deferred_fault_engines;
149 bool deferred_reset_pending; 149 bool deferred_reset_pending;
150 struct mutex deferred_reset_mutex; 150 struct nvgpu_mutex deferred_reset_mutex;
151}; 151};
152 152
153static inline const char *gk20a_fifo_interleave_level_name(u32 interleave_level) 153static inline const char *gk20a_fifo_interleave_level_name(u32 interleave_level)