Skip to contentSkip to conversation

s6000 data port driver

PATCH New Daniel Glöckner 1 participant 5 messages Mar 26, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 s6000 data port driver

From: Oskar Schirmer <[email protected]>

Support for the s6000 on-chip video input/output engine. Depending on external wiring it supports up to four video devices.

---
 drivers/media/video/Kconfig       |    2 +
 drivers/media/video/Makefile      |    2 +
 drivers/media/video/s6dp/Kconfig  |    6 +
 drivers/media/video/s6dp/Makefile |    1 +
 drivers/media/video/s6dp/s6dp.c   | 1664 +++++++++++++++++++++++++++++++++++++
 drivers/media/video/s6dp/s6dp.h   |  121 +++
 include/media/s6dp-link.h         |   63 ++
 7 files changed, 1859 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/video/s6dp/Kconfig
 create mode 100644 drivers/media/video/s6dp/Makefile
 create mode 100644 drivers/media/video/s6dp/s6dp.c
 create mode 100644 drivers/media/video/s6dp/s6dp.h
 create mode 100644 include/media/s6dp-link.h
drivers/media/video/Kconfig +2 -0
index 19cf3b8..a94c20f 100644
@@ -683,6 +683,8 @@ source "drivers/media/video/ivtv/Kconfig"
 
 source "drivers/media/video/cx18/Kconfig"
 
+source "drivers/media/video/s6dp/Kconfig"
+
 config VIDEO_M32R_AR
 	tristate "AR devices"
 	depends on M32R && VIDEO_V4L1
drivers/media/video/Makefile +2 -0
index 72f6d03..7109cfe 100644
@@ -134,6 +134,8 @@ obj-$(CONFIG_VIDEO_CX18) += cx18/
 obj-$(CONFIG_VIDEO_VIVI) += vivi.o
 obj-$(CONFIG_VIDEO_CX23885) += cx23885/
 
+obj-$(CONFIG_VIDEO_S6000) += s6dp/
+
 obj-$(CONFIG_VIDEO_PXA27x)	+= pxa_camera.o
 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU)	+= sh_mobile_ceu_camera.o
 obj-$(CONFIG_VIDEO_OMAP2)		+= omap2cam.o
drivers/media/video/s6dp/Kconfig new file +6 -0
new file mode 100644
index 0000000..11cc91d
@@ -0,0 +1,6 @@
+config VIDEO_S6000
+	tristate "S6000 video"
+	depends on VIDEO_V4L2
+	default n
+	help
+	  Enables the s6000 video driver.
drivers/media/video/s6dp/Makefile new file +1 -0
new file mode 100644
index 0000000..c503d5b
@@ -0,0 +1 @@
+obj-$(CONFIG_VIDEO_S6000) += s6dp.o
drivers/media/video/s6dp/s6dp.c new file +1664 -0

1,664 lines not on this page · raw message

drivers/media/video/s6dp/s6dp.h new file +121 -0

121 lines not on this page · raw message

include/media/s6dp-link.h new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
1.6.2.107.ge47ee
#1 lore raw

PATCH 2/5 s6000 data port: custom video mode support

Extend s6dp driver to support direct MPEG2 and data streaming modes. Provide ioctl access to select specific modes.

---
 .../platforms/s6105/include/platform/ioctl.h       |   59 +++
 drivers/media/video/s6dp/s6dp.c                    |  393 +++++++++++++++++--
 2 files changed, 410 insertions(+), 42 deletions(-)
arch/xtensa/platforms/s6105/include/platform/ioctl.h +59 -0
index 0fc6e2c..da88b4c 100644
@@ -14,4 +14,63 @@
 #define S6IOCTL_ISEF_PRELOAD		_IO(56, 1)
 #define S6IOCTL_ISEF_INVALIDATE		_IO(56, 2)
 
+#define MODE_CUSTOM_VIDEO	28
+#define ITU_H222_TRANS		29	/* MPEG2 TS, 188 bytes */
+#define ITU_H222_TRANS_RS	30	/* MPEG2 TS, valid RS, 204 bytes */
+#define ITU_H222_TRANS_RS_DUMMY	31	/* MPEG2 TS, invalid RS, 204 bytes */
+#define STREAM8			32
+#define STREAM16		33
+#define STREAM32		34
+
+#define NUM_MODES		35
+#define MODE_LAST_VIDEO		MODE_CUSTOM_VIDEO
+
+struct s6dp_ioctl_config {
+	unsigned char mode;
+	unsigned char lane;
+	unsigned char is_10bit;
+	unsigned char micron_mode;
+	unsigned char use_1120_line_and_crc;
+	unsigned char ext_framing;
+	unsigned char vsync_pol;
+	unsigned char hsync_pol;
+	unsigned char blank_pol;
+	unsigned char field_ctrl;
+	unsigned char blank_ctrl;
+	unsigned char relaxed_framing_mode;
+	unsigned int desc_size;
+	struct {
+		unsigned int width;
+		unsigned int height;
+		unsigned char portsperstream;
+		unsigned char greyperchroma;
+		unsigned char progressive;
+		struct {
+			unsigned int pixel_total;
+			unsigned int pixel_offset;
+			unsigned int pixel_padding;
+			unsigned int line_total;
+			unsigned int line_odd_total;
+			unsigned int line_odd_offset;
+			unsigned int line_even_offset;
+			unsigned int odd_vsync_len;
+			unsigned int odd_vsync_offset;
+			unsigned int even_vsync_len;
+			unsigned int even_vsync_offset;
+			unsigned int odd_hsync_len;
+			unsigned int odd_hsync_offset;
+			unsigned int even_hsync_len;
+			unsigned int even_hsync_offset;
+		} reg;
+	} custom;
+	struct {
+		int pix_start;
+		unsigned int line_start;
+		unsigned int line_width;
+		unsigned int num_lines;
+	} anc_placement[2];
+};
+
+#define S6IOCTL_DP_CONFIG	_IOW(56, 9, struct s6dp_ioctl_config)
+
 #endif /* __XTENSA_S6105_IOCTL_H */
