summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-07-24 08:06:56 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:34 -0400
commitfb719a007555728dfe457c4e118ab7e98e018494 (patch)
treef85f48e49ca120993bc524def5d5b806f48742d6 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
parentf7642ca185356f9f5593dad475a710b965d9826b (diff)
Revert "gpu: nvgpu: return error from mutex_acquire() if pmu not initialized"
This reverts commit 50497d4031103df1067f14ce4c1e14b15713efb9. Simply returning error from mutex_acquire() causes the code to call disable_elpg() which decreases elpg refcount But we already have a race condition between pmu initialization where we initialize elpg and runlist update where we call this mutex_acquire and decrease the refcount As a result of this race and returned error we might mess up with the elpg refcount and cause abnormal behaviour Hence revert this change for now until we have clean fix considering this race as well Bug 200024116 Change-Id: Ie64ca36f70aba6b15c2acc235a5d36d13c9025aa Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/441793 Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index 3abf1b43..c23d83cf 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -1227,7 +1227,7 @@ int pmu_mutex_acquire(struct pmu_gk20a *pmu, u32 id, u32 *token)
1227 u32 data, owner, max_retry; 1227 u32 data, owner, max_retry;
1228 1228
1229 if (!pmu->initialized) 1229 if (!pmu->initialized)
1230 return -EINVAL; 1230 return 0;
1231 1231
1232 BUG_ON(!token); 1232 BUG_ON(!token);
1233 BUG_ON(!PMU_MUTEX_ID_IS_VALID(id)); 1233 BUG_ON(!PMU_MUTEX_ID_IS_VALID(id));
@@ -1296,7 +1296,7 @@ int pmu_mutex_release(struct pmu_gk20a *pmu, u32 id, u32 *token)
1296 u32 owner, data; 1296 u32 owner, data;
1297 1297
1298 if (!pmu->initialized) 1298 if (!pmu->initialized)
1299 return -EINVAL; 1299 return 0;
1300 1300
1301 BUG_ON(!token); 1301 BUG_ON(!token);
1302 BUG_ON(!PMU_MUTEX_ID_IS_VALID(id)); 1302 BUG_ON(!PMU_MUTEX_ID_IS_VALID(id));