aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch56
1 files changed, 54 insertions, 2 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch b/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch
index 8f731afe87..5f954567a9 100644
--- a/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch
+++ b/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch
@@ -1,7 +1,7 @@
-From 2ba75a0486033660ce65c2dd2406d619fe73a20b Mon Sep 17 00:00:00 2001
+From 8a7d7b13afa19d8a7140df042cf3045c37d0ce28 Mon Sep 17 00:00:00 2001
From: Vincent Sanders <vincent.sanders@collabora.co.uk>
Date: Wed, 30 Jan 2013 12:45:18 +0000
-Subject: [PATCH 111/174] bcm2835: add v4l2 camera device
+Subject: [PATCH 111/196] bcm2835: add v4l2 camera device
- Supports raw YUV capture, preview, JPEG and H264.
- Uses videobuf2 for data transfer, using dma_buf.
@@ -46,6 +46,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.c
create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.h
+diff --git a/Documentation/video4linux/bcm2835-v4l2.txt b/Documentation/video4linux/bcm2835-v4l2.txt
+new file mode 100644
+index 0000000..c585a8f
--- /dev/null
+++ b/Documentation/video4linux/bcm2835-v4l2.txt
@@ -0,0 +1,60 @@
@@ -109,6 +112,8 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+List of available formats:
+
+$ v4l2-ctl --list-formats
+diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
+index 0494d27..8e6d48b 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -124,6 +124,7 @@ config VIDEO_S3C_CAMIF
@@ -119,6 +124,8 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
endif # V4L_PLATFORM_DRIVERS
+diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
+index eee28dd..29be30c 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -50,4 +50,6 @@ obj-y += davinci/
@@ -128,6 +135,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+obj-$(CONFIG_VIDEO_BCM2835) += bcm2835/
+
ccflags-y += -I$(srctree)/drivers/media/i2c
+diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig
+new file mode 100644
+index 0000000..a8fd172
--- /dev/null
+++ b/drivers/media/platform/bcm2835/Kconfig
@@ -0,0 +1,25 @@
@@ -156,6 +166,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+
+
+endif # VIDEO_BM2835
+diff --git a/drivers/media/platform/bcm2835/Makefile b/drivers/media/platform/bcm2835/Makefile
+new file mode 100644
+index 0000000..f17c79c
--- /dev/null
+++ b/drivers/media/platform/bcm2835/Makefile
@@ -0,0 +1,5 @@
@@ -164,6 +177,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+obj-$(CONFIG_VIDEO_BCM2835_MMAL) += bcm2835-v4l2.o
+
+ccflags-$(CONFIG_VIDEO_BCM2835) += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000
+diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c
+new file mode 100644
+index 0000000..47fe45d
--- /dev/null
+++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
@@ -0,0 +1,1478 @@
@@ -1645,6 +1661,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+
+module_init(bm2835_mmal_init);
+module_exit(bm2835_mmal_exit);
+diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h
+new file mode 100644
+index 0000000..883eab7
--- /dev/null
+++ b/drivers/media/platform/bcm2835/bcm2835-camera.h
@@ -0,0 +1,113 @@
@@ -1761,6 +1780,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ (pix_fmt)->pixelformat, (pix_fmt)->bytesperline, \
+ (pix_fmt)->sizeimage, (pix_fmt)->colorspace, (pix_fmt)->priv); \
+}
+diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c
+new file mode 100644
+index 0000000..d1408e5
--- /dev/null
+++ b/drivers/media/platform/bcm2835/controls.c
@@ -0,0 +1,725 @@
@@ -2489,6 +2511,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+
+ return 0;
+}
+diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h
+new file mode 100644
+index 0000000..602b4a7
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-common.h
@@ -0,0 +1,52 @@
@@ -2544,6 +2569,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ u32 v;
+};
+
+diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h
+new file mode 100644
+index 0000000..856e80e
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-encodings.h
@@ -0,0 +1,93 @@
@@ -2640,6 +2668,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+#define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A', 'V', 'C', '1')
+/** Implicitly delineated NAL units without emulation prevention */
+#define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R', 'A', 'W', ' ')
+diff --git a/drivers/media/platform/bcm2835/mmal-msg-common.h b/drivers/media/platform/bcm2835/mmal-msg-common.h
+new file mode 100644
+index 0000000..66e8a6e
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-msg-common.h
@@ -0,0 +1,50 @@
@@ -2693,6 +2724,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+};
+
+#endif /* MMAL_MSG_COMMON_H */
+diff --git a/drivers/media/platform/bcm2835/mmal-msg-format.h b/drivers/media/platform/bcm2835/mmal-msg-format.h
+new file mode 100644
+index 0000000..123d86e
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-msg-format.h
@@ -0,0 +1,81 @@
@@ -2777,6 +2811,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+};
+
+#endif /* MMAL_MSG_FORMAT_H */
+diff --git a/drivers/media/platform/bcm2835/mmal-msg-port.h b/drivers/media/platform/bcm2835/mmal-msg-port.h
+new file mode 100644
+index 0000000..a55c1ea
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-msg-port.h
@@ -0,0 +1,107 @@
@@ -2887,6 +2924,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ */
+
+};
+diff --git a/drivers/media/platform/bcm2835/mmal-msg.h b/drivers/media/platform/bcm2835/mmal-msg.h
+new file mode 100644
+index 0000000..67b1076
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-msg.h
@@ -0,0 +1,404 @@
@@ -3294,6 +3334,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ u8 payload[MMAL_MSG_MAX_PAYLOAD];
+ } u;
+};
+diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h
+new file mode 100644
+index 0000000..c611b58
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-parameters.h
@@ -0,0 +1,539 @@
@@ -3836,6 +3879,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ u32 num_effect_params;
+ u32 effect_parameter[MMAL_MAX_IMAGEFX_PARAMETERS];
+};
+diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c
+new file mode 100644
+index 0000000..a06fb44
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-vchiq.c
@@ -0,0 +1,1916 @@
@@ -5755,6 +5801,9 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ kfree(instance);
+ return -ENODEV;
+}
+diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.h b/drivers/media/platform/bcm2835/mmal-vchiq.h
+new file mode 100644
+index 0000000..9d1d11e
--- /dev/null
+++ b/drivers/media/platform/bcm2835/mmal-vchiq.h
@@ -0,0 +1,178 @@
@@ -5936,3 +5985,6 @@ Signed-off-by: Luke Diamand <luked@broadcom.com>
+ struct mmal_buffer *buf);
+
+#endif /* MMAL_VCHIQ_H */
+--
+1.9.1
+