drivers/media/video/s6dp/s6dp.c +351 -42

554 lines not on this page · raw message

Signature · 1 line
1.6.2.107.ge47ee
#2 lore raw

PATCH 3/5 s6000 data port: canonical modes

In reply to Daniel Glöckner

From: Oskar Schirmer <[email protected]>

Add optional handling of a list of video modes not directly supported by the on-chip video engine. Makes use of extended dma capabilities to provide these modes:

YUV420 and grey mode as well as planar YUV422 and YUV444 with non-aligned planes

---
 drivers/media/video/s6dp/Kconfig |    9 +
 drivers/media/video/s6dp/s6dp.c  |  382 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 388 insertions(+), 3 deletions(-)
drivers/media/video/s6dp/Kconfig +9 -0
index 11cc91d..357cfe5 100644
@@ -4,3 +4,12 @@ config VIDEO_S6000
 	default n
 	help
 	  Enables the s6000 video driver.
+
+config VIDEO_S6000_CANONICAL
+	tristate "S6000 video canonical modes"
+	depends on VIDEO_S6000
+	default n
+	help
+	  Provides canonical video modes in addition
+	  to the s6 specific ones. You might want these when
+	  standard video software is used with the driver.
drivers/media/video/s6dp/s6dp.c +379 -3

569 lines not on this page · raw message

Signature · 1 line
1.6.2.107.ge47ee
#3 lore raw

PATCH 4/5 mt9d131 driver for s6000 data port

In reply to Daniel Glöckner

This patch adds a driver to support the mt9d131 camera in combination with the s6000 data port driver.

---
 drivers/media/video/s6dp/Kconfig        |    7 +
 drivers/media/video/s6dp/Makefile       |    1 +
 drivers/media/video/s6dp/s6dp-mt9d131.c | 1051 +++++++++++++++++++++++++++++++
 3 files changed, 1059 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/video/s6dp/s6dp-mt9d131.c
drivers/media/video/s6dp/Kconfig +7 -0
index 357cfe5..853e6b1 100644
@@ -13,3 +13,10 @@ config VIDEO_S6000_CANONICAL
 	  Provides canonical video modes in addition
 	  to the s6 specific ones. You might want these when
 	  standard video software is used with the driver.
+
+config VIDEO_S6DP_MT9D131
+	tristate "MT9D131 camera"
+	depends on VIDEO_S6000
+	default n
+	help
+	  Enables the MT9D131 camera driver.
drivers/media/video/s6dp/Makefile +1 -0
index c503d5b..af0bc0f 100644
@@ -1 +1,2 @@
 obj-$(CONFIG_VIDEO_S6000) += s6dp.o
+obj-$(CONFIG_VIDEO_S6DP_MT9D131) += s6dp-mt9d131.o
drivers/media/video/s6dp/s6dp-mt9d131.c new file +1051 -0

1,051 lines not on this page · raw message

Signature · 1 line
1.6.2.107.ge47ee
#4 lore raw

PATCH 5/5 saa7121 driver for s6000 data port

In reply to Daniel Glöckner

This patch adds a driver to support the saa7121 PAL/NTSC video encoder in combination with the s6000 data port driver.

The chip is configured for embedded BT.656 syncs as this mode should be supported on all devices.

The driver presents two outputs to applications and while it is true that the device has these two outputs, both of them are always active. The only difference on the "Y/C" output is that it disables the luma notch filter.

---
 drivers/media/video/s6dp/Kconfig        |    7 +
 drivers/media/video/s6dp/Makefile       |    1 +
 drivers/media/video/s6dp/s6dp-saa7121.c |  478 +++++++++++++++++++++++++++++++
 3 files changed, 486 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/video/s6dp/s6dp-saa7121.c
drivers/media/video/s6dp/Kconfig +7 -0
index 853e6b1..c95904c 100644
@@ -20,3 +20,10 @@ config VIDEO_S6DP_MT9D131
 	default n
 	help
 	  Enables the MT9D131 camera driver.
+
+config VIDEO_S6DP_SAA7121
+	tristate "SAA7121 video encoder"
+	depends on VIDEO_S6000
+	default n
+	help
+	  Enables the SAA7121 video encoder driver.
drivers/media/video/s6dp/Makefile +1 -0
index af0bc0f..61d86c9 100644
@@ -1,2 +1,3 @@
 obj-$(CONFIG_VIDEO_S6000) += s6dp.o
 obj-$(CONFIG_VIDEO_S6DP_MT9D131) += s6dp-mt9d131.o
+obj-$(CONFIG_VIDEO_S6DP_SAA7121) += s6dp-saa7121.o
drivers/media/video/s6dp/s6dp-saa7121.c new file +478 -0

478 lines not on this page · raw message

Signature · 1 line
1.6.2.107.ge47ee