summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-01-04 18:23:01 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-11 15:44:20 -0500
commit09dba979a85855d4bdfafbb4bf18eefab3d71099 (patch)
tree2aecb3248182e13844cbf79c55d5f0cb90e30d07 /drivers/gpu/nvgpu/gk20a
parent78ad8a23ea896abde95f76b2ced0fe353cb4cb60 (diff)
gpu: nvgpu: Update patch count after adding
When kernel adds patches to a context, kernel needs to update the patch count in order for FECS to pick up the new patches. Previously patching was done only at the context creation time. Now patching is used also when changing preemption mode, but the patches did not take effect due to not updating count. Update patch count every time we end patching of a context. Bug 1852094 Change-Id: Ic2150741609d1d1956769e439ce1c5f2edcacb84 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1280424 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 94f66e83..54c96680 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -670,6 +670,12 @@ void gr_gk20a_ctx_patch_write_end(struct gk20a *g,
670 struct channel_ctx_gk20a *ch_ctx) 670 struct channel_ctx_gk20a *ch_ctx)
671{ 671{
672 gk20a_mem_end(g, &ch_ctx->patch_ctx.mem); 672 gk20a_mem_end(g, &ch_ctx->patch_ctx.mem);
673 /* Write context count to context image if it is mapped */
674 if (ch_ctx->gr_ctx->mem.cpu_va) {
675 gk20a_mem_wr(g, &ch_ctx->gr_ctx->mem,
676 ctxsw_prog_main_image_patch_count_o(),
677 ch_ctx->patch_ctx.data_count);
678 }
673} 679}
674 680
675void gr_gk20a_ctx_patch_write(struct gk20a *g, 681void gr_gk20a_ctx_patch_write(struct gk20a *g,