summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-09-07 18:27:55 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-18 19:00:37 -0400
commitb3446bc0b6fca6cb992667f80a95f8503b6a652a (patch)
tree9882c36bfaef83da9d0a6eefec5e8c3564b93cea /drivers/gpu/nvgpu/vgpu/ltc_vgpu.c
parentbee9c830c7898ceebf8c396b40598350229a7203 (diff)
gpu: nvgpu: Move dma_buf usage from mm_gk20a.c
Move most of the dma_buf usage present in the mm_gk20a.c code out to Linux specific code and some commom/mm code. There's two primary groups of code: 1. dma_buf priv field code (for holding comptag data) 2. Comptag usage that relies on dma_buf pointers For (1) the dma_buf code was simply moved to common/linux/dmabuf.c since most of this code is clearly Linux specific. The comptag code was a bit more complicated since there is two parts to the comptag code. Firstly there's the code that manages the comptag memory. This is essentially a simple allocator. This was moved to common/mm/comptags.c since it can be shared across all chips. The second set of code is moved to common/linux/comptags.c since it is the interface between dma_bufs and the comptag memory. Two other fixes were done as well: - Add struct gk20a to the comptag allocator init so that the proper nvgpu_vzalloc() function could be used. - Add necessary includes to common/linux/vm_priv.h. JIRA NVGPU-30 JIRA NVGPU-138 Change-Id: I96c57f2763e5ebe18a2f2ee4b33e0e1a2597848c Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1566628 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/ltc_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/ltc_vgpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c
index a6848872..fb9558e2 100644
--- a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c
@@ -50,7 +50,7 @@ int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
50 if (max_comptag_lines < 2) 50 if (max_comptag_lines < 2)
51 return -ENXIO; 51 return -ENXIO;
52 52
53 err = gk20a_comptag_allocator_init(&gr->comp_tags, max_comptag_lines); 53 err = gk20a_comptag_allocator_init(g, &gr->comp_tags, max_comptag_lines);
54 if (err) 54 if (err)
55 return err; 55 return err;
56 56