Re: [meta-xilinx] [PATCH] kernel-module-mali: check and honour dma_unmap_page exit code
Sorry, the subject should be: kernel-module-mali: check and honour dma_map_page exit code instead of "dma_UNmap_page" > On Feb 19, 2019, at 10:39, Jean-Francois Dagenais > wrote: > > This fixes an error when using the module in a kernel configured with > the CONFIG_DMA_API_DEBUG flag. > > utgard fd4b.gpu: DMA-API: device driver failed to check map error[device > address=0x325b] [size=4096 bytes] [mapped as page] > ... > [] check_unmap+0x44c/0x7e8 > [] debug_dma_unmap_page+0x60/0x68 > [] mali_mem_os_alloc_pages+0x230/0x498 [mali] > ... > > Signed-off-by: Jean-Francois Dagenais > --- > .../recipes-graphics/mali/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fkernel-module-mali.bb&c=E,1,7H1c4ml0nbgV5Y-a8ex5Nz-45BClZi0HAb8rSq_LVyywEvSS_hmK5Elx6jiQ69wE9_E1QeXVcbkuLM3wVzF94BmsSb6qcaxlV72Yhev6VOpD-Va8ik99UVY,&typo=1 > | 1 + > .../0007-fix-driver-failed-to-check-map-error.patch | 16 > 2 files changed, 17 insertions(+) > create mode 100644 > meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch > > diff --git > a/meta-xilinx-bsp/recipes-graphics/mali/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fkernel-module-mali.bb&c=E,1,_43jl_v77hUeZ715j6nn3vef5fYyi5F8RndfWf7jFiMkSoYFNOFmaBY-eCWB04sK6Rs2xuAQXQQLPfB3DR-4vTWdAeyhs1FG88HNCPpxRT4IBMFxfpo,&typo=1 > > b/meta-xilinx-bsp/recipes-graphics/mali/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fkernel-module-mali.bb&c=E,1,JaZ3yJLlmgR_Qe9c3t82B8aU2fH7lMmTxdGS2rEmZdyNWYlZXRBMelmmmJNcH07ltvr8DLau5iRr3aHww_esitrJ74H-z6N3l499VbXohkosRapNSkht&typo=1 > index 0f44d25..5833239 100644 > --- > a/meta-xilinx-bsp/recipes-graphics/mali/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fkernel-module-mali.bb&c=E,1,JqkVEZw5PLC_acDxcaxe3EmRTDzQtpfOF0S4ihWN30-lP3msD4vK_acCQ9sKuS5qgR16izABptBPu3V1ZiG5Asv_MlTX6zV8I0Sis_DkCyxAetfsx3tIR_xQvQ,,&typo=1 > +++ > b/meta-xilinx-bsp/recipes-graphics/mali/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fkernel-module-mali.bb&c=E,1,BrH3PiHKnMb_dJfDtP8QdTfn_a_1u4u6-Op5vJEWvlZOpwm8o6Girdnwajqk5AnN4y9nDiNOQlDSJVCmnVqNSjABPOdFOeXlvF-4gujGyfw,&typo=1 > @@ -16,6 +16,7 @@ SRC_URI = " \ > file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \ > file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ > file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch \ > + file://0007-fix-driver-failed-to-check-map-error.patch \ > file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ > file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ > " > diff --git > a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch > > b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch > new file mode 100644 > index 000..f553e58 > --- /dev/null > +++ > b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch > @@ -0,0 +1,16 @@ > +Index: mali/linux/mali_memory_os_alloc.c > +=== > +--- mali.orig/linux/mali_memory_os_alloc.c > mali/linux/mali_memory_os_alloc.c > +@@ -239,8 +239,9 @@ int mali_mem_os_alloc_pages(mali_mem_os_ > + /* Ensure page is flushed from CPU caches. */ > + dma_addr = dma_map_page(&mali_platform_device->dev, new_page, > + 0, _MALI_OSK_MALI_PAGE_SIZE, > DMA_BIDIRECTIONAL); > +-dma_unmap_page(&mali_platform_device->dev, dma_addr, > +- _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); > ++if (!dma_mapping_error(&mali_platform_device->dev, dma_addr)) > ++dma_unmap_page(&mali_platform_device->dev, dma_addr, > ++ _MALI_OSK_MALI_PAGE_SIZE, > DMA_BIDIRECTIONAL); > + dma_addr = dma_map_page(&mali_platform_device->dev, new_page, > + 0, _MALI_OSK_MALI_PAGE_SIZE, > DMA_BIDIRECTIONAL); > + > -- > 2.11.0 > -- ___ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx
[meta-xilinx] libmali and wayland
There is a discussion started here: https://github.com/Xilinx/meta-xilinx/pull/11/commits/2a00ba8b3e052732eb1c714bebc6f247aa474628#r258102571 about the new conflicts around libwayland-egl being provided/installed by both the libmali-xlnx recipe and the default wayland recipe from poky. It would be nice to continue the discussion and the proposed patches on github directly... as teams do in 2019... wink wink! :P Is Xilinx working on this? Another suggestion: it would help if Xilinx could push --force to say a "master-next" branch so we can detect whether we should hack things on our own or if Xilinx is working on some of the issues we experience between releases. Cheers all! P.S. Anyone heading to San Diego for the Embedded Linux Conference? I am. -- ___ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx
[meta-xilinx] [PATCH] kernel-module-mali: check and honour dma_unmap_page exit code
This fixes an error when using the module in a kernel configured with the CONFIG_DMA_API_DEBUG flag. utgard fd4b.gpu: DMA-API: device driver failed to check map error[device address=0x325b] [size=4096 bytes] [mapped as page] ... [] check_unmap+0x44c/0x7e8 [] debug_dma_unmap_page+0x60/0x68 [] mali_mem_os_alloc_pages+0x230/0x498 [mali] ... Signed-off-by: Jean-Francois Dagenais --- .../recipes-graphics/mali/kernel-module-mali.bb | 1 + .../0007-fix-driver-failed-to-check-map-error.patch | 16 2 files changed, 17 insertions(+) create mode 100644 meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb index 0f44d25..5833239 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb @@ -16,6 +16,7 @@ SRC_URI = " \ file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \ file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch \ + file://0007-fix-driver-failed-to-check-map-error.patch \ file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ " diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch new file mode 100644 index 000..f553e58 --- /dev/null +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-fix-driver-failed-to-check-map-error.patch @@ -0,0 +1,16 @@ +Index: mali/linux/mali_memory_os_alloc.c +=== +--- mali.orig/linux/mali_memory_os_alloc.c mali/linux/mali_memory_os_alloc.c +@@ -239,8 +239,9 @@ int mali_mem_os_alloc_pages(mali_mem_os_ + /* Ensure page is flushed from CPU caches. */ + dma_addr = dma_map_page(&mali_platform_device->dev, new_page, + 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); +- dma_unmap_page(&mali_platform_device->dev, dma_addr, +- _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); ++ if (!dma_mapping_error(&mali_platform_device->dev, dma_addr)) ++ dma_unmap_page(&mali_platform_device->dev, dma_addr, ++ _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); + dma_addr = dma_map_page(&mali_platform_device->dev, new_page, + 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); + -- 2.11.0 -- ___ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx
[meta-xilinx] mali-utgard DMA-API check map error
Hi all, Here's a patch which fixes a DMA-API debug check error I am getting. I am not sure why I get this error once when our Qt based eglfs app starts. Things work correctly after that. Frankly, I kind of blindly followed the recommendation to check the map call error and skip the unmap if an error occures. But why is the map causing the error in the first place? This is why this patch comes with this intro. Basically, it would be wise if Xilinx's display experts were to look at the issue. Cheers! -- ___ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx