summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali
diff options
context:
space:
mode:
authorJean-Francois Dagenais <jeff.dagenais@gmail.com>2019-04-18 17:36:17 -0700
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2019-12-09 11:03:47 -0800
commit4c0069e4daba678ab35e9e7e13e43d0080d9ae5c (patch)
treeba9418ae8d3f5fb0faee226297f87dceca3a97c3 /meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali
parent31e06d0e73e25a60e52e968c18411c00a8aecce5 (diff)
downloadmeta-xilinx-4c0069e4daba678ab35e9e7e13e43d0080d9ae5c.tar.gz
kernel-module-mali: add patch to check dma_map_page error
This fixes an error when using the module in a kernel configured with the CONFIG_DMA_API_DEBUG flag. utgard fd4b0000.gpu: DMA-API: device driver failed to check map error[device address=0x00000000325b0000] [size=4096 bytes] [mapped as page] ... [<ffffff80082f72bc>] check_unmap+0x44c/0x7e8 [<ffffff80082f76b8>] debug_dma_unmap_page+0x60/0x68 [<ffffff8000622e60>] mali_mem_os_alloc_pages+0x230/0x498 [mali] ... Acked-by: Hyun Kwon <hyun.kwon@xilinx.com> Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali')
-rw-r--r--meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch
new file mode 100644
index 00000000..5363c37e
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch
@@ -0,0 +1,17 @@
1Index: mali/linux/mali_memory_os_alloc.c
2===================================================================
3--- mali.orig/linux/mali_memory_os_alloc.c
4+++ mali/linux/mali_memory_os_alloc.c
5@@ -239,8 +239,10 @@ int mali_mem_os_alloc_pages(mali_mem_os_
6 /* Ensure page is flushed from CPU caches. */
7 dma_addr = dma_map_page(&mali_platform_device->dev, new_page,
8 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
9- dma_unmap_page(&mali_platform_device->dev, dma_addr,
10- _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
11+ err = dma_mapping_error(&mali_platform_device->dev, dma_addr);
12+ if (likely(!err))
13+ dma_unmap_page(&mali_platform_device->dev, dma_addr,
14+ _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
15 dma_addr = dma_map_page(&mali_platform_device->dev, new_page,
16 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
17