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>
This commit is contained in:
Terje Bergstrom
2017-01-04 15:23:01 -08:00
committed by mobile promotions
parent 78ad8a23ea
commit 09dba979a8

View File

@@ -670,6 +670,12 @@ void gr_gk20a_ctx_patch_write_end(struct gk20a *g,
struct channel_ctx_gk20a *ch_ctx)
{
gk20a_mem_end(g, &ch_ctx->patch_ctx.mem);
/* Write context count to context image if it is mapped */
if (ch_ctx->gr_ctx->mem.cpu_va) {
gk20a_mem_wr(g, &ch_ctx->gr_ctx->mem,
ctxsw_prog_main_image_patch_count_o(),
ch_ctx->patch_ctx.data_count);
}
}
void gr_gk20a_ctx_patch_write(struct gk20a *g,