summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-07-05 06:11:15 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-07 10:05:38 -0400
commitd479a781c68ab20ff27ae6d1a6eb6e15eb51fb88 (patch)
tree1a7fb1327e5ad9dc04ecb013095a53b053b2e88b /drivers/gpu/nvgpu/gp10b/mm_gp10b.c
parent8bdb74786cd58746a6d9c361f8383fdfb43c6c98 (diff)
gpu: nvgpu: use coherent aperture for coherent buffers
Use sysmem_coherent aperture if the buffer mappings are requested to be IO coherent. Use sysmem_noncoherent aperture otherwise. This is implemented by adding a new coherent field to the GMMU attrs struct. Jira GPUT19X-17 Bug 1651331 Bug 200283998 Change-Id: I5cfb71b5913d4db50ebf10331b19f5a4216456bf Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master/r/1514438 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
index 590dd960..bdc30143 100644
--- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -230,9 +230,12 @@ static void __update_pte(struct vm_gk20a *vm,
230 u32 pte_addr = attrs->aperture == APERTURE_SYSMEM ? 230 u32 pte_addr = attrs->aperture == APERTURE_SYSMEM ?
231 gmmu_new_pte_address_sys_f(phys_shifted) : 231 gmmu_new_pte_address_sys_f(phys_shifted) :
232 gmmu_new_pte_address_vid_f(phys_shifted); 232 gmmu_new_pte_address_vid_f(phys_shifted);
233 u32 pte_tgt = __nvgpu_aperture_mask(g, attrs->aperture, 233 u32 pte_tgt = __nvgpu_aperture_mask(g,
234 gmmu_new_pte_aperture_sys_mem_ncoh_f(), 234 attrs->aperture,
235 gmmu_new_pte_aperture_video_memory_f()); 235 attrs->coherent ?
236 gmmu_new_pte_aperture_sys_mem_coh_f() :
237 gmmu_new_pte_aperture_sys_mem_ncoh_f(),
238 gmmu_new_pte_aperture_video_memory_f());
236 239
237 pte_w[0] = pte_valid | pte_addr | pte_tgt; 240 pte_w[0] = pte_valid | pte_addr | pte_tgt;
238 241