From 501156ba2276d74c3e46c6114646fd6bb001182d Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Tue, 2 Oct 2018 10:53:33 -0700 Subject: Revert "gpu: nvgpu: fix update hwpm ctxsw mode" The fix is incorrect. hwpm ctxsw mode should always in gr ctx. This reverts commit 8f30251c67811834f9d93b50ce3e97fe3aa18051. Bug 2404093 Bug 200454109 Change-Id: I8fae2c379b051a3f48fe9e886e3b2348bb94b935 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1917755 (cherry picked from commit 70248d531479fac7946ae296f926518fcc5677a0) Signed-off-by: Vaibhav Kachore Reviewed-on: https://git-master.nvidia.com/r/1920607 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 6e63c138..8b022b9b 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -1854,11 +1854,11 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g, data |= pm_ctx->pm_mode; + nvgpu_mem_wr(g, gr_mem, ctxsw_prog_main_image_pm_o(), data); + if (ctxheader->gpu_va) { - nvgpu_mem_wr(g, ctxheader, ctxsw_prog_main_image_pm_o(), data); g->ops.gr.write_pm_ptr(g, ctxheader, virt_addr); } else { - nvgpu_mem_wr(g, gr_mem, ctxsw_prog_main_image_pm_o(), data); g->ops.gr.write_pm_ptr(g, gr_mem, virt_addr); } -- cgit v1.2.2