]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx: Allow larger DMA_ZONE, required by i.MX53 V4L2 sink.
authorLeon Woestenberg <leon@sidebranch.com>
Thu, 22 Dec 2011 19:30:50 +0000 (20:30 +0100)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 23 Dec 2011 16:20:53 +0000 (16:20 +0000)
More details in head of patch.

Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53ard/defconfig
meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53qsb/defconfig
meta-fsl-arm/recipes-kernel/linux/linux-imx/plat-mxc-double-dma-zone-max.patch [new file with mode: 0644]
meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb

index eca5a479d09b1f49c5e23fe2a0d6b18c83c1eb1a..7ff4ccd6b06af4d0a7645ff465951ba8c689ddd5 100644 (file)
@@ -265,7 +265,7 @@ CONFIG_ARCH_MXC_HAS_NFC_V3=y
 CONFIG_ARCH_MXC_HAS_NFC_V3_2=y
 CONFIG_MXC_BLUETOOTH_RFKILL=y
 CONFIG_IRAM_ALLOC=y
-CONFIG_DMA_ZONE_SIZE=96
+CONFIG_DMA_ZONE_SIZE=182
 CONFIG_ISP1504_MXC=y
 CONFIG_UTMI_MXC=y
 # CONFIG_MXC_IRQ_PRIOR is not set
index 01a29f0a0d12d71d74ceed915c87b29efff55e8f..96530dac2cfed6aeeb546d871b9201140dfc8e2c 100644 (file)
@@ -266,7 +266,7 @@ CONFIG_ARCH_MXC_HAS_NFC_V3=y
 CONFIG_ARCH_MXC_HAS_NFC_V3_2=y
 CONFIG_MXC_BLUETOOTH_RFKILL=y
 CONFIG_IRAM_ALLOC=y
-CONFIG_DMA_ZONE_SIZE=96
+CONFIG_DMA_ZONE_SIZE=182
 CONFIG_ISP1504_MXC=y
 CONFIG_UTMI_MXC=y
 # CONFIG_MXC_IRQ_PRIOR is not set
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/plat-mxc-double-dma-zone-max.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/plat-mxc-double-dma-zone-max.patch
new file mode 100644 (file)
index 0000000..cd13000
--- /dev/null
@@ -0,0 +1,35 @@
+Double the maximum value of DMA_ZONE_SIZE for i.MX (plat-mxc).
+
+This allows to increase the DMA_ZONE, which prevents memory allocation
+failures during playout V4L2, such as these:
+
+gplay: page allocation failure. order:10, mode:0xd1
+[<80038538>] (unwind_backtrace+0x0/0xf0) from [<8009c4c8>] (__alloc_pages_nodemask+0x500/0x568)
+[<8009c4c8>] (__alloc_pages_nodemask+0x500/0x568) from [<80038f70>] (__dma_alloc+0xec/0x2b8)
+[<80038f70>] (__dma_alloc+0xec/0x2b8) from [<800391b4>] (dma_alloc_coherent+0x54/0x60)
+[<800391b4>] (dma_alloc_coherent+0x54/0x60) from [<802e40b8>] (mxc_allocate_buffers+0x24/0x7c)
+[<802e40b8>] (mxc_allocate_buffers+0x24/0x7c) from [<802e6098>] (mxc_v4l2out_do_ioctl+0x488/0xd9c)
+[<802e6098>] (mxc_v4l2out_do_ioctl+0x488/0xd9c) from [<802d945c>] (video_usercopy+0x1e4/0x310)
+[<802d945c>] (video_usercopy+0x1e4/0x310) from [<802d889c>] (v4l2_ioctl+0x44/0x4c)
+[<802d889c>] (v4l2_ioctl+0x44/0x4c) from [<800d0bb4>] (vfs_ioctl+0x7c/0xac)
+[<800d0bb4>] (vfs_ioctl+0x7c/0xac) from [<800d1204>] (do_vfs_ioctl+0x52c/0x57c)
+[<800d1204>] (do_vfs_ioctl+0x52c/0x57c) from [<800d1288>] (sys_ioctl+0x34/0x54)
+[<800d1288>] (sys_ioctl+0x34/0x54) from [<80033f80>] (ret_fast_syscall+0x0/0x30)
+
+Although this fixes first symptoms, needs further analysis to see if this is
+a long term fix. Is this contiguous memory? Does it fragment over time, thus
+only delay the actual error occurance, etc?
+
+Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
+diff -Nur orig/arch/arm/plat-mxc/Kconfig git/arch/arm/plat-mxc/Kconfig
+--- orig/arch/arm/plat-mxc/Kconfig     2011-12-22 15:11:17.589371026 +0100
++++ git/arch/arm/plat-mxc/Kconfig      2011-12-22 16:10:19.148873805 +0100
+@@ -87,7 +87,7 @@
+ config DMA_ZONE_SIZE
+       int "DMA memory zone size"
+-      range 0 96
++      range 0 182
+       default 24
+       help
+         This is the size in MB for the DMA zone. The DMA zone is used for
index 759e9047d1895f2ab7dba8ba79de3cec8331a8c8..94bfb6f9d3f77e17b9d69e9b65ad6c6420495208 100644 (file)
@@ -4,13 +4,14 @@
 DESCRIPTION = "Linux kernel for imx platforms"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-PR = "r3"
+PR = "r4"
 
 inherit kernel
 COMPATIBLE_MACHINE = "(imx53qsb|imx53ard)"
 
 SRC_URI = "git://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git;tag=rel_imx_2.6.35_11.09.01;protocol=http \
            file://egalax_ts-enable-single-event-support.patch \
+           file://plat-mxc-double-dma-zone-max.patch \
            file://defconfig \
           "