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/ce2_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/ce2_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h index 3b53834d..1bb25dd1 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A graphics copy engine (gr host) | 4 | * GK20A graphics copy engine (gr host) |
5 | * | 5 | * |
6 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -88,7 +88,7 @@ enum { | |||
88 | /* global ce app db */ | 88 | /* global ce app db */ |
89 | struct gk20a_ce_app { | 89 | struct gk20a_ce_app { |
90 | bool initialised; | 90 | bool initialised; |
91 | struct mutex app_mutex; | 91 | struct nvgpu_mutex app_mutex; |
92 | int app_state; | 92 | int app_state; |
93 | 93 | ||
94 | struct list_head allocated_contexts; | 94 | struct list_head allocated_contexts; |
@@ -101,7 +101,7 @@ struct gk20a_gpu_ctx { | |||
101 | struct gk20a *g; | 101 | struct gk20a *g; |
102 | struct device *dev; | 102 | struct device *dev; |
103 | u32 ctx_id; | 103 | u32 ctx_id; |
104 | struct mutex gpu_ctx_mutex; | 104 | struct nvgpu_mutex gpu_ctx_mutex; |
105 | int gpu_ctx_state; | 105 | int gpu_ctx_state; |
106 | ce_event_callback user_event_callback; | 106 | ce_event_callback user_event_callback; |
107 | 107 | ||