From ff9c3fc20a27444cd1ff7d9402965023e425f404 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 17 Aug 2017 16:51:03 -0700 Subject: gpu: nvgpu: Reduce usage of nvgpu_vidmem_get_page_alloc Reduce the usage of nvgpu_vidmem_get_page_alloc() and friends as much as possible. This reduces the dependency of nvgpu on Linux SGLs. SGLs still need to be used, however, since sharing buffers in userspace is done by dma_buf FD. The best way to pass the vidmem buf through the dma_buf is by SGL pointer. JIRA NVGPU-30 JIRA NVGPU-138 Change-Id: Ide0e9e5a557f00aa63b063be085042101a5b34ee Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1540709 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/pramin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/pramin.c') diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c index b7bc7439..b6166f51 100644 --- a/drivers/gpu/nvgpu/common/pramin.c +++ b/drivers/gpu/nvgpu/common/pramin.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "gk20a/gk20a.h" @@ -55,7 +54,7 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct nvgpu_mem *mem, if (!g->regs && nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) return; - alloc = nvgpu_vidmem_get_page_alloc(mem->priv.sgt->sgl); + alloc = mem->vidmem_alloc; sgt = &alloc->sgt; nvgpu_sgt_for_each_sgl(sgl, sgt) { -- cgit v1.2.2