summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-10-02 19:42:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-10-11 04:04:08 -0400
commit12acc9668724d0a4d43e93ba751b9f413df59f12 (patch)
tree8a7b654de4e18ca3177c57ee3a14d3bdc889453c /drivers
parent501156ba2276d74c3e46c6114646fd6bb001182d (diff)
gpu: nvgpu: update all ctx headers in the tsg when update hwpm mode
FECS could use any ctx headers for context switch, so needs to update all ctx headers in the same tsg with hwpm buffer address. Bug 2404093 Bug 200454109 Change-Id: I99e74cd8c768c06c3d215779db899a1318522db0 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1917756 (cherry picked from commit f447a8d279b0d0abc8e2d3eb6f0596ea5cd87cbf) Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1920608 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 8b022b9b..3a166e06 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1857,7 +1857,13 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
1857 nvgpu_mem_wr(g, gr_mem, ctxsw_prog_main_image_pm_o(), data); 1857 nvgpu_mem_wr(g, gr_mem, ctxsw_prog_main_image_pm_o(), data);
1858 1858
1859 if (ctxheader->gpu_va) { 1859 if (ctxheader->gpu_va) {
1860 g->ops.gr.write_pm_ptr(g, ctxheader, virt_addr); 1860 struct channel_gk20a *ch;
1861
1862 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
1863 nvgpu_list_for_each_entry(ch, &tsg->ch_list, channel_gk20a, ch_entry) {
1864 g->ops.gr.write_pm_ptr(g, &ch->ctx_header, virt_addr);
1865 }
1866 nvgpu_rwsem_up_read(&tsg->ch_list_lock);
1861 } else { 1867 } else {
1862 g->ops.gr.write_pm_ptr(g, gr_mem, virt_addr); 1868 g->ops.gr.write_pm_ptr(g, gr_mem, virt_addr);
1863 } 1869 }