From 6c33a010d8e3983cc3504e073cd552f952440aa1 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 7 Mar 2018 09:23:53 -0800 Subject: gpu: nvgpu: add placeholder for IPA to PA Add __nvgpu_sgl_phys function that can be used to implement IPA to PA translation in a subsequent change. Adapt existing function prototypes to add pointer to gpu context, as we will need to check if IPA to PA translation is needed. JIRA EVLR-2442 Bug 200392719 Change-Id: I5a734c958c8277d1bf673c020dafb31263f142d6 Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/1673142 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h index 373c3eef..be0fa6bf 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h @@ -68,7 +68,7 @@ struct nvgpu_sgl; struct nvgpu_sgt_ops { struct nvgpu_sgl *(*sgl_next)(struct nvgpu_sgl *sgl); - u64 (*sgl_phys)(struct nvgpu_sgl *sgl); + u64 (*sgl_phys)(struct gk20a *g, struct nvgpu_sgl *sgl); u64 (*sgl_dma)(struct nvgpu_sgl *sgl); u64 (*sgl_length)(struct nvgpu_sgl *sgl); u64 (*sgl_gpu_addr)(struct gk20a *g, struct nvgpu_sgl *sgl, @@ -254,7 +254,8 @@ struct nvgpu_sgt *nvgpu_sgt_create_from_mem(struct gk20a *g, struct nvgpu_sgl *nvgpu_sgt_get_next(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl); -u64 nvgpu_sgt_get_phys(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl); +u64 nvgpu_sgt_get_phys(struct gk20a *g, struct nvgpu_sgt *sgt, + struct nvgpu_sgl *sgl); u64 nvgpu_sgt_get_dma(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl); u64 nvgpu_sgt_get_length(struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl); u64 nvgpu_sgt_get_gpu_addr(struct gk20a *g, struct nvgpu_sgt *sgt, -- cgit v1.2.2