From 8403bb63000fd9aa35a43fcddc82de2760ad0ac3 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 25 May 2016 13:23:52 +0300 Subject: gpu: nvgpu: map patch ctx in set_preemption_mode The per-write map/unmap feature from gr_gk20a_ctx_patch_write_begin() is dropped, so call begin/end explicitly from gr_gp10b_set_preemption_mode for the commit_global_cb_manager call. Change-Id: I7bf952fffb54d4f18706e77dea015ffe4b68bcfe Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1157835 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 4a8a1d8e..339f0413 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c @@ -2077,7 +2077,15 @@ static int gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, if (g->ops.gr.update_ctxsw_preemption_mode) { g->ops.gr.update_ctxsw_preemption_mode(ch->g, ch_ctx, mem); + + err = gr_gk20a_ctx_patch_write_begin(g, ch_ctx); + if (err) { + gk20a_err(dev_from_gk20a(g), + "can't map patch context"); + goto enable_ch; + } g->ops.gr.commit_global_cb_manager(g, ch, true); + gr_gk20a_ctx_patch_write_end(g, ch_ctx); } enable_ch: -- cgit v1.2.2