[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-487-g38f996b
Brought to you by:
sszy
|
From: Sébastien S. <ss...@us...> - 2014-11-19 16:19:35
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 38f996bd146eb83dfc5bd37197fd5b4258a071c1 (commit)
via 05bf05fcd6636ccfe00b8fc08be44184bbc1b68c (commit)
via d7fb18fb55cc2d69e0ce74b7873ba36772b3abf1 (commit)
via b6cb44d92964becb2cbe9fc89688b6e031e5f64d (commit)
via 4ab55a0408c7414d0467cf3e35f20d8a4c0b80d7 (commit)
from fc1d5bcdc7eecd6e6f6ba4d96c7626ebd6fdc783 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 38f996bd146eb83dfc5bd37197fd5b4258a071c1
Author: Sébastien Szymanski <ss...@us...>
Date: Tue Nov 18 12:00:03 2014 +0100
[LINUX] 3.18: apf6: dts: set wifi chip as non-removable
commit 05bf05fcd6636ccfe00b8fc08be44184bbc1b68c
Author: Sébastien Szymanski <ss...@us...>
Date: Tue Nov 18 11:44:38 2014 +0100
[LINUX] 3.18: apf6: add wandcam support.
The patches are from Steve Longerbeam's github [1].
[1] https://github.com/slongerbeam
commit d7fb18fb55cc2d69e0ce74b7873ba36772b3abf1
Author: Sébastien Szymanski <ss...@us...>
Date: Tue Nov 18 11:35:28 2014 +0100
[LINUX] 3.1{7,8}: apf{51,6}: fix pixel clock polarity.
The patches are from Steve Longerbeam's github [1].
[1] https://github.com/slongerbeam
commit b6cb44d92964becb2cbe9fc89688b6e031e5f64d
Author: Sébastien Szymanski <ss...@us...>
Date: Mon Nov 17 18:49:06 2014 +0100
[LINUX] 3.18: move to 3.18-rc5
commit 4ab55a0408c7414d0467cf3e35f20d8a4c0b80d7
Author: Sébastien Szymanski <ss...@us...>
Date: Thu Nov 13 09:48:48 2014 +0100
[LINUX] 3.18: move to 3.18-rc4
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf6_defconfig | 2 +-
...3.18-rc3.config => apf27-linux-3.18-rc5.config} | 0
...3.18-rc3.config => apf28-linux-3.18-rc4.config} | 0
...3.18-rc3.config => apf51-linux-3.18-rc5.config} | 0
...-3.18-rc3.config => apf6-linux-3.18-rc5.config} | 0
.../device/armadeus/apf6/apf6-linux-3.18.config | 4 +
...us-apf51-add_apf51_v1-and_v2_device_trees.patch | 40 +-
...rmadeus-add-apf6q-and-apf6dl-device-trees.patch | 18 +-
...ideomode-add-pos-neg-pixel-clock-polarity.patch | 44 +
...v3-crtc-Use-DRM-mode-flags-to-configure-p.patch | 32 +
patches/linux/{3.18-rc3 => 3.18-rc5} | 0
...us-apf51-add_apf51_v1-and_v2_device_trees.patch | 40 +-
...rmadeus-add-apf6q-and-apf6dl-device-trees.patch | 95 +-
...ideomode-add-pos-neg-pixel-clock-polarity.patch | 44 +
...v3-crtc-Use-DRM-mode-flags-to-configure-p.patch | 32 +
...00-gpu-ipu-v3-Add-Video-Deinterlacer-unit.patch | 413 ++
...gpu-ipu-cpmem-Add-ipu_cpmem_set_uv_offset.patch | 45 +
.../0602-ARM-dts-imx6qdl-Add-ipu-aliases.patch | 39 +
.../3.18/0603-gpu-ipu-v3-Add-ipu_get_num.patch | 73 +
...u-ipu-v3-Add-IDMA-channel-linking-support.patch | 168 +
.../0605-gpu-ipu-v3-Add-ipu_set_vdi_src_mux.patch | 58 +
...6-gpu-ipu-v3-Add-VDI-input-IDMAC-channels.patch | 30 +
.../3.18/0607-gpu-ipu-v3-Add-ipu_csi_set_src.patch | 47 +
.../3.18/0608-gpu-ipu-v3-Add-ipu_ic_set_src.patch | 49 +
...pu-ipu-v3-Fix-PAL-NTSC-frame-format-check.patch | 39 +
...imx6qdl-Flesh-out-MIPI-CSI2-receiver-node.patch | 33 +
.../0611-ARM-imx6q-clk-Add-video-27m-clock.patch | 41 +
...-sabrelite-add-video-capture-ports-and-en.patch | 199 +
...6-sabresd-add-video-capture-ports-and-end.patch | 213 +
...6-sabreauto-add-video-capture-ports-and-e.patch | 236 +
...imx6dl-Add-iomux-field-defines-for-imx6dl.patch | 31 +
...-imx-Add-imx6-video-capture-platform_data.patch | 128 +
...617-gpio-pca953x-Add-reset-gpios-property.patch | 68 +
...mx6-Add-device-tree-binding-documentation.patch | 439 ++
...Add-new-camera-interface-driver-for-i.MX6.patch | 4708 ++++++++++++++++++++
...ia-imx6-Add-support-for-MIPI-CSI-2-OV5640.patch | 2330 ++++++++++
...edia-imx6-Add-support-for-Parallel-OV5642.patch | 4357 ++++++++++++++++++
...mx6-Add-support-for-ADV7180-Video-Decoder.patch | 1406 ++++++
...mx6-camera-Add-deinterlace-motion-control.patch | 142 +
...imx6-camera-Add-VDIC-deinterlacing-subdev.patch | 1248 ++++++
...v7_defconfig-Enable-staging-video4linux-d.patch | 46 +
41 files changed, 16874 insertions(+), 63 deletions(-)
rename buildroot/target/device/armadeus/apf27/{apf27-linux-3.18-rc3.config => apf27-linux-3.18-rc5.config} (100%)
rename buildroot/target/device/armadeus/apf28/{apf28-linux-3.18-rc3.config => apf28-linux-3.18-rc4.config} (100%)
rename buildroot/target/device/armadeus/apf51/{apf51-linux-3.18-rc3.config => apf51-linux-3.18-rc5.config} (100%)
rename buildroot/target/device/armadeus/apf6/{apf6-linux-3.18-rc3.config => apf6-linux-3.18-rc5.config} (100%)
create mode 100644 patches/linux/3.17/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
create mode 100644 patches/linux/3.17/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
rename patches/linux/{3.18-rc3 => 3.18-rc5} (100%)
create mode 100644 patches/linux/3.18/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
create mode 100644 patches/linux/3.18/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
create mode 100644 patches/linux/3.18/0600-gpu-ipu-v3-Add-Video-Deinterlacer-unit.patch
create mode 100644 patches/linux/3.18/0601-gpu-ipu-cpmem-Add-ipu_cpmem_set_uv_offset.patch
create mode 100644 patches/linux/3.18/0602-ARM-dts-imx6qdl-Add-ipu-aliases.patch
create mode 100644 patches/linux/3.18/0603-gpu-ipu-v3-Add-ipu_get_num.patch
create mode 100644 patches/linux/3.18/0604-gpu-ipu-v3-Add-IDMA-channel-linking-support.patch
create mode 100644 patches/linux/3.18/0605-gpu-ipu-v3-Add-ipu_set_vdi_src_mux.patch
create mode 100644 patches/linux/3.18/0606-gpu-ipu-v3-Add-VDI-input-IDMAC-channels.patch
create mode 100644 patches/linux/3.18/0607-gpu-ipu-v3-Add-ipu_csi_set_src.patch
create mode 100644 patches/linux/3.18/0608-gpu-ipu-v3-Add-ipu_ic_set_src.patch
create mode 100644 patches/linux/3.18/0609-gpu-ipu-v3-Fix-PAL-NTSC-frame-format-check.patch
create mode 100644 patches/linux/3.18/0610-ARM-dts-imx6qdl-Flesh-out-MIPI-CSI2-receiver-node.patch
create mode 100644 patches/linux/3.18/0611-ARM-imx6q-clk-Add-video-27m-clock.patch
create mode 100644 patches/linux/3.18/0612-ARM-dts-imx-sabrelite-add-video-capture-ports-and-en.patch
create mode 100644 patches/linux/3.18/0613-ARM-dts-imx6-sabresd-add-video-capture-ports-and-end.patch
create mode 100644 patches/linux/3.18/0614-ARM-dts-imx6-sabreauto-add-video-capture-ports-and-e.patch
create mode 100644 patches/linux/3.18/0615-ARM-imx6dl-Add-iomux-field-defines-for-imx6dl.patch
create mode 100644 patches/linux/3.18/0616-ARM-imx-Add-imx6-video-capture-platform_data.patch
create mode 100644 patches/linux/3.18/0617-gpio-pca953x-Add-reset-gpios-property.patch
create mode 100644 patches/linux/3.18/0618-media-imx6-Add-device-tree-binding-documentation.patch
create mode 100644 patches/linux/3.18/0619-media-Add-new-camera-interface-driver-for-i.MX6.patch
create mode 100644 patches/linux/3.18/0620-media-imx6-Add-support-for-MIPI-CSI-2-OV5640.patch
create mode 100644 patches/linux/3.18/0621-media-imx6-Add-support-for-Parallel-OV5642.patch
create mode 100644 patches/linux/3.18/0622-media-imx6-Add-support-for-ADV7180-Video-Decoder.patch
create mode 100644 patches/linux/3.18/0623-media-imx6-camera-Add-deinterlace-motion-control.patch
create mode 100644 patches/linux/3.18/0624-media-imx6-camera-Add-VDIC-deinterlacing-subdev.patch
create mode 100644 patches/linux/3.18/0625-ARM-imx_v6_v7_defconfig-Enable-staging-video4linux-d.patch
diff --git a/buildroot/configs/apf6_defconfig b/buildroot/configs/apf6_defconfig
index c072a98..d181f1a 100644
--- a/buildroot/configs/apf6_defconfig
+++ b/buildroot/configs/apf6_defconfig
@@ -23,7 +23,7 @@ BR2_TARGET_ARMADEUS_NR_SDRAM="2"
BR2_TARGET_ARMADEUS_SDRAM_SIZE="512"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18-rc3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18-rc5"
BR2_LINUX_KERNEL_PATCH="../patches/linux/$(BR2_LINUX_KERNEL_VERSION)"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(BR2_LINUX_KERNEL_VERSION).config"
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-3.18-rc3.config b/buildroot/target/device/armadeus/apf27/apf27-linux-3.18-rc5.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf27/apf27-linux-3.18-rc3.config
rename to buildroot/target/device/armadeus/apf27/apf27-linux-3.18-rc5.config
diff --git a/buildroot/target/device/armadeus/apf28/apf28-linux-3.18-rc3.config b/buildroot/target/device/armadeus/apf28/apf28-linux-3.18-rc4.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf28/apf28-linux-3.18-rc3.config
rename to buildroot/target/device/armadeus/apf28/apf28-linux-3.18-rc4.config
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-3.18-rc3.config b/buildroot/target/device/armadeus/apf51/apf51-linux-3.18-rc5.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf51/apf51-linux-3.18-rc3.config
rename to buildroot/target/device/armadeus/apf51/apf51-linux-3.18-rc5.config
diff --git a/buildroot/target/device/armadeus/apf6/apf6-linux-3.18-rc3.config b/buildroot/target/device/armadeus/apf6/apf6-linux-3.18-rc5.config
similarity index 100%
rename from buildroot/target/device/armadeus/apf6/apf6-linux-3.18-rc3.config
rename to buildroot/target/device/armadeus/apf6/apf6-linux-3.18-rc5.config
diff --git a/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.config b/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.config
index 8f324ef..96e706e 100644
--- a/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.config
+++ b/buildroot/target/device/armadeus/apf6/apf6-linux-3.18.config
@@ -222,6 +222,10 @@ CONFIG_DMADEVICES=y
CONFIG_IMX_SDMA=y
CONFIG_MXS_DMA=y
CONFIG_STAGING=y
+CONFIG_STAGING_MEDIA=y
+# CONFIG_IMX6_CAMERA_OV5642 is not set
+CONFIG_IMX6_CAMERA_OV5640_MIPI=m
+# CONFIG_IMX6_CAMERA_ADV7180 is not set
CONFIG_DRM_IMX=y
CONFIG_DRM_IMX_FB_HELPER=y
CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
diff --git a/patches/linux/3.17/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch b/patches/linux/3.17/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
index f122428..912b3de 100644
--- a/patches/linux/3.17/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
+++ b/patches/linux/3.17/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
@@ -1,7 +1,7 @@
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51.dtsi
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -185,10 +185,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51-v1.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51-v1.dtsi
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -212,10 +212,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
+ model = "Armadeus Systems APF51 V1 module";
+ compatible = "armadeus,imx51-apf51", "fsl,imx51";
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51-v2.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51-v2.dtsi
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -286,10 +286,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev-v2.dts
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev-v2.dts
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -310,10 +310,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
+ model = "Armadeus Systems APF51Dev docking/development board with APF51 V2 SOM";
+ compatible = "armadeus,imx51-apf51dev", "armadeus,imx51-apf51", "fsl,imx51";
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev.dtsi
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -348,7 +348,7 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
-+ pixelclk-active = <0>;
++ pixelclk-active = <1>;
+ };
+ };
+
@@ -553,11 +553,11 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/Makefile
+Index: linux-3.17.2/arch/arm/boot/dts/Makefile
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/Makefile
-+++ linux-3.16/arch/arm/boot/dts/Makefile
-@@ -168,8 +168,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
+--- linux-3.17.2.orig/arch/arm/boot/dts/Makefile
++++ linux-3.17.2/arch/arm/boot/dts/Makefile
+@@ -177,8 +177,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
imx35-eukrea-mbimxsd35-baseboard.dtb \
imx35-pdk.dtb \
imx50-evk.dtb \
@@ -567,9 +567,9 @@ Index: linux-3.16/arch/arm/boot/dts/Makefile
imx51-babbage.dtb \
imx51-digi-connectcore-jsk.dtb \
imx51-eukrea-mbimxsd51-baseboard.dtb \
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dts
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51.dts
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/imx51-apf51.dts
+--- linux-3.17.2.orig/arch/arm/boot/dts/imx51-apf51.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
@@ -661,10 +661,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dts
- pinctrl-0 = <&pinctrl_uart3>;
- status = "okay";
-};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dts
+Index: linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev.dts
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/imx51-apf51dev.dts
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dts
+--- linux-3.17.2.orig/arch/arm/boot/dts/imx51-apf51dev.dts
++++ linux-3.17.2/arch/arm/boot/dts/imx51-apf51dev.dts
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Armadeus Systems - <su...@ar...>
diff --git a/patches/linux/3.17/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch b/patches/linux/3.17/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
index c744651..5cd7c56 100644
--- a/patches/linux/3.17/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
+++ b/patches/linux/3.17/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
@@ -1,7 +1,7 @@
-Index: linux-3.16/arch/arm/boot/dts/imx6q-apf6dev.dts
+Index: linux-3.17.2/arch/arm/boot/dts/imx6q-apf6dev.dts
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx6q-apf6dev.dts
++++ linux-3.17.2/arch/arm/boot/dts/imx6q-apf6dev.dts
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2014 Armadeus Systems
@@ -31,10 +31,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx6q-apf6dev.dts
+&sata {
+ status = "okay";
+};
-Index: linux-3.16/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx6qdl-apf6.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx6qdl-apf6.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx6qdl-apf6.dtsi
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2014 Armadeus Systems
@@ -168,10 +168,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+Index: linux-3.17.2/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
++++ linux-3.17.2/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
@@ -0,0 +1,451 @@
+/*
+ * Copyright 2014 Armadeus Systems
@@ -208,7 +208,7 @@ Index: linux-3.16/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
-+ pixelclk-active = <0>;
++ pixelclk-active = <1>;
+ };
+ };
+
@@ -624,10 +624,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx6dl-apf6dev.dts
+Index: linux-3.17.2/arch/arm/boot/dts/imx6dl-apf6dev.dts
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx6dl-apf6dev.dts
++++ linux-3.17.2/arch/arm/boot/dts/imx6dl-apf6dev.dts
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Armadeus Systems
diff --git a/patches/linux/3.17/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch b/patches/linux/3.17/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
new file mode 100644
index 0000000..55621be
--- /dev/null
+++ b/patches/linux/3.17/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
@@ -0,0 +1,44 @@
+From 20008681bca50b680be33e390065e44fd28a8c23 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Tue, 1 Apr 2014 18:08:40 -0700
+Subject: [PATCH 1/2] drm_modes: videomode: add pos/neg pixel clock polarity
+ flag
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/drm/drm_modes.c | 4 ++++
+ include/uapi/drm/drm_mode.h | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
+index d1b7d20..5016099 100644
+--- a/drivers/gpu/drm/drm_modes.c
++++ b/drivers/gpu/drm/drm_modes.c
+@@ -611,6 +611,10 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
+ dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
+ if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
+ dmode->flags |= DRM_MODE_FLAG_DBLCLK;
++ if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
++ dmode->flags |= DRM_MODE_FLAG_PCLK;
++ else if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
++ dmode->flags |= DRM_MODE_FLAG_NCLK;
+ drm_mode_set_name(dmode);
+ }
+ EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
+diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
+index 8d98cd0..d5d045c 100644
+--- a/include/uapi/drm/drm_mode.h
++++ b/include/uapi/drm/drm_mode.h
+@@ -72,6 +72,10 @@
+ #define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14)
+ #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
+ #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
++/* drive data on rising pixclk edge */
++#define DRM_MODE_FLAG_PCLK (1<<19)
++/* drive data on falling pixclk edge */
++#define DRM_MODE_FLAG_NCLK (1<<20)
+
+
+ /* DPMS flags */
+--
+1.8.5.5
diff --git a/patches/linux/3.17/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch b/patches/linux/3.17/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
new file mode 100644
index 0000000..e856278
--- /dev/null
+++ b/patches/linux/3.17/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
@@ -0,0 +1,32 @@
+From a921b974de6b9ae585787a7b46354e32a630145f Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Fri, 17 Oct 2014 18:23:18 -0700
+Subject: [PATCH 2/2] imx-drm: ipuv3-crtc: Use DRM mode flags to configure
+ pixel clock polarity
+
+Previously, pixel clock polarity was hardcoded and wasn't configurable.
+This patch adds support to configure the pixel clock polarity from the
+DRM mode flags.
+
+Signed-off-by: Mohsin Kazmi <moh...@me...>
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/staging/imx-drm/ipuv3-crtc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: linux-3.18-rc5/drivers/staging/imx-drm/ipuv3-crtc.c
+===================================================================
+--- linux-3.18-rc5.orig/drivers/staging/imx-drm/ipuv3-crtc.c
++++ linux-3.18-rc5/drivers/staging/imx-drm/ipuv3-crtc.c
+@@ -164,9 +164,10 @@ static int ipu_crtc_mode_set(struct drm_
+ sig_cfg.Hsync_pol = 1;
+ if (mode->flags & DRM_MODE_FLAG_PVSYNC)
+ sig_cfg.Vsync_pol = 1;
++ if (mode->flags & DRM_MODE_FLAG_PCLK)
++ sig_cfg.clk_pol = 1;
+
+ sig_cfg.enable_pol = 1;
+- sig_cfg.clk_pol = 0;
+ sig_cfg.width = mode->hdisplay;
+ sig_cfg.height = mode->vdisplay;
+ sig_cfg.pixel_fmt = out_pixel_fmt;
diff --git a/patches/linux/3.18-rc3 b/patches/linux/3.18-rc5
similarity index 100%
rename from patches/linux/3.18-rc3
rename to patches/linux/3.18-rc5
diff --git a/patches/linux/3.18/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch b/patches/linux/3.18/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
index f122428..5d755d5 100644
--- a/patches/linux/3.18/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
+++ b/patches/linux/3.18/0415-armadeus-apf51-add_apf51_v1-and_v2_device_trees.patch
@@ -1,7 +1,7 @@
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51.dtsi
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -185,10 +185,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51-v1.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51-v1.dtsi
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -212,10 +212,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v1.dtsi
+ model = "Armadeus Systems APF51 V1 module";
+ compatible = "armadeus,imx51-apf51", "fsl,imx51";
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51-v2.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51-v2.dtsi
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -286,10 +286,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51-v2.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev-v2.dts
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev-v2.dts
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -310,10 +310,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev-v2.dts
+ model = "Armadeus Systems APF51Dev docking/development board with APF51 V2 SOM";
+ compatible = "armadeus,imx51-apf51dev", "armadeus,imx51-apf51", "fsl,imx51";
+};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev.dtsi
===================================================================
--- /dev/null
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev.dtsi
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2014 Armadeus Systems - <su...@ar...>
@@ -348,7 +348,7 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
-+ pixelclk-active = <0>;
++ pixelclk-active = <1>;
+ };
+ };
+
@@ -553,11 +553,11 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dtsi
+ };
+ };
+};
-Index: linux-3.16/arch/arm/boot/dts/Makefile
+Index: linux-3.18-rc5/arch/arm/boot/dts/Makefile
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/Makefile
-+++ linux-3.16/arch/arm/boot/dts/Makefile
-@@ -168,8 +168,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
+--- linux-3.18-rc5.orig/arch/arm/boot/dts/Makefile
++++ linux-3.18-rc5/arch/arm/boot/dts/Makefile
+@@ -184,8 +184,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
imx35-eukrea-mbimxsd35-baseboard.dtb \
imx35-pdk.dtb \
imx50-evk.dtb \
@@ -567,9 +567,9 @@ Index: linux-3.16/arch/arm/boot/dts/Makefile
imx51-babbage.dtb \
imx51-digi-connectcore-jsk.dtb \
imx51-eukrea-mbimxsd51-baseboard.dtb \
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dts
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51.dts
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/imx51-apf51.dts
+--- linux-3.18-rc5.orig/arch/arm/boot/dts/imx51-apf51.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
@@ -661,10 +661,10 @@ Index: linux-3.16/arch/arm/boot/dts/imx51-apf51.dts
- pinctrl-0 = <&pinctrl_uart3>;
- status = "okay";
-};
-Index: linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dts
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev.dts
===================================================================
---- linux-3.16.orig/arch/arm/boot/dts/imx51-apf51dev.dts
-+++ linux-3.16/arch/arm/boot/dts/imx51-apf51dev.dts
+--- linux-3.18-rc5.orig/arch/arm/boot/dts/imx51-apf51dev.dts
++++ linux-3.18-rc5/arch/arm/boot/dts/imx51-apf51dev.dts
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Armadeus Systems - <su...@ar...>
diff --git a/patches/linux/3.18/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch b/patches/linux/3.18/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
index 5249994..62b078a 100644
--- a/patches/linux/3.18/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
+++ b/patches/linux/3.18/0450-armadeus-add-apf6q-and-apf6dl-device-trees.patch
@@ -1,7 +1,7 @@
-Index: linux-3.18-rc3/arch/arm/boot/dts/imx6q-apf6dev.dts
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx6q-apf6dev.dts
===================================================================
--- /dev/null
-+++ linux-3.18-rc3/arch/arm/boot/dts/imx6q-apf6dev.dts
++++ linux-3.18-rc5/arch/arm/boot/dts/imx6q-apf6dev.dts
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2014 Armadeus Systems
@@ -31,11 +31,11 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6q-apf6dev.dts
+&sata {
+ status = "okay";
+};
-Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx6qdl-apf6.dtsi
===================================================================
--- /dev/null
-+++ linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6.dtsi
-@@ -0,0 +1,132 @@
++++ linux-3.18-rc5/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+@@ -0,0 +1,133 @@
+/*
+ * Copyright 2014 Armadeus Systems
+ *
@@ -92,6 +92,7 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+&usdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usdhc1>;
++ non-removable;
+ status = "okay";
+};
+
@@ -168,11 +169,11 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6.dtsi
+ };
+ };
+};
-Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
===================================================================
--- /dev/null
-+++ linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
-@@ -0,0 +1,453 @@
++++ linux-3.18-rc5/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+@@ -0,0 +1,521 @@
+/*
+ * Copyright 2014 Armadeus Systems
+ *
@@ -209,7 +210,7 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ hsync-active = <1>;
+ vsync-active = <1>;
+ de-active = <1>;
-+ pixelclk-active = <0>;
++ pixelclk-active = <1>;
+ };
+ };
+
@@ -294,6 +295,29 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ spdif-controller = <&spdif>;
+ spdif-out;
+ };
++
++ v4l2-capture {
++ compatible = "fsl,imx6-v4l2-capture";
++ #address-cells = <1>;
++ #size-cells = <0>;
++ ipu = <&ipu1>;
++ status = "okay";
++
++ /* CSI0 */
++ port@0 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ reg = <1>;
++
++ /* MIPI CSI-2 virtual channel 0 */
++ csi1_vc0: endpoint@0 {
++ reg = <0>;
++ remote-endpoint = <&ov5640>;
++ data-lanes = <0 1>;
++ clock-lanes = <2>;
++ };
++ };
++ };
+};
+
+&audmux {
@@ -343,6 +367,30 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ min-y = <0>;
+ max-y = <480>;
+ };
++
++ mipi_camera: ov5640@3c {
++ compatible = "ovti,ov5640_mipi";
++ reg = <0x3c>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_camera_ov5640>;
++ clocks = <&clks 201>;
++ clock-names = "xclk";
++ xclk = <24000000>;
++ pwdn-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
++ reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>;
++
++ port {
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ ov5640: endpoint@1 {
++ reg = <1>;
++ remote-endpoint = <&csi1_vc0>;
++ data-lanes = <0 1>;
++ clock-lanes = <2>;
++ };
++ };
++ };
+};
+
+&i2c2 {
@@ -376,6 +424,21 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ remote-endpoint = <&display_in>;
+};
+
++&mipi_csi {
++ status = "okay";
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ /* Incoming port from sensor */
++ port {
++ mipi_csi2_0: endpoint {
++ remote-endpoint = <&ov5640>;
++ data-lanes = <0 1>;
++ clock-lanes = <2>;
++ };
++ };
++};
++
+&pcie {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pcie>;
@@ -461,6 +524,14 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ >;
+ };
+
++ pinctrl_camera_ov5640: cameragrp {
++ fsl,pins = <
++ MX6QDL_PAD_GPIO_3__XTALOSC_REF_CLK_24M 0x1b0b0 /* CSI_MCLK */
++ MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19 0x80000000
++ MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x80000000
++ >;
++ };
++
+ pinctrl_ecspi1: ecspi1grp {
+ fsl,pins = <
+ MX6QDL_PAD_KEY_COL1__ECSPI1_MISO 0x100b1
@@ -499,8 +570,6 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ MX6QDL_PAD_DISP0_DAT22__GPIO5_IO16 0x80000000
+ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x80000000
+ MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18 0x80000000
-+ MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19 0x80000000
-+ MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x80000000
+ MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21 0x80000000
+ >;
+ };
@@ -626,10 +695,10 @@ Index: linux-3.18-rc3/arch/arm/boot/dts/imx6qdl-apf6dev.dtsi
+ };
+ };
+};
-Index: linux-3.18-rc3/arch/arm/boot/dts/imx6dl-apf6dev.dts
+Index: linux-3.18-rc5/arch/arm/boot/dts/imx6dl-apf6dev.dts
===================================================================
--- /dev/null
-+++ linux-3.18-rc3/arch/arm/boot/dts/imx6dl-apf6dev.dts
++++ linux-3.18-rc5/arch/arm/boot/dts/imx6dl-apf6dev.dts
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Armadeus Systems
diff --git a/patches/linux/3.18/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch b/patches/linux/3.18/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
new file mode 100644
index 0000000..55621be
--- /dev/null
+++ b/patches/linux/3.18/0511-drm_modes-videomode-add-pos-neg-pixel-clock-polarity.patch
@@ -0,0 +1,44 @@
+From 20008681bca50b680be33e390065e44fd28a8c23 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Tue, 1 Apr 2014 18:08:40 -0700
+Subject: [PATCH 1/2] drm_modes: videomode: add pos/neg pixel clock polarity
+ flag
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/drm/drm_modes.c | 4 ++++
+ include/uapi/drm/drm_mode.h | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
+index d1b7d20..5016099 100644
+--- a/drivers/gpu/drm/drm_modes.c
++++ b/drivers/gpu/drm/drm_modes.c
+@@ -611,6 +611,10 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
+ dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
+ if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
+ dmode->flags |= DRM_MODE_FLAG_DBLCLK;
++ if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
++ dmode->flags |= DRM_MODE_FLAG_PCLK;
++ else if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
++ dmode->flags |= DRM_MODE_FLAG_NCLK;
+ drm_mode_set_name(dmode);
+ }
+ EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
+diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
+index 8d98cd0..d5d045c 100644
+--- a/include/uapi/drm/drm_mode.h
++++ b/include/uapi/drm/drm_mode.h
+@@ -72,6 +72,10 @@
+ #define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14)
+ #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
+ #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
++/* drive data on rising pixclk edge */
++#define DRM_MODE_FLAG_PCLK (1<<19)
++/* drive data on falling pixclk edge */
++#define DRM_MODE_FLAG_NCLK (1<<20)
+
+
+ /* DPMS flags */
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch b/patches/linux/3.18/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
new file mode 100644
index 0000000..e856278
--- /dev/null
+++ b/patches/linux/3.18/0512-imx-drm-ipuv3-crtc-Use-DRM-mode-flags-to-configure-p.patch
@@ -0,0 +1,32 @@
+From a921b974de6b9ae585787a7b46354e32a630145f Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Fri, 17 Oct 2014 18:23:18 -0700
+Subject: [PATCH 2/2] imx-drm: ipuv3-crtc: Use DRM mode flags to configure
+ pixel clock polarity
+
+Previously, pixel clock polarity was hardcoded and wasn't configurable.
+This patch adds support to configure the pixel clock polarity from the
+DRM mode flags.
+
+Signed-off-by: Mohsin Kazmi <moh...@me...>
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/staging/imx-drm/ipuv3-crtc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: linux-3.18-rc5/drivers/staging/imx-drm/ipuv3-crtc.c
+===================================================================
+--- linux-3.18-rc5.orig/drivers/staging/imx-drm/ipuv3-crtc.c
++++ linux-3.18-rc5/drivers/staging/imx-drm/ipuv3-crtc.c
+@@ -164,9 +164,10 @@ static int ipu_crtc_mode_set(struct drm_
+ sig_cfg.Hsync_pol = 1;
+ if (mode->flags & DRM_MODE_FLAG_PVSYNC)
+ sig_cfg.Vsync_pol = 1;
++ if (mode->flags & DRM_MODE_FLAG_PCLK)
++ sig_cfg.clk_pol = 1;
+
+ sig_cfg.enable_pol = 1;
+- sig_cfg.clk_pol = 0;
+ sig_cfg.width = mode->hdisplay;
+ sig_cfg.height = mode->vdisplay;
+ sig_cfg.pixel_fmt = out_pixel_fmt;
diff --git a/patches/linux/3.18/0600-gpu-ipu-v3-Add-Video-Deinterlacer-unit.patch b/patches/linux/3.18/0600-gpu-ipu-v3-Add-Video-Deinterlacer-unit.patch
new file mode 100644
index 0000000..ad4c298
--- /dev/null
+++ b/patches/linux/3.18/0600-gpu-ipu-v3-Add-Video-Deinterlacer-unit.patch
@@ -0,0 +1,413 @@
+From c22b1ebf8b920eb930f99696ec404fbd0652bb6a Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Wed, 27 Aug 2014 10:21:05 -0700
+Subject: [PATCH 600/625] gpu: ipu-v3: Add Video Deinterlacer unit
+
+Adds the Video Deinterlacer (VDIC) unit.
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/ipu-v3/Makefile | 2 +-
+ drivers/gpu/ipu-v3/ipu-common.c | 11 ++
+ drivers/gpu/ipu-v3/ipu-prv.h | 6 +
+ drivers/gpu/ipu-v3/ipu-vdi.c | 266 ++++++++++++++++++++++++++++++++++++++++
+ include/video/imx-ipu-v3.h | 27 ++++
+ 5 files changed, 311 insertions(+), 1 deletion(-)
+ create mode 100644 drivers/gpu/ipu-v3/ipu-vdi.c
+
+diff --git a/drivers/gpu/ipu-v3/Makefile b/drivers/gpu/ipu-v3/Makefile
+index 107ec23..aeba9dc 100644
+--- a/drivers/gpu/ipu-v3/Makefile
++++ b/drivers/gpu/ipu-v3/Makefile
+@@ -1,4 +1,4 @@
+ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
+
+ imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
+- ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o
++ ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o ipu-vdi.o
+diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
+index f707d25..95fd9af 100644
+--- a/drivers/gpu/ipu-v3/ipu-common.c
++++ b/drivers/gpu/ipu-v3/ipu-common.c
+@@ -827,6 +827,14 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
+ goto err_ic;
+ }
+
++ ret = ipu_vdi_init(ipu, dev, ipu_base + devtype->vdi_ofs,
++ IPU_CONF_VDI_EN | IPU_CONF_ISP_EN |
++ IPU_CONF_IC_INPUT);
++ if (ret) {
++ unit = "vdi";
++ goto err_vdi;
++ }
++
+ ret = ipu_di_init(ipu, dev, 0, ipu_base + devtype->disp0_ofs,
+ IPU_CONF_DI0_EN, ipu_clk);
+ if (ret) {
+@@ -881,6 +889,8 @@ err_dc:
+ err_di_1:
+ ipu_di_exit(ipu, 0);
+ err_di_0:
++ ipu_vdi_exit(ipu);
++err_vdi:
+ ipu_ic_exit(ipu);
+ err_ic:
+ ipu_csi_exit(ipu, 1);
+@@ -965,6 +975,7 @@ static void ipu_submodules_exit(struct ipu_soc *ipu)
+ ipu_dc_exit(ipu);
+ ipu_di_exit(ipu, 1);
+ ipu_di_exit(ipu, 0);
++ ipu_vdi_exit(ipu);
+ ipu_ic_exit(ipu);
+ ipu_csi_exit(ipu, 1);
+ ipu_csi_exit(ipu, 0);
+diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h
+index bfb1e8a..845f64c 100644
+--- a/drivers/gpu/ipu-v3/ipu-prv.h
++++ b/drivers/gpu/ipu-v3/ipu-prv.h
+@@ -138,6 +138,7 @@ struct ipu_dc_priv;
+ struct ipu_dmfc_priv;
+ struct ipu_di;
+ struct ipu_ic_priv;
++struct ipu_vdi;
+ struct ipu_smfc_priv;
+
+ struct ipu_devtype;
+@@ -169,6 +170,7 @@ struct ipu_soc {
+ struct ipu_di *di_priv[2];
+ struct ipu_csi *csi_priv[2];
+ struct ipu_ic_priv *ic_priv;
++ struct ipu_vdi *vdi_priv;
+ struct ipu_smfc_priv *smfc_priv;
+ };
+
+@@ -199,6 +201,10 @@ int ipu_ic_init(struct ipu_soc *ipu, struct device *dev,
+ unsigned long base, unsigned long tpmem_base);
+ void ipu_ic_exit(struct ipu_soc *ipu);
+
++int ipu_vdi_init(struct ipu_soc *ipu, struct device *dev,
++ unsigned long base, u32 module);
++void ipu_vdi_exit(struct ipu_soc *ipu);
++
+ int ipu_di_init(struct ipu_soc *ipu, struct device *dev, int id,
+ unsigned long base, u32 module, struct clk *ipu_clk);
+ void ipu_di_exit(struct ipu_soc *ipu, int id);
+diff --git a/drivers/gpu/ipu-v3/ipu-vdi.c b/drivers/gpu/ipu-v3/ipu-vdi.c
+new file mode 100644
+index 0000000..3d20f42
+--- /dev/null
++++ b/drivers/gpu/ipu-v3/ipu-vdi.c
+@@ -0,0 +1,266 @@
++/*
++ * Copyright (C) 2012 Mentor Graphics Inc.
++ * Copyright (C) 2005-2009 Freescale Semiconductor, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ */
++#include <linux/export.h>
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/delay.h>
++#include <linux/io.h>
++#include <linux/err.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/clk-provider.h>
++#include <linux/clkdev.h>
++#include <uapi/linux/v4l2-mediabus.h>
++
++#include "ipu-prv.h"
++
++struct ipu_vdi {
++ void __iomem *base;
++ u32 module;
++ spinlock_t lock;
++ int use_count;
++ struct ipu_soc *ipu;
++};
++
++
++/* VDI Register Offsets */
++#define VDI_FSIZE 0x0000
++#define VDI_C 0x0004
++
++/* VDI Register Fields */
++#define VDI_C_CH_420 (0 << 1)
++#define VDI_C_CH_422 (1 << 1)
++#define VDI_C_MOT_SEL_MASK (0x3 << 2)
++#define VDI_C_MOT_SEL_FULL (2 << 2)
++#define VDI_C_MOT_SEL_LOW (1 << 2)
++#define VDI_C_MOT_SEL_MED (0 << 2)
++#define VDI_C_BURST_SIZE1_4 (3 << 4)
++#define VDI_C_BURST_SIZE2_4 (3 << 8)
++#define VDI_C_BURST_SIZE3_4 (3 << 12)
++#define VDI_C_BURST_SIZE_MASK 0xF
++#define VDI_C_BURST_SIZE1_OFFSET 4
++#define VDI_C_BURST_SIZE2_OFFSET 8
++#define VDI_C_BURST_SIZE3_OFFSET 12
++#define VDI_C_VWM1_SET_1 (0 << 16)
++#define VDI_C_VWM1_SET_2 (1 << 16)
++#define VDI_C_VWM1_CLR_2 (1 << 19)
++#define VDI_C_VWM3_SET_1 (0 << 22)
++#define VDI_C_VWM3_SET_2 (1 << 22)
++#define VDI_C_VWM3_CLR_2 (1 << 25)
++#define VDI_C_TOP_FIELD_MAN_1 (1 << 30)
++#define VDI_C_TOP_FIELD_AUTO_1 (1 << 31)
++
++static inline u32 ipu_vdi_read(struct ipu_vdi *vdi, unsigned offset)
++{
++ return readl(vdi->base + offset);
++}
++
++static inline void ipu_vdi_write(struct ipu_vdi *vdi, u32 value,
++ unsigned offset)
++{
++ writel(value, vdi->base + offset);
++}
++
++static void __ipu_vdi_set_top_field_man(struct ipu_vdi *vdi, bool top_field_0)
++{
++ u32 reg;
++
++ reg = ipu_vdi_read(vdi, VDI_C);
++ if (top_field_0)
++ reg &= ~VDI_C_TOP_FIELD_MAN_1;
++ else
++ reg |= VDI_C_TOP_FIELD_MAN_1;
++ ipu_vdi_write(vdi, reg, VDI_C);
++}
++
++static void __ipu_vdi_set_motion(struct ipu_vdi *vdi,
++ enum ipu_motion_sel motion_sel)
++{
++ u32 reg;
++
++ reg = ipu_vdi_read(vdi, VDI_C);
++
++ reg &= ~VDI_C_MOT_SEL_MASK;
++
++ switch (motion_sel) {
++ case MED_MOTION:
++ reg |= VDI_C_MOT_SEL_MED;
++ break;
++ case HIGH_MOTION:
++ reg |= VDI_C_MOT_SEL_FULL;
++ break;
++ default:
++ reg |= VDI_C_MOT_SEL_LOW;
++ break;
++ }
++
++ ipu_vdi_write(vdi, reg, VDI_C);
++}
++
++void ipu_vdi_setup(struct ipu_vdi *vdi, u32 code, int xres, int yres,
++ u32 field, enum ipu_motion_sel motion_sel)
++{
++ unsigned long flags;
++ u32 pixel_fmt, reg;
++
++ spin_lock_irqsave(&vdi->lock, flags);
++
++ reg = ((yres - 1) << 16) | (xres - 1);
++ ipu_vdi_write(vdi, reg, VDI_FSIZE);
++
++ /*
++ * Full motion, only vertical filter is used.
++ * Burst size is 4 accesses
++ */
++ if (code == V4L2_MBUS_FMT_UYVY8_2X8 ||
++ code == V4L2_MBUS_FMT_UYVY8_1X16 ||
++ code == V4L2_MBUS_FMT_YUYV8_2X8 ||
++ code == V4L2_MBUS_FMT_YUYV8_1X16)
++ pixel_fmt = VDI_C_CH_422;
++ else
++ pixel_fmt = VDI_C_CH_420;
++
++ reg = ipu_vdi_read(vdi, VDI_C);
++ reg |= pixel_fmt;
++ reg |= VDI_C_BURST_SIZE2_4;
++ reg |= VDI_C_BURST_SIZE1_4 | VDI_C_VWM1_CLR_2;
++ reg |= VDI_C_BURST_SIZE3_4 | VDI_C_VWM3_CLR_2;
++ ipu_vdi_write(vdi, reg, VDI_C);
++
++ if (field == V4L2_FIELD_INTERLACED_TB)
++ __ipu_vdi_set_top_field_man(vdi, false);
++ else if (field == V4L2_FIELD_INTERLACED_BT)
++ __ipu_vdi_set_top_field_man(vdi, true);
++
++ __ipu_vdi_set_motion(vdi, motion_sel);
++
++ spin_unlock_irqrestore(&vdi->lock, flags);
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_setup);
++
++void ipu_vdi_unsetup(struct ipu_vdi *vdi)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&vdi->lock, flags);
++ ipu_vdi_write(vdi, 0, VDI_FSIZE);
++ ipu_vdi_write(vdi, 0, VDI_C);
++ spin_unlock_irqrestore(&vdi->lock, flags);
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_unsetup);
++
++void ipu_vdi_toggle_top_field_man(struct ipu_vdi *vdi)
++{
++ unsigned long flags;
++ u32 reg;
++ u32 mask_reg;
++
++ spin_lock_irqsave(&vdi->lock, flags);
++
++ reg = ipu_vdi_read(vdi, VDI_C);
++ mask_reg = reg & VDI_C_TOP_FIELD_MAN_1;
++ if (mask_reg == VDI_C_TOP_FIELD_MAN_1)
++ reg &= ~VDI_C_TOP_FIELD_MAN_1;
++ else
++ reg |= VDI_C_TOP_FIELD_MAN_1;
++
++ ipu_vdi_write(vdi, reg, VDI_C);
++
++ spin_unlock_irqrestore(&vdi->lock, flags);
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_toggle_top_field_man);
++
++int ipu_vdi_set_src(struct ipu_vdi *vdi, bool csi)
++{
++ ipu_set_vdi_src_mux(vdi->ipu, csi);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_set_src);
++
++int ipu_vdi_enable(struct ipu_vdi *vdi)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&vdi->lock, flags);
++
++ if (!vdi->use_count)
++ ipu_module_enable(vdi->ipu, vdi->module);
++
++ vdi->use_count++;
++
++ spin_unlock_irqrestore(&vdi->lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_enable);
++
++int ipu_vdi_disable(struct ipu_vdi *vdi)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&vdi->lock, flags);
++
++ vdi->use_count--;
++
++ if (!vdi->use_count)
++ ipu_module_disable(vdi->ipu, vdi->module);
++
++ if (vdi->use_count < 0)
++ vdi->use_count = 0;
++
++ spin_unlock_irqrestore(&vdi->lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_disable);
++
++struct ipu_vdi *ipu_vdi_get(struct ipu_soc *ipu)
++{
++ return ipu->vdi_priv;
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_get);
++
++void ipu_vdi_put(struct ipu_vdi *vdi)
++{
++}
++EXPORT_SYMBOL_GPL(ipu_vdi_put);
++
++int ipu_vdi_init(struct ipu_soc *ipu, struct device *dev,
++ unsigned long base, u32 module)
++{
++ struct ipu_vdi *vdi;
++
++ vdi = devm_kzalloc(dev, sizeof(*vdi), GFP_KERNEL);
++ if (!vdi)
++ return -ENOMEM;
++
++ ipu->vdi_priv = vdi;
++
++ spin_lock_init(&vdi->lock);
++ vdi->module = module;
++ vdi->base = devm_ioremap(dev, base, PAGE_SIZE);
++ if (!vdi->base)
++ return -ENOMEM;
++
++ dev_dbg(dev, "VDI base: 0x%08lx remapped to %p\n", base, vdi->base);
++ vdi->ipu = ipu;
++
++ return 0;
++}
++
++void ipu_vdi_exit(struct ipu_soc *ipu)
++{
++}
+diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
+index c74bf4a..b3f09726 100644
+--- a/include/video/imx-ipu-v3.h
++++ b/include/video/imx-ipu-v3.h
+@@ -91,6 +91,16 @@ enum ipu_color_space {
+ IPUV3_COLORSPACE_UNKNOWN,
+ };
+
++/*
++ * Enumeration of VDI MOTION select
++ */
++enum ipu_motion_sel {
++ MOTION_NONE = 0,
++ LOW_MOTION,
++ MED_MOTION,
++ HIGH_MOTION,
++};
++
+ struct ipuv3_channel;
+
+ enum ipu_channel_irq {
+@@ -329,6 +339,23 @@ void ipu_ic_put(struct ipu_ic *ic);
+ void ipu_ic_dump(struct ipu_ic *ic);
+
+ /*
++ * IPU Video De-Interlacer (vdi) functions
++ */
++struct ipu_vdi;
++void ipu_vdi_set_top_field_man(struct ipu_vdi *vdi, bool top_field_0);
++void ipu_vdi_set_motion(struct ipu_vdi *vdi, enum ipu_motion_sel motion_sel);
++void ipu_vdi_setup(struct ipu_vdi *vdi,
++ u32 code, int xres, int yres, u32 field,
++ enum ipu_motion_sel motion_sel);
++void ipu_vdi_unsetup(struct ipu_vdi *vdi);
++void ipu_vdi_toggle_top_field_man(struct ipu_vdi *vdi);
++int ipu_vdi_set_src(struct ipu_vdi *vdi, bool csi);
++int ipu_vdi_enable(struct ipu_vdi *vdi);
++int ipu_vdi_disable(struct ipu_vdi *vdi);
++struct ipu_vdi *ipu_vdi_get(struct ipu_soc *ipu);
++void ipu_vdi_put(struct ipu_vdi *vdi);
++
++/*
+ * IPU Sensor Multiple FIFO Controller (SMFC) functions
+ */
+ struct ipu_smfc *ipu_smfc_get(struct ipu_soc *ipu, unsigned int chno);
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0601-gpu-ipu-cpmem-Add-ipu_cpmem_set_uv_offset.patch b/patches/linux/3.18/0601-gpu-ipu-cpmem-Add-ipu_cpmem_set_uv_offset.patch
new file mode 100644
index 0000000..d8287fc
--- /dev/null
+++ b/patches/linux/3.18/0601-gpu-ipu-cpmem-Add-ipu_cpmem_set_uv_offset.patch
@@ -0,0 +1,45 @@
+From b5ad5d840669c1586c67809f2e5aa538ed4c029b Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Sun, 31 Aug 2014 16:21:37 -0700
+Subject: [PATCH 601/625] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset()
+
+Adds ipu_cpmem_set_uv_offset(), to set planar U/V offsets.
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/ipu-v3/ipu-cpmem.c | 7 +++++++
+ include/video/imx-ipu-v3.h | 1 +
+ 2 files changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
+index 3bf05bc..2c93e9c 100644
+--- a/drivers/gpu/ipu-v3/ipu-cpmem.c
++++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
+@@ -253,6 +253,13 @@ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf)
+ }
+ EXPORT_SYMBOL_GPL(ipu_cpmem_set_buffer);
+
++void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off)
++{
++ ipu_ch_param_write_field(ch, IPU_FIELD_UBO, u_off / 8);
++ ipu_ch_param_write_field(ch, IPU_FIELD_VBO, v_off / 8);
++}
++EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
++
+ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
+ {
+ ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);
+diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
+index b3f09726..c7517d3 100644
+--- a/include/video/imx-ipu-v3.h
++++ b/include/video/imx-ipu-v3.h
+@@ -205,6 +205,7 @@ void ipu_cpmem_set_resolution(struct ipuv3_channel *ch, int xres, int yres);
+ void ipu_cpmem_set_stride(struct ipuv3_channel *ch, int stride);
+ void ipu_cpmem_set_high_priority(struct ipuv3_channel *ch);
+ void ipu_cpmem_set_buffer(struct ipuv3_channel *ch, int bufnum, dma_addr_t buf);
++void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off);
+ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride);
+ void ipu_cpmem_set_axi_id(struct ipuv3_channel *ch, u32 id);
+ void ipu_cpmem_set_burstsize(struct ipuv3_channel *ch, int burstsize);
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0602-ARM-dts-imx6qdl-Add-ipu-aliases.patch b/patches/linux/3.18/0602-ARM-dts-imx6qdl-Add-ipu-aliases.patch
new file mode 100644
index 0000000..19bbe6a
--- /dev/null
+++ b/patches/linux/3.18/0602-ARM-dts-imx6qdl-Add-ipu-aliases.patch
@@ -0,0 +1,39 @@
+From 77e0aa9b059b4896875f12044e756dddfb685122 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Tue, 26 Aug 2014 10:02:49 -0700
+Subject: [PATCH 602/625] ARM: dts: imx6qdl: Add ipu aliases
+
+Add ipu0 (and ipu1 for quad) aliases to ipu1/ipu2 nodes respectively.
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ arch/arm/boot/dts/imx6q.dtsi | 1 +
+ arch/arm/boot/dts/imx6qdl.dtsi | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
+index e9f3646..585a541 100644
+--- a/arch/arm/boot/dts/imx6q.dtsi
++++ b/arch/arm/boot/dts/imx6q.dtsi
+@@ -14,6 +14,7 @@
+
+ / {
+ aliases {
++ ipu1 = &ipu2;
+ spi4 = &ecspi5;
+ };
+
+diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
+index 9596ed5..c9b8613 100644
+--- a/arch/arm/boot/dts/imx6qdl.dtsi
++++ b/arch/arm/boot/dts/imx6qdl.dtsi
+@@ -30,6 +30,7 @@
+ i2c0 = &i2c1;
+ i2c1 = &i2c2;
+ i2c2 = &i2c3;
++ ipu0 = &ipu1;
+ mmc0 = &usdhc1;
+ mmc1 = &usdhc2;
+ mmc2 = &usdhc3;
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0603-gpu-ipu-v3-Add-ipu_get_num.patch b/patches/linux/3.18/0603-gpu-ipu-v3-Add-ipu_get_num.patch
new file mode 100644
index 0000000..d61387f
--- /dev/null
+++ b/patches/linux/3.18/0603-gpu-ipu-v3-Add-ipu_get_num.patch
@@ -0,0 +1,73 @@
+From 30274ff35742415d8771043755f396662bb32ec4 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Thu, 1 May 2014 10:47:32 -0700
+Subject: [PATCH 603/625] gpu: ipu-v3: Add ipu_get_num()
+
+Adds of-alias id to ipu_soc and retrieve with ipu_get_num().
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/ipu-v3/ipu-common.c | 8 ++++++++
+ drivers/gpu/ipu-v3/ipu-prv.h | 1 +
+ include/video/imx-ipu-v3.h | 1 +
+ 3 files changed, 10 insertions(+)
+
+diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
+index 95fd9af..5c8cfa3 100644
+--- a/drivers/gpu/ipu-v3/ipu-common.c
++++ b/drivers/gpu/ipu-v3/ipu-common.c
+@@ -44,6 +44,12 @@ static inline void ipu_cm_write(struct ipu_soc *ipu, u32 value, unsigned offset)
+ writel(value, ipu->cm_reg + offset);
+ }
+
++int ipu_get_num(struct ipu_soc *ipu)
++{
++ return ipu->id;
++}
++EXPORT_SYMBOL_GPL(ipu_get_num);
++
+ void ipu_srm_dp_sync_update(struct ipu_soc *ipu)
+ {
+ u32 val;
+@@ -1200,6 +1206,7 @@ static int ipu_probe(struct platform_device *pdev)
+ {
+ const struct of_device_id *of_id =
+ of_match_device(imx_ipu_dt_ids, &pdev->dev);
++ struct device_node *np = pdev->dev.of_node;
+ struct ipu_soc *ipu;
+ struct resource *res;
+ unsigned long ipu_base;
+@@ -1228,6 +1235,7 @@ static int ipu_probe(struct platform_device *pdev)
+ ipu->channel[i].ipu = ipu;
+ ipu->devtype = devtype;
+ ipu->ipu_type = devtype->type;
++ ipu->id = of_alias_get_id(np, "ipu");
+
+ spin_lock_init(&ipu->lock);
+ mutex_init(&ipu->channel_lock);
+diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h
+index 845f64c..02057d8 100644
+--- a/drivers/gpu/ipu-v3/ipu-prv.h
++++ b/drivers/gpu/ipu-v3/ipu-prv.h
+@@ -153,6 +153,7 @@ struct ipu_soc {
+ void __iomem *cm_reg;
+ void __iomem *idmac_reg;
+
++ int id;
+ int usecount;
+
+ struct clk *clk;
+diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
+index c7517d3..51e4103 100644
+--- a/include/video/imx-ipu-v3.h
++++ b/include/video/imx-ipu-v3.h
+@@ -159,6 +159,7 @@ int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
+ /*
+ * IPU Common functions
+ */
++int ipu_get_num(struct ipu_soc *ipu);
+ void ipu_set_csi_src_mux(struct ipu_soc *ipu, int csi_id, bool mipi_csi2);
+ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi);
+ void ipu_dump(struct ipu_soc *ipu);
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0604-gpu-ipu-v3-Add-IDMA-channel-linking-support.patch b/patches/linux/3.18/0604-gpu-ipu-v3-Add-IDMA-channel-linking-support.patch
new file mode 100644
index 0000000..f9cad92
--- /dev/null
+++ b/patches/linux/3.18/0604-gpu-ipu-v3-Add-IDMA-channel-linking-support.patch
@@ -0,0 +1,168 @@
+From ed334e6417c2e3a8afb5befb6be429a2cc3184e1 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Tue, 26 Aug 2014 18:07:49 -0700
+Subject: [PATCH 604/625] gpu: ipu-v3: Add IDMA channel linking support
+
+Adds functions to link and unlink IDMAC source channels to sink
+channels.
+
+So far the following links are supported:
+
+IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC
+PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF
+IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP
+
+More links can be added to the idmac_link_info[] array.
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/ipu-v3/ipu-common.c | 112 ++++++++++++++++++++++++++++++++++++++++
+ include/video/imx-ipu-v3.h | 3 ++
+ 2 files changed, 115 insertions(+)
+
+diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
+index 5c8cfa3..85ca6d0 100644
+--- a/drivers/gpu/ipu-v3/ipu-common.c
++++ b/drivers/gpu/ipu-v3/ipu-common.c
+@@ -724,6 +724,118 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi)
+ }
+ EXPORT_SYMBOL_GPL(ipu_set_ic_src_mux);
+
++
++/* IDMAC Channel Linking */
++
++struct idmac_link_reg_info {
++ int chno;
++ u32 reg;
++ int shift;
++ int bits;
++ u32 sel;
++};
++
++struct idmac_link_info {
++ struct idmac_link_reg_info src;
++ struct idmac_link_reg_info sink;
++};
++
++static const struct idmac_link_info idmac_link_info[] = {
++ {
++ .src = { 20, IPU_FS_PROC_FLOW1, 0, 4, 7 },
++ .sink = { 45, IPU_FS_PROC_FLOW2, 0, 4, 1 },
++ }, {
++ .src = { 21, IPU_FS_PROC_FLOW1, 8, 4, 8 },
++ .sink = { 46, IPU_FS_PROC_FLOW2, 4, 4, 1 },
++ }, {
++ .src = { 22, IPU_FS_PROC_FLOW1, 16, 4, 5 },
++ .sink = { 47, IPU_FS_PROC_FLOW2, 12, 4, 3 },
++ },
++};
++
++static const struct idmac_link_info *find_idmac_link_info(
++ struct ipuv3_channel *src, struct ipuv3_channel *sink)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(idmac_link_info); i++) {
++ if (src->num == idmac_link_info[i].src.chno &&
++ sink->num == idmac_link_info[i].sink.chno)
++ return &idmac_link_info[i];
++ }
++
++ return NULL;
++}
++
++/*
++ * Links an IDMAC source channel to a sink channel.
++ */
++int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink)
++{
++ struct ipu_soc *ipu = src->ipu;
++ const struct idmac_link_info *link;
++ u32 src_reg, sink_reg, src_mask, sink_mask;
++ unsigned long flags;
++
++ link = find_idmac_link_info(src, sink);
++ if (!link)
++ return -EINVAL;
++
++ src_mask = ((1 << link->src.bits) - 1) << link->src.shift;
++ sink_mask = ((1 << link->sink.bits) - 1) << link->sink.shift;
++
++ spin_lock_irqsave(&ipu->lock, flags);
++
++ src_reg = ipu_cm_read(ipu, link->src.reg);
++ sink_reg = ipu_cm_read(ipu, link->sink.reg);
++
++ src_reg &= ~src_mask;
++ src_reg |= (link->src.sel << link->src.shift);
++
++ sink_reg &= ~sink_mask;
++ sink_reg |= (link->sink.sel << link->sink.shift);
++
++ ipu_cm_write(ipu, src_reg, link->src.reg);
++ ipu_cm_write(ipu, sink_reg, link->sink.reg);
++
++ spin_unlock_irqrestore(&ipu->lock, flags);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(ipu_idmac_link);
++
++/*
++ * Unlinks IDMAC source and sink channels.
++ */
++int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink)
++{
++ struct ipu_soc *ipu = src->ipu;
++ const struct idmac_link_info *link;
++ u32 src_reg, sink_reg, src_mask, sink_mask;
++ unsigned long flags;
++
++ link = find_idmac_link_info(src, sink);
++ if (!link)
++ return -EINVAL;
++
++ src_mask = ((1 << link->src.bits) - 1) << link->src.shift;
++ sink_mask = ((1 << link->sink.bits) - 1) << link->sink.shift;
++
++ spin_lock_irqsave(&ipu->lock, flags);
++
++ src_reg = ipu_cm_read(ipu, link->src.reg);
++ sink_reg = ipu_cm_read(ipu, link->sink.reg);
++
++ src_reg &= ~src_mask;
++ sink_reg &= ~sink_mask;
++
++ ipu_cm_write(ipu, src_reg, link->src.reg);
++ ipu_cm_write(ipu, sink_reg, link->sink.reg);
++
++ spin_unlock_irqrestore(&ipu->lock, flags);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(ipu_idmac_unlink);
++
+ struct ipu_devtype {
+ const char *name;
+ unsigned long cm_ofs;
+diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
+index 51e4103..2af3f2d 100644
+--- a/include/video/imx-ipu-v3.h
++++ b/include/video/imx-ipu-v3.h
+@@ -139,6 +139,7 @@ enum ipu_channel_irq {
+ #define IPUV3_CHANNEL_ROT_VF_MEM 49
+ #define IPUV3_CHANNEL_ROT_PP_MEM 50
+ #define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA 51
++#define IPUV3_NUM_CHANNELS 64
+
+ int ipu_map_irq(struct ipu_soc *ipu, int irq);
+ int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
+@@ -182,6 +183,8 @@ int ipu_idmac_get_current_buffer(struct ipuv3_channel *channel);
+ bool ipu_idmac_buffer_is_ready(struct ipuv3_channel *channel, u32 buf_num);
+ void ipu_idmac_select_buffer(struct ipuv3_channel *channel, u32 buf_num);
+ void ipu_idmac_clear_buffer(struct ipuv3_channel *channel, u32 buf_num);
++int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink);
++int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink);
+
+ /*
+ * IPU Channel Parameter Memory (cpmem) functions
+--
+1.8.5.5
diff --git a/patches/linux/3.18/0605-gpu-ipu-v3-Add-ipu_set_vdi_src_mux.patch b/patches/linux/3.18/0605-gpu-ipu-v3-Add-ipu_set_vdi_src_mux.patch
new file mode 100644
index 0000000..87973db
--- /dev/null
+++ b/patches/linux/3.18/0605-gpu-ipu-v3-Add-ipu_set_vdi_src_mux.patch
@@ -0,0 +1,58 @@
+From 3dbe259299680942036963db649e930120b43665 Mon Sep 17 00:00:00 2001
+From: Steve Longerbeam <ste...@me...>
+Date: Wed, 27 Aug 2014 09:58:21 -0700
+Subject: [PATCH 605/625] gpu: ipu-v3: Add ipu_set_vdi_src_mux()
+
+Adds ipu_set_vdi_src_mux() that selects the VDIC input (from CSI or memory).
+
+Signed-off-by: Steve Longerbeam <ste...@me...>
+---
+ drivers/gpu/ipu-v3/ipu-common.c | 20 ++++++++++++++++++++
+ include/video/imx-ipu-v3.h | 1 +
+ 2 files changed, 21 insertions(+)
+
+diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
+index 85ca6d0..b2550b4 100644
+--- a/drivers/gpu/ipu-v3/ipu-common.c
++++ b/drivers/gpu/ipu-v3/ipu-common.c
+@@ -724,6 +724,26 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi)
+ }
+ EXPORT_SYMBOL_GPL(ipu_set_ic_src_mux);
+
++/*
++ * Set the source for the VDIC. Selects either from CSI[01] or memory.
++ */
++void ipu_set_vdi_src_mux(struct ipu_soc *ipu, bool csi)
++{
++ unsigned long flags;
++ u32 val;
++
++ spin_lock_irqsave(&ipu->lock, flags);
++
++ val = ipu_cm_read(ipu, IPU_FS_PROC_FLOW1);
++ val &= ~(0x3 << 28);
++ if (csi)
++ val |= (0x01 << 28);
++ ipu_cm_write(ipu, val, IPU_FS_PROC_FLOW1);
...
[truncated message content] |