From 8ebf8ac8ff064027e3a40cd987b598191d7995a3 Mon Sep 17 00:00:00 2001 From: Vinod Gopalakrishnakurup Date: Mon, 11 Feb 2019 11:09:43 -0800 Subject: [PATCH] Revert "Revert "gpu: nvgpu: Remove force coherency"" This reverts commit e212e851a3ab65dcbc041345f17b965ede3acc48. Change-Id: Ib1807b202b6b4eccd16eee22a90a1e7f3d569fba Signed-off-by: Vinod Gopalakrishnakurup Reviewed-on: https://git-master.nvidia.com/r/2016568 Reviewed-by: svc-misra-checker Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/gmmu/page_table.c | 10 +--------- drivers/gpu/nvgpu/common/mm/nvgpu_mem.c | 10 ---------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c b/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c index 0e4d55e97..42393b688 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu/page_table.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -85,14 +85,6 @@ static u64 __nvgpu_gmmu_map(struct vm_gk20a *vm, return 0; } - /* - * If the GPU is IO coherent and the DMA API is giving us IO coherent - * CPU mappings then we gotta make sure we use the IO coherent aperture. - */ - if (nvgpu_is_enabled(g, NVGPU_USE_COHERENT_SYSMEM)) { - flags |= NVGPU_VM_MAP_IO_COHERENT; - } - /* * Later on, when we free this nvgpu_mem's GPU mapping, we are going to * potentially have to free the GPU VA space. If the address passed in diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c index 74f4d1e61..f4528cc88 100644 --- a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c +++ b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c @@ -64,16 +64,6 @@ u32 nvgpu_aperture_mask(struct gk20a *g, struct nvgpu_mem *mem, { enum nvgpu_aperture ap = mem->aperture; - /* - * Handle the coherent aperture: ideally most of the driver is not - * aware of the difference between coherent and non-coherent sysmem so - * we add this translation step here. - */ - if (nvgpu_is_enabled(g, NVGPU_USE_COHERENT_SYSMEM) && - ap == APERTURE_SYSMEM) { - ap = APERTURE_SYSMEM_COH; - } - return nvgpu_aperture_mask_coh(g, ap, sysmem_mask, sysmem_coh_mask,