From: Leon Woestenberg Date: Thu, 22 Dec 2011 19:30:50 +0000 (+0100) Subject: linux-imx: Allow larger DMA_ZONE, required by i.MX53 V4L2 sink. X-Git-Tag: 2.1~1955 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=b4d7c06e140968f2d57ecb47b208161424e1615e;p=meta-freescale.git linux-imx: Allow larger DMA_ZONE, required by i.MX53 V4L2 sink. More details in head of patch. Signed-off-by: Leon Woestenberg Signed-off-by: Otavio Salvador --- diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53ard/defconfig b/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53ard/defconfig index eca5a479..7ff4ccd6 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53ard/defconfig +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53ard/defconfig @@ -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 diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53qsb/defconfig b/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53qsb/defconfig index 01a29f0a..96530dac 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53qsb/defconfig +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/imx53qsb/defconfig @@ -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 index 00000000..cd130007 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/plat-mxc-double-dma-zone-max.patch @@ -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 +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 diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb index 759e9047..94bfb6f9 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb @@ -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 \ "