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/clk_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/clk_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/clk_gk20a.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h index a45dfcb7..8260fd4a 100644 --- a/drivers/gpu/nvgpu/gk20a/clk_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/clk_gk20a.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 - 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011 - 2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -16,7 +16,7 @@ | |||
16 | #ifndef CLK_GK20A_H | 16 | #ifndef CLK_GK20A_H |
17 | #define CLK_GK20A_H | 17 | #define CLK_GK20A_H |
18 | 18 | ||
19 | #include <linux/mutex.h> | 19 | #include <nvgpu/lock.h> |
20 | #include <linux/clkdev.h> | 20 | #include <linux/clkdev.h> |
21 | #include <linux/clk-provider.h> | 21 | #include <linux/clk-provider.h> |
22 | 22 | ||
@@ -86,7 +86,7 @@ struct clk_gk20a { | |||
86 | #endif | 86 | #endif |
87 | struct pll gpc_pll; | 87 | struct pll gpc_pll; |
88 | struct pll gpc_pll_last; | 88 | struct pll gpc_pll_last; |
89 | struct mutex clk_mutex; | 89 | struct nvgpu_mutex clk_mutex; |
90 | struct namemap_cfg *clk_namemap; | 90 | struct namemap_cfg *clk_namemap; |
91 | u32 namemap_num; | 91 | u32 namemap_num; |
92 | u32 *namemap_xlat_table; | 92 | u32 *namemap_xlat_table; |