From c16797e35c2926bf34a61d5d8f37d5675ec23b1b Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Tue, 1 Aug 2017 13:51:56 -0700 Subject: gpu: nvgpu: fix warnings for GPUs with real vidmem Fix kernel warnings for GPUs with real vidmem: - dma.c: in nvgpu_dma_alloc_flags, ignore incoming flags when using vidmem, since anything but NVGPU_DMA_NO_KERNEL_MAPPING will end up generating kernel warnings, and the vidmem mapping functions ignore the other flags anyway. - gmmu.c: in __nvgpu_gmmu_update_page_table, use appropriate function for memory type to retrieve physical address Bug 1967748 Change-Id: I6fc01fd5f2c5cd7b81cba70ab59cc3c8fe4cda19 Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1530877 Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/linux/dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux') diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index 6473aed9..ea5b2837 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c @@ -77,9 +77,13 @@ int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, * the lack of it for vidmem - the user should not care when * using nvgpu_gmmu_alloc_map and it's vidmem, or if there's a * difference, the user should use the flag explicitly anyway. + * + * Incoming flags are ignored here, since bits other than the + * no-kernel-mapping flag are ignored by the vidmem mapping + * functions anyway. */ int err = nvgpu_dma_alloc_flags_vid(g, - flags | NVGPU_DMA_NO_KERNEL_MAPPING, + NVGPU_DMA_NO_KERNEL_MAPPING, size, mem); if (!err) -- cgit v1.2.2