From 8ee3aa4b3175d8d27e57a0f5d5e2cdf3d78a4a58 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 24 Jan 2017 19:00:42 +0530 Subject: gpu: nvgpu: use common nvgpu mutex/spinlock APIs Instead of using Linux APIs for mutex and spinlocks directly, use new APIs defined in 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 instead of including and 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 Reviewed-on: http://git-master/r/1293187 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/vgpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c') 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) } g->bar1_mem = r; - mutex_init(&g->dbg_sessions_lock); - mutex_init(&g->client_lock); - mutex_init(&g->ch_wdt_lock); + nvgpu_mutex_init(&g->dbg_sessions_lock); + nvgpu_mutex_init(&g->client_lock); + nvgpu_mutex_init(&g->ch_wdt_lock); g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL); if (!g->dbg_regops_tmp_buf) { @@ -576,7 +576,7 @@ int vgpu_probe(struct platform_device *pdev) init_rwsem(&gk20a->busy_lock); - spin_lock_init(&gk20a->mc_enable_lock); + nvgpu_spinlock_init(&gk20a->mc_enable_lock); /* Initialize the platform interface. */ err = platform->probe(dev); -- cgit v1.2.2