mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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>
This commit is contained in:
committed by
Dan Willemsen
parent
781cbf5c93
commit
142c377d60
@@ -2160,7 +2160,7 @@ static int gr_gk20a_wait_ctxsw_ready(struct gk20a *g)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (support_gk20a_pmu(g->dev))
|
||||
if (!(g->gpu_characteristics.arch > NVGPU_GPU_ARCH_GM200))
|
||||
gk20a_writel(g, gr_fecs_current_ctx_r(),
|
||||
gr_fecs_current_ctx_valid_false_f());
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GK20A PMU (aka. gPMU outside gk20a context)
|
||||
*
|
||||
* Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -3610,6 +3610,10 @@ int gk20a_pmu_enable_elpg(struct gk20a *g)
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
|
||||
if (!support_gk20a_pmu(g->dev))
|
||||
return ret;
|
||||
|
||||
mutex_lock(&pmu->elpg_mutex);
|
||||
|
||||
pmu->elpg_refcnt++;
|
||||
@@ -3650,6 +3654,9 @@ int gk20a_pmu_disable_elpg(struct gk20a *g)
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
if (!support_gk20a_pmu(g->dev))
|
||||
return ret;
|
||||
|
||||
mutex_lock(&pmu->elpg_mutex);
|
||||
|
||||
pmu->elpg_refcnt--;
|
||||
|
||||
Reference in New Issue
Block a user