mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
Revert "gpu: nvgpu: Remove force coherency"
This reverts commit aec64d8f8b.
Causes instability on Xavier
Change-Id: Iae5e2d3316a86fba4bb3774367ef8e9c49a7b922
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2014015
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Tested-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5b25686d54
commit
e212e851a3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2018, 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,6 +85,14 @@ 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
|
||||
|
||||
@@ -64,6 +64,16 @@ 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,
|
||||
|
||||
Reference in New Issue
Block a user