diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-01-24 08:30:42 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-22 07:15:02 -0500 |
commit | 8ee3aa4b3175d8d27e57a0f5d5e2cdf3d78a4a58 (patch) | |
tree | 505dfd2ea2aca2f1cbdb254baee980862d21e04d /drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |
parent | 1f855af63fdd31fe3dcfee75f4f5f9b62f30d87e (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/platform_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index fa0909ee..c841c8e6 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/dma-attrs.h> | 20 | #include <linux/dma-attrs.h> |
21 | #include <linux/version.h> | 21 | #include <linux/version.h> |
22 | 22 | ||
23 | #include <nvgpu/lock.h> | ||
24 | |||
23 | #define GK20A_CLKS_MAX 4 | 25 | #define GK20A_CLKS_MAX 4 |
24 | 26 | ||
25 | struct gk20a; | 27 | struct gk20a; |
@@ -184,7 +186,7 @@ struct gk20a_platform { | |||
184 | 186 | ||
185 | /* Called to turn on the device */ | 187 | /* Called to turn on the device */ |
186 | int (*unrailgate)(struct device *dev); | 188 | int (*unrailgate)(struct device *dev); |
187 | struct mutex railgate_lock; | 189 | struct nvgpu_mutex railgate_lock; |
188 | 190 | ||
189 | /* Called to check state of device */ | 191 | /* Called to check state of device */ |
190 | bool (*is_railgated)(struct device *dev); | 192 | bool (*is_railgated)(struct device *dev); |