summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
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
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')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index cffc48f5..d84d4ad5 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2160,7 +2160,7 @@ static int gr_gk20a_wait_ctxsw_ready(struct gk20a *g)
2160 return ret; 2160 return ret;
2161 } 2161 }
2162 2162
2163 if (support_gk20a_pmu(g->dev)) 2163 if (!(g->gpu_characteristics.arch > NVGPU_GPU_ARCH_GM200))
2164 gk20a_writel(g, gr_fecs_current_ctx_r(), 2164 gk20a_writel(g, gr_fecs_current_ctx_r(),
2165 gr_fecs_current_ctx_valid_false_f()); 2165 gr_fecs_current_ctx_valid_false_f());
2166 2166
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--;