From fe1e09d473044f7caaf8b834a094f4784bc5f5e1 Mon Sep 17 00:00:00 2001 From: Timo Alho Date: Fri, 3 Nov 2017 05:29:12 -0700 Subject: Revert "gpu: nvgpu: fix patch buf count update for vidmem" This reverts commit de399ccb0019513a5f9e8f2bcadb02486f99bc80. Bug 2012077 Change-Id: Ie608c3b41aa91f9aaed3fad240ed882a0c6f1ea2 Signed-off-by: Timo Alho Reviewed-on: https://git-master.nvidia.com/r/1591423 Reviewed-by: svc-mobile-coverity Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 06fb5497..2a20c2d9 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -682,7 +682,7 @@ int gr_gk20a_ctx_patch_write_begin(struct gk20a *g, if (err) return err; - if (nvgpu_mem_cpu_accessible(&ch_ctx->gr_ctx->mem)) { + if (ch_ctx->gr_ctx->mem.cpu_va) { /* reset patch count if ucode has already processed it */ ch_ctx->patch_ctx.data_count = nvgpu_mem_rd(g, &ch_ctx->gr_ctx->mem, @@ -699,7 +699,7 @@ void gr_gk20a_ctx_patch_write_end(struct gk20a *g, nvgpu_mem_end(g, &ch_ctx->patch_ctx.mem); /* Write context count to context image if it is mapped */ - if (nvgpu_mem_cpu_accessible(&ch_ctx->gr_ctx->mem)) { + if (ch_ctx->gr_ctx->mem.cpu_va) { nvgpu_mem_wr(g, &ch_ctx->gr_ctx->mem, ctxsw_prog_main_image_patch_count_o(), ch_ctx->patch_ctx.data_count); -- cgit v1.2.2