From 8f3875393e7a6bd0fc03afdb1fa99b7e33b71576 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 14 Mar 2017 13:47:04 +0200 Subject: gpu: nvgpu: abstract away dma alloc attrs Don't use enum dma_attr in the gk20a_gmmu_alloc_attr* functions, but define nvgpu-internal flags for no kernel mapping, force contiguous, and read only modes. Store the flags in the allocated struct mem_desc and only use gk20a_gmmu_free, remove gk20a_gmmu_free_attr. This helps in OS abstraction. Rename the notion of attr to flags. Add implicit NVGPU_DMA_NO_KERNEL_MAPPING to all vidmem buffers allocated via gk20a_gmmu_alloc_vid for consistency. Fix a bug in gk20a_gmmu_alloc_map_attr that dropped the attr parameter accidentally. Bug 1853519 Change-Id: I1ff67dff9fc425457ae445ce4976a780eb4dcc9f Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1321101 Reviewed-by: svccoveritychecker Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index b23d0091..99ea1bb7 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h @@ -17,7 +17,6 @@ #define _GK20A_PLATFORM_H_ #include -#include #include #include @@ -33,7 +32,6 @@ struct secure_page_buffer { void (*destroy)(struct device *, struct secure_page_buffer *); size_t size; u64 iova; - struct dma_attrs attrs; }; struct gk20a_platform { -- cgit v1.2.2