diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2017-08-01 16:51:56 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-03 11:45:00 -0400 |
commit | c16797e35c2926bf34a61d5d8f37d5675ec23b1b (patch) | |
tree | 74c14d006af6f136793c23f335e8758ccf9d3e5c /drivers/gpu/nvgpu/common/linux/dma.c | |
parent | e1df72771ba5e5331888f5bfc171f71bd8f4aed7 (diff) |
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 <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1530877
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/dma.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/dma.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, | |||
77 | * the lack of it for vidmem - the user should not care when | 77 | * the lack of it for vidmem - the user should not care when |
78 | * using nvgpu_gmmu_alloc_map and it's vidmem, or if there's a | 78 | * using nvgpu_gmmu_alloc_map and it's vidmem, or if there's a |
79 | * difference, the user should use the flag explicitly anyway. | 79 | * difference, the user should use the flag explicitly anyway. |
80 | * | ||
81 | * Incoming flags are ignored here, since bits other than the | ||
82 | * no-kernel-mapping flag are ignored by the vidmem mapping | ||
83 | * functions anyway. | ||
80 | */ | 84 | */ |
81 | int err = nvgpu_dma_alloc_flags_vid(g, | 85 | int err = nvgpu_dma_alloc_flags_vid(g, |
82 | flags | NVGPU_DMA_NO_KERNEL_MAPPING, | 86 | NVGPU_DMA_NO_KERNEL_MAPPING, |
83 | size, mem); | 87 | size, mem); |
84 | 88 | ||
85 | if (!err) | 89 | if (!err) |