summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
diff options
context:
space:
mode:
authorDeepak Goyal <dgoyal@nvidia.com>2015-01-08 07:20:02 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:07:48 -0400
commit142c377d60947cd707cff612f06d9f58b72bb7e3 (patch)
tree43dff22236ea62e91dc5ac09d973db1273c527e8 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
parent781cbf5c932dddf00200f07754cb033d417d301d (diff)
gpu: nvgpu: Fix if/else conds if PMU flag is OFF.
bug 200069748 Invalidating FECS code instblk is required only if FECS uses bootloader to load. Added check for same instead of using PMU support to invalidate. Handle elpg enable/disable call in case PMU is OFF. Change-Id: I28abbbbe1f22edd9e0417df9d0e831bbd770502c Signed-off-by: Deepak Goyal <dgoyal@nvidia.com> Reviewed-on: http://git-master/r/670664 Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Tested-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Supriya Sharatkumar <ssharatkumar@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index 7bcda89f..f2430165 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A PMU (aka. gPMU outside gk20a context) 2 * GK20A PMU (aka. gPMU outside gk20a context)
3 * 3 *
4 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -3610,6 +3610,10 @@ int gk20a_pmu_enable_elpg(struct gk20a *g)
3610 3610
3611 gk20a_dbg_fn(""); 3611 gk20a_dbg_fn("");
3612 3612
3613
3614 if (!support_gk20a_pmu(g->dev))
3615 return ret;
3616
3613 mutex_lock(&pmu->elpg_mutex); 3617 mutex_lock(&pmu->elpg_mutex);
3614 3618
3615 pmu->elpg_refcnt++; 3619 pmu->elpg_refcnt++;
@@ -3650,6 +3654,9 @@ int gk20a_pmu_disable_elpg(struct gk20a *g)
3650 3654
3651 gk20a_dbg_fn(""); 3655 gk20a_dbg_fn("");
3652 3656
3657 if (!support_gk20a_pmu(g->dev))
3658 return ret;
3659
3653 mutex_lock(&pmu->elpg_mutex); 3660 mutex_lock(&pmu->elpg_mutex);
3654 3661
3655 pmu->elpg_refcnt--; 3662 pmu->elpg_refcnt--;