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/gk20a/fifo_gk20a.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 0def724d..5bd4dc57 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -867,6 +867,7 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) struct fifo_gk20a *f = &g->fifo; unsigned int chid, i; int err = 0; + u64 userd_base; gk20a_dbg_fn(""); @@ -929,9 +930,9 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) } gk20a_dbg(gpu_dbg_map, "userd gpu va = 0x%llx", f->userd.gpu_va); + userd_base = nvgpu_mem_get_addr(g, &f->userd); for (chid = 0; chid < f->num_channels; chid++) { - f->channel[chid].userd_iova = - nvgpu_mem_get_addr(g, &f->userd) + + f->channel[chid].userd_iova = userd_base + chid * f->userd_entry_size; f->channel[chid].userd_gpu_va = f->userd.gpu_va + chid * f->userd_entry_size; -- cgit v1.2.2