From 6dde9e67d91419d1e671a520571a2be9bde93999 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 4 Jan 2018 11:09:57 -0800 Subject: gpu: nvgpu: allocate from coherent pool Maps memory coherently on devices that are connected to a coherent bus. (1) Add code to be able to get the platform device node. (2) Create a new flag to mark if the device is connected to a coherent bus (3) Map memory coherently on coherent devices. bug 2040331 Change-Id: Ide83a9261acdbbc6e9fef4fc5f38d6f9d0e5ab5b Signed-off-by: David Nieto Reviewed-on: https://git-master.nvidia.com/r/1633985 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/include/nvgpu/enabled.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 3a5caf0c..e7dd61d2 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h @@ -75,6 +75,9 @@ struct gk20a; #define NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL 24 /* Support batch mapping */ #define NVGPU_SUPPORT_MAP_BUFFER_BATCH 25 +/* Support DMA coherence */ +#define NVGPU_DMA_COHERENT 26 + /* * Host flags -- cgit v1.2.2