From 40c19c67d043e750cec4a8c33695e8cbe01bd639 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 3 Jul 2017 17:16:48 +0530 Subject: gpu: nvgpu: support platform specific physical address translation On some GPUs certain physical address bits have special meaning. This patch adds support for setting those bits based on the GMMU attributes struct. Jira GPUT19X-10 Bug 200279508 Change-Id: I32b8a028be7fd62af06a60c393a8c9251de0ef3c Signed-off-by: Deepak Nibade Reviewed-on: https://git-master/r/1512600 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/common/mm/gmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/mm/gmmu.c') diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 55fbcd3f..2abe87c9 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c @@ -404,8 +404,9 @@ static int __set_pd_level(struct vm_gk20a *vm, * to be the table of PDEs. When the next level is PTEs the * target addr is the real physical address we are aiming for. */ - target_addr = next_pd ? nvgpu_pde_phys_addr(g, next_pd) : - phys_addr; + target_addr = next_pd ? + nvgpu_pde_phys_addr(g, next_pd) : + g->ops.mm.gpu_phys_addr(g, attrs, phys_addr); l->update_entry(vm, l, pd, pd_idx, -- cgit v1.2.2