summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
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/vgpu/vgpu.c
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/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index ba387de9..4c88ab96 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -250,9 +250,9 @@ static int vgpu_init_support(struct platform_device *pdev)
250 } 250 }
251 g->bar1_mem = r; 251 g->bar1_mem = r;
252 252
253 mutex_init(&g->dbg_sessions_lock); 253 nvgpu_mutex_init(&g->dbg_sessions_lock);
254 mutex_init(&g->client_lock); 254 nvgpu_mutex_init(&g->client_lock);
255 mutex_init(&g->ch_wdt_lock); 255 nvgpu_mutex_init(&g->ch_wdt_lock);
256 256
257 g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL); 257 g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL);
258 if (!g->dbg_regops_tmp_buf) { 258 if (!g->dbg_regops_tmp_buf) {
@@ -576,7 +576,7 @@ int vgpu_probe(struct platform_device *pdev)
576 576
577 init_rwsem(&gk20a->busy_lock); 577 init_rwsem(&gk20a->busy_lock);
578 578
579 spin_lock_init(&gk20a->mc_enable_lock); 579 nvgpu_spinlock_init(&gk20a->mc_enable_lock);
580 580
581 /* Initialize the platform interface. */ 581 /* Initialize the platform interface. */
582 err = platform->probe(dev); 582 err = platform->probe(dev);