From 0378bc32e4db87dd7bb58fce2f85cd4ff436506a Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 14 Mar 2018 17:54:56 -0700 Subject: gpu: nvgpu: add coherent case in gp10b_get_pde0_pgsz gp10b_get_pde0_pgsz computes pgsz depending on aperture and address, but it was not handling sysmem coherent case. Bug 2082475 Change-Id: I095acb05e3f917518368b879f5839f8e9dbcd8ea Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/1676255 Reviewed-by: svc-mobile-coverity Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp10b/mm_gp10b.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c index 7ff5f6a6..86d5f5df 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c @@ -352,6 +352,7 @@ static enum gmmu_pgsz_gk20a gp10b_get_pde0_pgsz(struct gk20a *g, * Check if the aperture AND address are set */ if (pde_v[2] & (gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f() | + gmmu_new_dual_pde_aperture_small_sys_mem_coh_f() | gmmu_new_dual_pde_aperture_small_video_memory_f())) { u64 addr = (((u64) pde_v[3] << 32) | (u64) (pde_v[2] & gmmu_new_dual_pde_address_small_sys_f(~0))) << @@ -362,6 +363,7 @@ static enum gmmu_pgsz_gk20a gp10b_get_pde0_pgsz(struct gk20a *g, } if (pde_v[0] & (gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f() | + gmmu_new_dual_pde_aperture_big_sys_mem_coh_f() | gmmu_new_dual_pde_aperture_big_video_memory_f())) { u64 addr = (((u64) pde_v[1] << 32) | (u64) (pde_v[0] & gmmu_new_dual_pde_address_big_sys_f(~0))) << -- cgit v1.2.2