From ea180847e146450b53de5c41c3f43b19391b4c5d Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 21 Jul 2017 13:11:56 -0700 Subject: gpu: nvgpu: Fix gr ctx unmap logic The GR context buffers were not being properly unmapped. The awkward VPR vs non-VPR context setup requires some extra checks when determining which nvgpu_mem is associated with what GPU VA (which are tracked separately in a different sized array). Change-Id: I4c7be1c5b7835aea4309a142df5b0bdfaae91e4c Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1524689 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 46a9b0a7..a9ccd93f 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -57,6 +57,7 @@ struct channel_ctx_gk20a { struct pm_ctx_desc pm_ctx; u64 global_ctx_buffer_va[NR_GLOBAL_CTX_BUF_VA]; u64 global_ctx_buffer_size[NR_GLOBAL_CTX_BUF_VA]; + int global_ctx_buffer_index[NR_GLOBAL_CTX_BUF_VA]; bool global_ctx_buffer_mapped; struct ctx_header_desc ctx_header; }; -- cgit v1.2.2