diff options
50 files changed, 640 insertions, 78 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 0a2debfa68f6..350dfb3d71ea 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2579,6 +2579,18 @@ fields changed from _s32 to _u32. | |||
2579 | </orderedlist> | 2579 | </orderedlist> |
2580 | </section> | 2580 | </section> |
2581 | 2581 | ||
2582 | <section> | ||
2583 | <title>V4L2 in Linux 3.19</title> | ||
2584 | <orderedlist> | ||
2585 | <listitem> | ||
2586 | <para>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding; | ||
2587 | and &v4l2-quantization; fields to &v4l2-pix-format;, &v4l2-pix-format-mplane; | ||
2588 | and &v4l2-mbus-framefmt;. | ||
2589 | </para> | ||
2590 | </listitem> | ||
2591 | </orderedlist> | ||
2592 | </section> | ||
2593 | |||
2582 | <section id="other"> | 2594 | <section id="other"> |
2583 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2595 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2584 | 2596 | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index ccf6053c1ae4..d5eca4b8f74b 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
@@ -138,9 +138,25 @@ applicable values.</para></entry> | |||
138 | <row> | 138 | <row> |
139 | <entry>__u32</entry> | 139 | <entry>__u32</entry> |
140 | <entry><structfield>flags</structfield></entry> | 140 | <entry><structfield>flags</structfield></entry> |
141 | <entry>Flags set by the application or driver, see <xref | 141 | <entry>Flags set by the application or driver, see <xref |
142 | linkend="format-flags" />.</entry> | 142 | linkend="format-flags" />.</entry> |
143 | </row> | 143 | </row> |
144 | <row> | ||
145 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
146 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
147 | <entry>This information supplements the | ||
148 | <structfield>colorspace</structfield> and must be set by the driver for | ||
149 | capture streams and by the application for output streams, | ||
150 | see <xref linkend="colorspaces" />.</entry> | ||
151 | </row> | ||
152 | <row> | ||
153 | <entry>&v4l2-quantization;</entry> | ||
154 | <entry><structfield>quantization</structfield></entry> | ||
155 | <entry>This information supplements the | ||
156 | <structfield>colorspace</structfield> and must be set by the driver for | ||
157 | capture streams and by the application for output streams, | ||
158 | see <xref linkend="colorspaces" />.</entry> | ||
159 | </row> | ||
144 | </tbody> | 160 | </tbody> |
145 | </tgroup> | 161 | </tgroup> |
146 | </table> | 162 | </table> |
@@ -232,9 +248,25 @@ codes can be used.</entry> | |||
232 | <entry>Flags set by the application or driver, see <xref | 248 | <entry>Flags set by the application or driver, see <xref |
233 | linkend="format-flags" />.</entry> | 249 | linkend="format-flags" />.</entry> |
234 | </row> | 250 | </row> |
251 | <row> | ||
252 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
253 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
254 | <entry>This information supplements the | ||
255 | <structfield>colorspace</structfield> and must be set by the driver for | ||
256 | capture streams and by the application for output streams, | ||
257 | see <xref linkend="colorspaces" />.</entry> | ||
258 | </row> | ||
259 | <row> | ||
260 | <entry>&v4l2-quantization;</entry> | ||
261 | <entry><structfield>quantization</structfield></entry> | ||
262 | <entry>This information supplements the | ||
263 | <structfield>colorspace</structfield> and must be set by the driver for | ||
264 | capture streams and by the application for output streams, | ||
265 | see <xref linkend="colorspaces" />.</entry> | ||
266 | </row> | ||
235 | <row> | 267 | <row> |
236 | <entry>__u8</entry> | 268 | <entry>__u8</entry> |
237 | <entry><structfield>reserved[10]</structfield></entry> | 269 | <entry><structfield>reserved[8]</structfield></entry> |
238 | <entry>Reserved for future extensions. Should be zeroed by the | 270 | <entry>Reserved for future extensions. Should be zeroed by the |
239 | application.</entry> | 271 | application.</entry> |
240 | </row> | 272 | </row> |
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index 18730b96e1e6..c5ea868e3909 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml | |||
@@ -34,8 +34,24 @@ | |||
34 | <xref linkend="colorspaces" /> for details.</entry> | 34 | <xref linkend="colorspaces" /> for details.</entry> |
35 | </row> | 35 | </row> |
36 | <row> | 36 | <row> |
37 | <entry>&v4l2-ycbcr-encoding;</entry> | ||
38 | <entry><structfield>ycbcr_enc</structfield></entry> | ||
39 | <entry>This information supplements the | ||
40 | <structfield>colorspace</structfield> and must be set by the driver for | ||
41 | capture streams and by the application for output streams, | ||
42 | see <xref linkend="colorspaces" />.</entry> | ||
43 | </row> | ||
44 | <row> | ||
45 | <entry>&v4l2-quantization;</entry> | ||
46 | <entry><structfield>quantization</structfield></entry> | ||
47 | <entry>This information supplements the | ||
48 | <structfield>colorspace</structfield> and must be set by the driver for | ||
49 | capture streams and by the application for output streams, | ||
50 | see <xref linkend="colorspaces" />.</entry> | ||
51 | </row> | ||
52 | <row> | ||
37 | <entry>__u32</entry> | 53 | <entry>__u32</entry> |
38 | <entry><structfield>reserved</structfield>[7]</entry> | 54 | <entry><structfield>reserved</structfield>[6]</entry> |
39 | <entry>Reserved for future extensions. Applications and drivers must | 55 | <entry>Reserved for future extensions. Applications and drivers must |
40 | set the array to zero.</entry> | 56 | set the array to zero.</entry> |
41 | </row> | 57 | </row> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 7cfe618f754d..ac0f8d9d2a49 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -152,6 +152,15 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
152 | applications. --> | 152 | applications. --> |
153 | 153 | ||
154 | <revision> | 154 | <revision> |
155 | <revnumber>3.19</revnumber> | ||
156 | <date>2014-12-05</date> | ||
157 | <authorinitials>hv</authorinitials> | ||
158 | <revremark>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding; and &v4l2-quantization; fields | ||
159 | to &v4l2-pix-format;, &v4l2-pix-format-mplane; and &v4l2-mbus-framefmt;. | ||
160 | </revremark> | ||
161 | </revision> | ||
162 | |||
163 | <revision> | ||
155 | <revnumber>3.17</revnumber> | 164 | <revnumber>3.17</revnumber> |
156 | <date>2014-08-04</date> | 165 | <date>2014-08-04</date> |
157 | <authorinitials>lp, hv</authorinitials> | 166 | <authorinitials>lp, hv</authorinitials> |
@@ -539,7 +548,7 @@ and discussions on the V4L mailing list.</revremark> | |||
539 | </partinfo> | 548 | </partinfo> |
540 | 549 | ||
541 | <title>Video for Linux Two API Specification</title> | 550 | <title>Video for Linux Two API Specification</title> |
542 | <subtitle>Revision 3.17</subtitle> | 551 | <subtitle>Revision 3.19</subtitle> |
543 | 552 | ||
544 | <chapter id="common"> | 553 | <chapter id="common"> |
545 | &sub-common; | 554 | &sub-common; |
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt index ba61782c2af9..9dafe6b06cd2 100644 --- a/Documentation/devicetree/bindings/media/rcar_vin.txt +++ b/Documentation/devicetree/bindings/media/rcar_vin.txt | |||
@@ -6,6 +6,8 @@ family of devices. The current blocks are always slaves and suppot one input | |||
6 | channel which can be either RGB, YUYV or BT656. | 6 | channel which can be either RGB, YUYV or BT656. |
7 | 7 | ||
8 | - compatible: Must be one of the following | 8 | - compatible: Must be one of the following |
9 | - "renesas,vin-r8a7794" for the R8A7794 device | ||
10 | - "renesas,vin-r8a7793" for the R8A7793 device | ||
9 | - "renesas,vin-r8a7791" for the R8A7791 device | 11 | - "renesas,vin-r8a7791" for the R8A7791 device |
10 | - "renesas,vin-r8a7790" for the R8A7790 device | 12 | - "renesas,vin-r8a7790" for the R8A7790 device |
11 | - "renesas,vin-r8a7779" for the R8A7779 device | 13 | - "renesas,vin-r8a7779" for the R8A7779 device |
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt index e5a940e3d304..6cfc8541a362 100644 --- a/Documentation/video4linux/vivid.txt +++ b/Documentation/video4linux/vivid.txt | |||
@@ -640,6 +640,21 @@ Colorspace: selects which colorspace should be used when generating the image. | |||
640 | Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE | 640 | Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE |
641 | to be sent since it emulates a detected colorspace change. | 641 | to be sent since it emulates a detected colorspace change. |
642 | 642 | ||
643 | Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating | ||
644 | a Y'CbCr image. This only applies if the CSC Colorbar test pattern is | ||
645 | selected, and if the format is set to a Y'CbCr format as opposed to an | ||
646 | RGB format. | ||
647 | |||
648 | Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE | ||
649 | to be sent since it emulates a detected colorspace change. | ||
650 | |||
651 | Quantization: selects which quantization should be used for the RGB or Y'CbCr | ||
652 | encoding when generating the test pattern. This only applies if the CSC | ||
653 | Colorbar test pattern is selected. | ||
654 | |||
655 | Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE | ||
656 | to be sent since it emulates a detected colorspace change. | ||
657 | |||
643 | Limited RGB Range (16-235): selects if the RGB range of the HDMI source should | 658 | Limited RGB Range (16-235): selects if the RGB range of the HDMI source should |
644 | be limited or full range. This combines with the Digital Video 'Rx RGB | 659 | be limited or full range. This combines with the Digital Video 'Rx RGB |
645 | Quantization Range' control and can be used to test what happens if | 660 | Quantization Range' control and can be used to test what happens if |
diff --git a/MAINTAINERS b/MAINTAINERS index bae54c7fdacf..7675425cabb8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -10237,13 +10237,13 @@ L: netdev@vger.kernel.org | |||
10237 | S: Maintained | 10237 | S: Maintained |
10238 | F: drivers/net/ethernet/via/via-velocity.* | 10238 | F: drivers/net/ethernet/via/via-velocity.* |
10239 | 10239 | ||
10240 | VIVI VIRTUAL VIDEO DRIVER | 10240 | VIVID VIRTUAL VIDEO DRIVER |
10241 | M: Hans Verkuil <hverkuil@xs4all.nl> | 10241 | M: Hans Verkuil <hverkuil@xs4all.nl> |
10242 | L: linux-media@vger.kernel.org | 10242 | L: linux-media@vger.kernel.org |
10243 | T: git git://linuxtv.org/media_tree.git | 10243 | T: git git://linuxtv.org/media_tree.git |
10244 | W: http://linuxtv.org | 10244 | W: http://linuxtv.org |
10245 | S: Maintained | 10245 | S: Maintained |
10246 | F: drivers/media/platform/vivi* | 10246 | F: drivers/media/platform/vivid/* |
10247 | 10247 | ||
10248 | VLAN (802.1Q) | 10248 | VLAN (802.1Q) |
10249 | M: Patrick McHardy <kaber@trash.net> | 10249 | M: Patrick McHardy <kaber@trash.net> |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 3c89fcbc621e..49cd30870e0d 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -160,7 +160,6 @@ source "drivers/media/usb/Kconfig" | |||
160 | source "drivers/media/pci/Kconfig" | 160 | source "drivers/media/pci/Kconfig" |
161 | source "drivers/media/platform/Kconfig" | 161 | source "drivers/media/platform/Kconfig" |
162 | source "drivers/media/mmc/Kconfig" | 162 | source "drivers/media/mmc/Kconfig" |
163 | source "drivers/media/parport/Kconfig" | ||
164 | source "drivers/media/radio/Kconfig" | 163 | source "drivers/media/radio/Kconfig" |
165 | 164 | ||
166 | comment "Supported FireWire (IEEE 1394) Adapters" | 165 | comment "Supported FireWire (IEEE 1394) Adapters" |
diff --git a/drivers/media/Makefile b/drivers/media/Makefile index 620f275a45c9..e608bbce0c35 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile | |||
@@ -28,6 +28,6 @@ obj-y += rc/ | |||
28 | # Finally, merge the drivers that require the core | 28 | # Finally, merge the drivers that require the core |
29 | # | 29 | # |
30 | 30 | ||
31 | obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ parport/ | 31 | obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ |
32 | obj-$(CONFIG_VIDEO_DEV) += radio/ | 32 | obj-$(CONFIG_VIDEO_DEV) += radio/ |
33 | 33 | ||
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index f40b4cf6107a..205d71364343 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig | |||
@@ -284,15 +284,6 @@ config VIDEO_SAA711X | |||
284 | To compile this driver as a module, choose M here: the | 284 | To compile this driver as a module, choose M here: the |
285 | module will be called saa7115. | 285 | module will be called saa7115. |
286 | 286 | ||
287 | config VIDEO_SAA7191 | ||
288 | tristate "Philips SAA7191 video decoder" | ||
289 | depends on VIDEO_V4L2 && I2C | ||
290 | ---help--- | ||
291 | Support for the Philips SAA7191 video decoder. | ||
292 | |||
293 | To compile this driver as a module, choose M here: the | ||
294 | module will be called saa7191. | ||
295 | |||
296 | config VIDEO_TVP514X | 287 | config VIDEO_TVP514X |
297 | tristate "Texas Instruments TVP514x video decoder" | 288 | tristate "Texas Instruments TVP514x video decoder" |
298 | depends on VIDEO_V4L2 && I2C | 289 | depends on VIDEO_V4L2 && I2C |
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 01ae9328e582..9858900168bf 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile | |||
@@ -18,7 +18,6 @@ obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o | |||
18 | obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o | 18 | obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o |
19 | obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o | 19 | obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o |
20 | obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o | 20 | obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o |
21 | obj-$(CONFIG_VIDEO_SAA7191) += saa7191.o | ||
22 | obj-$(CONFIG_VIDEO_SAA6752HS) += saa6752hs.o | 21 | obj-$(CONFIG_VIDEO_SAA6752HS) += saa6752hs.o |
23 | obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o | 22 | obj-$(CONFIG_VIDEO_ADV7170) += adv7170.o |
24 | obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o | 23 | obj-$(CONFIG_VIDEO_ADV7175) += adv7175.o |
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 4160ca4e5413..d3c79d964f2c 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c | |||
@@ -647,6 +647,7 @@ static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt, | |||
647 | dev->ts_packet_size = 188 * 4; | 647 | dev->ts_packet_size = 188 * 4; |
648 | dev->ts_packet_count = 32; | 648 | dev->ts_packet_count = 32; |
649 | sizes[0] = dev->ts_packet_size * dev->ts_packet_count; | 649 | sizes[0] = dev->ts_packet_size * dev->ts_packet_count; |
650 | alloc_ctxs[0] = dev->alloc_ctx; | ||
650 | return 0; | 651 | return 0; |
651 | } | 652 | } |
652 | 653 | ||
@@ -662,14 +663,11 @@ static void buffer_finish(struct vb2_buffer *vb) | |||
662 | { | 663 | { |
663 | struct cx8802_dev *dev = vb->vb2_queue->drv_priv; | 664 | struct cx8802_dev *dev = vb->vb2_queue->drv_priv; |
664 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); | 665 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); |
665 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | ||
666 | struct cx88_riscmem *risc = &buf->risc; | 666 | struct cx88_riscmem *risc = &buf->risc; |
667 | 667 | ||
668 | if (risc->cpu) | 668 | if (risc->cpu) |
669 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); | 669 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); |
670 | memset(risc, 0, sizeof(*risc)); | 670 | memset(risc, 0, sizeof(*risc)); |
671 | |||
672 | dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
673 | } | 671 | } |
674 | 672 | ||
675 | static void buffer_queue(struct vb2_buffer *vb) | 673 | static void buffer_queue(struct vb2_buffer *vb) |
diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index c344bfd0b896..5780e2f013b4 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c | |||
@@ -92,6 +92,7 @@ static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt, | |||
92 | dev->ts_packet_size = 188 * 4; | 92 | dev->ts_packet_size = 188 * 4; |
93 | dev->ts_packet_count = dvb_buf_tscnt; | 93 | dev->ts_packet_count = dvb_buf_tscnt; |
94 | sizes[0] = dev->ts_packet_size * dev->ts_packet_count; | 94 | sizes[0] = dev->ts_packet_size * dev->ts_packet_count; |
95 | alloc_ctxs[0] = dev->alloc_ctx; | ||
95 | *num_buffers = dvb_buf_tscnt; | 96 | *num_buffers = dvb_buf_tscnt; |
96 | return 0; | 97 | return 0; |
97 | } | 98 | } |
@@ -108,14 +109,11 @@ static void buffer_finish(struct vb2_buffer *vb) | |||
108 | { | 109 | { |
109 | struct cx8802_dev *dev = vb->vb2_queue->drv_priv; | 110 | struct cx8802_dev *dev = vb->vb2_queue->drv_priv; |
110 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); | 111 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); |
111 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | ||
112 | struct cx88_riscmem *risc = &buf->risc; | 112 | struct cx88_riscmem *risc = &buf->risc; |
113 | 113 | ||
114 | if (risc->cpu) | 114 | if (risc->cpu) |
115 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); | 115 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); |
116 | memset(risc, 0, sizeof(*risc)); | 116 | memset(risc, 0, sizeof(*risc)); |
117 | |||
118 | dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
119 | } | 117 | } |
120 | 118 | ||
121 | static void buffer_queue(struct vb2_buffer *vb) | 119 | static void buffer_queue(struct vb2_buffer *vb) |
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index f181a3a10389..1c1f69e6b0b9 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c | |||
@@ -235,10 +235,6 @@ int cx8802_buf_prepare(struct vb2_queue *q, struct cx8802_dev *dev, | |||
235 | return -EINVAL; | 235 | return -EINVAL; |
236 | vb2_set_plane_payload(&buf->vb, 0, size); | 236 | vb2_set_plane_payload(&buf->vb, 0, size); |
237 | 237 | ||
238 | rc = dma_map_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
239 | if (!rc) | ||
240 | return -EIO; | ||
241 | |||
242 | rc = cx88_risc_databuffer(dev->pci, risc, sgt->sgl, | 238 | rc = cx88_risc_databuffer(dev->pci, risc, sgt->sgl, |
243 | dev->ts_packet_size, dev->ts_packet_count, 0); | 239 | dev->ts_packet_size, dev->ts_packet_count, 0); |
244 | if (rc) { | 240 | if (rc) { |
@@ -733,6 +729,11 @@ static int cx8802_probe(struct pci_dev *pci_dev, | |||
733 | if (NULL == dev) | 729 | if (NULL == dev) |
734 | goto fail_core; | 730 | goto fail_core; |
735 | dev->pci = pci_dev; | 731 | dev->pci = pci_dev; |
732 | dev->alloc_ctx = vb2_dma_sg_init_ctx(&pci_dev->dev); | ||
733 | if (IS_ERR(dev->alloc_ctx)) { | ||
734 | err = PTR_ERR(dev->alloc_ctx); | ||
735 | goto fail_core; | ||
736 | } | ||
736 | dev->core = core; | 737 | dev->core = core; |
737 | 738 | ||
738 | /* Maintain a reference so cx88-video can query the 8802 device. */ | 739 | /* Maintain a reference so cx88-video can query the 8802 device. */ |
@@ -752,6 +753,7 @@ static int cx8802_probe(struct pci_dev *pci_dev, | |||
752 | return 0; | 753 | return 0; |
753 | 754 | ||
754 | fail_free: | 755 | fail_free: |
756 | vb2_dma_sg_cleanup_ctx(dev->alloc_ctx); | ||
755 | kfree(dev); | 757 | kfree(dev); |
756 | fail_core: | 758 | fail_core: |
757 | core->dvbdev = NULL; | 759 | core->dvbdev = NULL; |
@@ -798,6 +800,7 @@ static void cx8802_remove(struct pci_dev *pci_dev) | |||
798 | /* common */ | 800 | /* common */ |
799 | cx8802_fini_common(dev); | 801 | cx8802_fini_common(dev); |
800 | cx88_core_put(dev->core,dev->pci); | 802 | cx88_core_put(dev->core,dev->pci); |
803 | vb2_dma_sg_cleanup_ctx(dev->alloc_ctx); | ||
801 | kfree(dev); | 804 | kfree(dev); |
802 | } | 805 | } |
803 | 806 | ||
diff --git a/drivers/media/pci/cx88/cx88-vbi.c b/drivers/media/pci/cx88/cx88-vbi.c index 6ab6e27648f6..32eb7fdb875e 100644 --- a/drivers/media/pci/cx88/cx88-vbi.c +++ b/drivers/media/pci/cx88/cx88-vbi.c | |||
@@ -120,6 +120,7 @@ static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt, | |||
120 | sizes[0] = VBI_LINE_NTSC_COUNT * VBI_LINE_LENGTH * 2; | 120 | sizes[0] = VBI_LINE_NTSC_COUNT * VBI_LINE_LENGTH * 2; |
121 | else | 121 | else |
122 | sizes[0] = VBI_LINE_PAL_COUNT * VBI_LINE_LENGTH * 2; | 122 | sizes[0] = VBI_LINE_PAL_COUNT * VBI_LINE_LENGTH * 2; |
123 | alloc_ctxs[0] = dev->alloc_ctx; | ||
123 | return 0; | 124 | return 0; |
124 | } | 125 | } |
125 | 126 | ||
@@ -131,7 +132,6 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
131 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | 132 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); |
132 | unsigned int lines; | 133 | unsigned int lines; |
133 | unsigned int size; | 134 | unsigned int size; |
134 | int rc; | ||
135 | 135 | ||
136 | if (dev->core->tvnorm & V4L2_STD_525_60) | 136 | if (dev->core->tvnorm & V4L2_STD_525_60) |
137 | lines = VBI_LINE_NTSC_COUNT; | 137 | lines = VBI_LINE_NTSC_COUNT; |
@@ -142,10 +142,6 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
142 | return -EINVAL; | 142 | return -EINVAL; |
143 | vb2_set_plane_payload(vb, 0, size); | 143 | vb2_set_plane_payload(vb, 0, size); |
144 | 144 | ||
145 | rc = dma_map_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
146 | if (!rc) | ||
147 | return -EIO; | ||
148 | |||
149 | cx88_risc_buffer(dev->pci, &buf->risc, sgt->sgl, | 145 | cx88_risc_buffer(dev->pci, &buf->risc, sgt->sgl, |
150 | 0, VBI_LINE_LENGTH * lines, | 146 | 0, VBI_LINE_LENGTH * lines, |
151 | VBI_LINE_LENGTH, 0, | 147 | VBI_LINE_LENGTH, 0, |
@@ -157,14 +153,11 @@ static void buffer_finish(struct vb2_buffer *vb) | |||
157 | { | 153 | { |
158 | struct cx8800_dev *dev = vb->vb2_queue->drv_priv; | 154 | struct cx8800_dev *dev = vb->vb2_queue->drv_priv; |
159 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); | 155 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); |
160 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | ||
161 | struct cx88_riscmem *risc = &buf->risc; | 156 | struct cx88_riscmem *risc = &buf->risc; |
162 | 157 | ||
163 | if (risc->cpu) | 158 | if (risc->cpu) |
164 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); | 159 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); |
165 | memset(risc, 0, sizeof(*risc)); | 160 | memset(risc, 0, sizeof(*risc)); |
166 | |||
167 | dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
168 | } | 161 | } |
169 | 162 | ||
170 | static void buffer_queue(struct vb2_buffer *vb) | 163 | static void buffer_queue(struct vb2_buffer *vb) |
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index a64ae31ae142..860c98fc72c7 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
@@ -440,6 +440,7 @@ static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt, | |||
440 | 440 | ||
441 | *num_planes = 1; | 441 | *num_planes = 1; |
442 | sizes[0] = (dev->fmt->depth * core->width * core->height) >> 3; | 442 | sizes[0] = (dev->fmt->depth * core->width * core->height) >> 3; |
443 | alloc_ctxs[0] = dev->alloc_ctx; | ||
443 | return 0; | 444 | return 0; |
444 | } | 445 | } |
445 | 446 | ||
@@ -449,7 +450,6 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
449 | struct cx88_core *core = dev->core; | 450 | struct cx88_core *core = dev->core; |
450 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); | 451 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); |
451 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | 452 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); |
452 | int rc; | ||
453 | 453 | ||
454 | buf->bpl = core->width * dev->fmt->depth >> 3; | 454 | buf->bpl = core->width * dev->fmt->depth >> 3; |
455 | 455 | ||
@@ -457,10 +457,6 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
457 | return -EINVAL; | 457 | return -EINVAL; |
458 | vb2_set_plane_payload(vb, 0, core->height * buf->bpl); | 458 | vb2_set_plane_payload(vb, 0, core->height * buf->bpl); |
459 | 459 | ||
460 | rc = dma_map_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
461 | if (!rc) | ||
462 | return -EIO; | ||
463 | |||
464 | switch (core->field) { | 460 | switch (core->field) { |
465 | case V4L2_FIELD_TOP: | 461 | case V4L2_FIELD_TOP: |
466 | cx88_risc_buffer(dev->pci, &buf->risc, | 462 | cx88_risc_buffer(dev->pci, &buf->risc, |
@@ -505,14 +501,11 @@ static void buffer_finish(struct vb2_buffer *vb) | |||
505 | { | 501 | { |
506 | struct cx8800_dev *dev = vb->vb2_queue->drv_priv; | 502 | struct cx8800_dev *dev = vb->vb2_queue->drv_priv; |
507 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); | 503 | struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); |
508 | struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); | ||
509 | struct cx88_riscmem *risc = &buf->risc; | 504 | struct cx88_riscmem *risc = &buf->risc; |
510 | 505 | ||
511 | if (risc->cpu) | 506 | if (risc->cpu) |
512 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); | 507 | pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); |
513 | memset(risc, 0, sizeof(*risc)); | 508 | memset(risc, 0, sizeof(*risc)); |
514 | |||
515 | dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); | ||
516 | } | 509 | } |
517 | 510 | ||
518 | static void buffer_queue(struct vb2_buffer *vb) | 511 | static void buffer_queue(struct vb2_buffer *vb) |
@@ -530,7 +523,6 @@ static void buffer_queue(struct vb2_buffer *vb) | |||
530 | 523 | ||
531 | if (list_empty(&q->active)) { | 524 | if (list_empty(&q->active)) { |
532 | list_add_tail(&buf->list, &q->active); | 525 | list_add_tail(&buf->list, &q->active); |
533 | start_video_dma(dev, q, buf); | ||
534 | buf->count = q->count++; | 526 | buf->count = q->count++; |
535 | dprintk(2,"[%p/%d] buffer_queue - first active\n", | 527 | dprintk(2,"[%p/%d] buffer_queue - first active\n", |
536 | buf, buf->vb.v4l2_buf.index); | 528 | buf, buf->vb.v4l2_buf.index); |
@@ -1345,6 +1337,12 @@ static int cx8800_initdev(struct pci_dev *pci_dev, | |||
1345 | err = -EIO; | 1337 | err = -EIO; |
1346 | goto fail_core; | 1338 | goto fail_core; |
1347 | } | 1339 | } |
1340 | dev->alloc_ctx = vb2_dma_sg_init_ctx(&pci_dev->dev); | ||
1341 | if (IS_ERR(dev->alloc_ctx)) { | ||
1342 | err = PTR_ERR(dev->alloc_ctx); | ||
1343 | goto fail_core; | ||
1344 | } | ||
1345 | |||
1348 | 1346 | ||
1349 | /* initialize driver struct */ | 1347 | /* initialize driver struct */ |
1350 | spin_lock_init(&dev->slock); | 1348 | spin_lock_init(&dev->slock); |
@@ -1549,6 +1547,7 @@ fail_unreg: | |||
1549 | free_irq(pci_dev->irq, dev); | 1547 | free_irq(pci_dev->irq, dev); |
1550 | mutex_unlock(&core->lock); | 1548 | mutex_unlock(&core->lock); |
1551 | fail_core: | 1549 | fail_core: |
1550 | vb2_dma_sg_cleanup_ctx(dev->alloc_ctx); | ||
1552 | core->v4ldev = NULL; | 1551 | core->v4ldev = NULL; |
1553 | cx88_core_put(core,dev->pci); | 1552 | cx88_core_put(core,dev->pci); |
1554 | fail_free: | 1553 | fail_free: |
@@ -1582,6 +1581,7 @@ static void cx8800_finidev(struct pci_dev *pci_dev) | |||
1582 | 1581 | ||
1583 | /* free memory */ | 1582 | /* free memory */ |
1584 | cx88_core_put(core,dev->pci); | 1583 | cx88_core_put(core,dev->pci); |
1584 | vb2_dma_sg_cleanup_ctx(dev->alloc_ctx); | ||
1585 | kfree(dev); | 1585 | kfree(dev); |
1586 | } | 1586 | } |
1587 | 1587 | ||
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index 3b0ae754f165..7748ca9abb09 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h | |||
@@ -485,6 +485,7 @@ struct cx8800_dev { | |||
485 | /* pci i/o */ | 485 | /* pci i/o */ |
486 | struct pci_dev *pci; | 486 | struct pci_dev *pci; |
487 | unsigned char pci_rev,pci_lat; | 487 | unsigned char pci_rev,pci_lat; |
488 | void *alloc_ctx; | ||
488 | 489 | ||
489 | const struct cx8800_fmt *fmt; | 490 | const struct cx8800_fmt *fmt; |
490 | 491 | ||
@@ -548,6 +549,7 @@ struct cx8802_dev { | |||
548 | /* pci i/o */ | 549 | /* pci i/o */ |
549 | struct pci_dev *pci; | 550 | struct pci_dev *pci; |
550 | unsigned char pci_rev,pci_lat; | 551 | unsigned char pci_rev,pci_lat; |
552 | void *alloc_ctx; | ||
551 | 553 | ||
552 | /* dma queues */ | 554 | /* dma queues */ |
553 | struct cx88_dmaqueue mpegq; | 555 | struct cx88_dmaqueue mpegq; |
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 0c61155699f7..dba29b80184b 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig | |||
@@ -65,14 +65,6 @@ config VIDEO_TIMBERDALE | |||
65 | ---help--- | 65 | ---help--- |
66 | Add support for the Video In peripherial of the timberdale FPGA. | 66 | Add support for the Video In peripherial of the timberdale FPGA. |
67 | 67 | ||
68 | config VIDEO_VINO | ||
69 | tristate "SGI Vino Video For Linux" | ||
70 | depends on I2C && SGI_IP22 && VIDEO_V4L2 | ||
71 | select VIDEO_SAA7191 if MEDIA_SUBDRV_AUTOSELECT | ||
72 | help | ||
73 | Say Y here to build in support for the Vino video input system found | ||
74 | on SGI Indy machines. | ||
75 | |||
76 | config VIDEO_M32R_AR | 68 | config VIDEO_M32R_AR |
77 | tristate "AR devices" | 69 | tristate "AR devices" |
78 | depends on VIDEO_V4L2 | 70 | depends on VIDEO_V4L2 |
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile index b818afb4d336..a49936b8ce8a 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile | |||
@@ -2,9 +2,6 @@ | |||
2 | # Makefile for the video capture/playback device drivers. | 2 | # Makefile for the video capture/playback device drivers. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_VIDEO_VINO) += indycam.o | ||
6 | obj-$(CONFIG_VIDEO_VINO) += vino.o | ||
7 | |||
8 | obj-$(CONFIG_VIDEO_TIMBERDALE) += timblogiw.o | 5 | obj-$(CONFIG_VIDEO_TIMBERDALE) += timblogiw.o |
9 | obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o | 6 | obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o |
10 | 7 | ||
diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 126ac7c5b6fd..0c1f55648106 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c | |||
@@ -64,6 +64,30 @@ | |||
64 | #define VNDMR_REG 0x58 /* Video n Data Mode Register */ | 64 | #define VNDMR_REG 0x58 /* Video n Data Mode Register */ |
65 | #define VNDMR2_REG 0x5C /* Video n Data Mode Register 2 */ | 65 | #define VNDMR2_REG 0x5C /* Video n Data Mode Register 2 */ |
66 | #define VNUVAOF_REG 0x60 /* Video n UV Address Offset Register */ | 66 | #define VNUVAOF_REG 0x60 /* Video n UV Address Offset Register */ |
67 | #define VNC1A_REG 0x80 /* Video n Coefficient Set C1A Register */ | ||
68 | #define VNC1B_REG 0x84 /* Video n Coefficient Set C1B Register */ | ||
69 | #define VNC1C_REG 0x88 /* Video n Coefficient Set C1C Register */ | ||
70 | #define VNC2A_REG 0x90 /* Video n Coefficient Set C2A Register */ | ||
71 | #define VNC2B_REG 0x94 /* Video n Coefficient Set C2B Register */ | ||
72 | #define VNC2C_REG 0x98 /* Video n Coefficient Set C2C Register */ | ||
73 | #define VNC3A_REG 0xA0 /* Video n Coefficient Set C3A Register */ | ||
74 | #define VNC3B_REG 0xA4 /* Video n Coefficient Set C3B Register */ | ||
75 | #define VNC3C_REG 0xA8 /* Video n Coefficient Set C3C Register */ | ||
76 | #define VNC4A_REG 0xB0 /* Video n Coefficient Set C4A Register */ | ||
77 | #define VNC4B_REG 0xB4 /* Video n Coefficient Set C4B Register */ | ||
78 | #define VNC4C_REG 0xB8 /* Video n Coefficient Set C4C Register */ | ||
79 | #define VNC5A_REG 0xC0 /* Video n Coefficient Set C5A Register */ | ||
80 | #define VNC5B_REG 0xC4 /* Video n Coefficient Set C5B Register */ | ||
81 | #define VNC5C_REG 0xC8 /* Video n Coefficient Set C5C Register */ | ||
82 | #define VNC6A_REG 0xD0 /* Video n Coefficient Set C6A Register */ | ||
83 | #define VNC6B_REG 0xD4 /* Video n Coefficient Set C6B Register */ | ||
84 | #define VNC6C_REG 0xD8 /* Video n Coefficient Set C6C Register */ | ||
85 | #define VNC7A_REG 0xE0 /* Video n Coefficient Set C7A Register */ | ||
86 | #define VNC7B_REG 0xE4 /* Video n Coefficient Set C7B Register */ | ||
87 | #define VNC7C_REG 0xE8 /* Video n Coefficient Set C7C Register */ | ||
88 | #define VNC8A_REG 0xF0 /* Video n Coefficient Set C8A Register */ | ||
89 | #define VNC8B_REG 0xF4 /* Video n Coefficient Set C8B Register */ | ||
90 | #define VNC8C_REG 0xF8 /* Video n Coefficient Set C8C Register */ | ||
67 | 91 | ||
68 | /* Register bit fields for R-Car VIN */ | 92 | /* Register bit fields for R-Car VIN */ |
69 | /* Video n Main Control Register bits */ | 93 | /* Video n Main Control Register bits */ |
@@ -106,6 +130,7 @@ | |||
106 | #define VNDMR2_VPS (1 << 30) | 130 | #define VNDMR2_VPS (1 << 30) |
107 | #define VNDMR2_HPS (1 << 29) | 131 | #define VNDMR2_HPS (1 << 29) |
108 | #define VNDMR2_FTEV (1 << 17) | 132 | #define VNDMR2_FTEV (1 << 17) |
133 | #define VNDMR2_VLV(n) ((n & 0xf) << 12) | ||
109 | 134 | ||
110 | #define VIN_MAX_WIDTH 2048 | 135 | #define VIN_MAX_WIDTH 2048 |
111 | #define VIN_MAX_HEIGHT 2048 | 136 | #define VIN_MAX_HEIGHT 2048 |
@@ -117,6 +142,324 @@ enum chip_id { | |||
117 | RCAR_E1, | 142 | RCAR_E1, |
118 | }; | 143 | }; |
119 | 144 | ||
145 | struct vin_coeff { | ||
146 | unsigned short xs_value; | ||
147 | u32 coeff_set[24]; | ||
148 | }; | ||
149 | |||
150 | static const struct vin_coeff vin_coeff_set[] = { | ||
151 | { 0x0000, { | ||
152 | 0x00000000, 0x00000000, 0x00000000, | ||
153 | 0x00000000, 0x00000000, 0x00000000, | ||
154 | 0x00000000, 0x00000000, 0x00000000, | ||
155 | 0x00000000, 0x00000000, 0x00000000, | ||
156 | 0x00000000, 0x00000000, 0x00000000, | ||
157 | 0x00000000, 0x00000000, 0x00000000, | ||
158 | 0x00000000, 0x00000000, 0x00000000, | ||
159 | 0x00000000, 0x00000000, 0x00000000 }, | ||
160 | }, | ||
161 | { 0x1000, { | ||
162 | 0x000fa400, 0x000fa400, 0x09625902, | ||
163 | 0x000003f8, 0x00000403, 0x3de0d9f0, | ||
164 | 0x001fffed, 0x00000804, 0x3cc1f9c3, | ||
165 | 0x001003de, 0x00000c01, 0x3cb34d7f, | ||
166 | 0x002003d2, 0x00000c00, 0x3d24a92d, | ||
167 | 0x00200bca, 0x00000bff, 0x3df600d2, | ||
168 | 0x002013cc, 0x000007ff, 0x3ed70c7e, | ||
169 | 0x00100fde, 0x00000000, 0x3f87c036 }, | ||
170 | }, | ||
171 | { 0x1200, { | ||
172 | 0x002ffff1, 0x002ffff1, 0x02a0a9c8, | ||
173 | 0x002003e7, 0x001ffffa, 0x000185bc, | ||
174 | 0x002007dc, 0x000003ff, 0x3e52859c, | ||
175 | 0x00200bd4, 0x00000002, 0x3d53996b, | ||
176 | 0x00100fd0, 0x00000403, 0x3d04ad2d, | ||
177 | 0x00000bd5, 0x00000403, 0x3d35ace7, | ||
178 | 0x3ff003e4, 0x00000801, 0x3dc674a1, | ||
179 | 0x3fffe800, 0x00000800, 0x3e76f461 }, | ||
180 | }, | ||
181 | { 0x1400, { | ||
182 | 0x00100be3, 0x00100be3, 0x04d1359a, | ||
183 | 0x00000fdb, 0x002003ed, 0x0211fd93, | ||
184 | 0x00000fd6, 0x002003f4, 0x0002d97b, | ||
185 | 0x000007d6, 0x002ffffb, 0x3e93b956, | ||
186 | 0x3ff003da, 0x001003ff, 0x3db49926, | ||
187 | 0x3fffefe9, 0x00100001, 0x3d655cee, | ||
188 | 0x3fffd400, 0x00000003, 0x3d65f4b6, | ||
189 | 0x000fb421, 0x00000402, 0x3dc6547e }, | ||
190 | }, | ||
191 | { 0x1600, { | ||
192 | 0x00000bdd, 0x00000bdd, 0x06519578, | ||
193 | 0x3ff007da, 0x00000be3, 0x03c24973, | ||
194 | 0x3ff003d9, 0x00000be9, 0x01b30d5f, | ||
195 | 0x3ffff7df, 0x001003f1, 0x0003c542, | ||
196 | 0x000fdfec, 0x001003f7, 0x3ec4711d, | ||
197 | 0x000fc400, 0x002ffffd, 0x3df504f1, | ||
198 | 0x001fa81a, 0x002ffc00, 0x3d957cc2, | ||
199 | 0x002f8c3c, 0x00100000, 0x3db5c891 }, | ||
200 | }, | ||
201 | { 0x1800, { | ||
202 | 0x3ff003dc, 0x3ff003dc, 0x0791e558, | ||
203 | 0x000ff7dd, 0x3ff007de, 0x05328554, | ||
204 | 0x000fe7e3, 0x3ff00be2, 0x03232546, | ||
205 | 0x000fd7ee, 0x000007e9, 0x0143bd30, | ||
206 | 0x001fb800, 0x000007ee, 0x00044511, | ||
207 | 0x002fa015, 0x000007f4, 0x3ef4bcee, | ||
208 | 0x002f8832, 0x001003f9, 0x3e4514c7, | ||
209 | 0x001f7853, 0x001003fd, 0x3de54c9f }, | ||
210 | }, | ||
211 | { 0x1a00, { | ||
212 | 0x000fefe0, 0x000fefe0, 0x08721d3c, | ||
213 | 0x001fdbe7, 0x000ffbde, 0x0652a139, | ||
214 | 0x001fcbf0, 0x000003df, 0x0463292e, | ||
215 | 0x002fb3ff, 0x3ff007e3, 0x0293a91d, | ||
216 | 0x002f9c12, 0x3ff00be7, 0x01241905, | ||
217 | 0x001f8c29, 0x000007ed, 0x3fe470eb, | ||
218 | 0x000f7c46, 0x000007f2, 0x3f04b8ca, | ||
219 | 0x3fef7865, 0x000007f6, 0x3e74e4a8 }, | ||
220 | }, | ||
221 | { 0x1c00, { | ||
222 | 0x001fd3e9, 0x001fd3e9, 0x08f23d26, | ||
223 | 0x002fbff3, 0x001fe3e4, 0x0712ad23, | ||
224 | 0x002fa800, 0x000ff3e0, 0x05631d1b, | ||
225 | 0x001f9810, 0x000ffbe1, 0x03b3890d, | ||
226 | 0x000f8c23, 0x000003e3, 0x0233e8fa, | ||
227 | 0x3fef843b, 0x000003e7, 0x00f430e4, | ||
228 | 0x3fbf8456, 0x3ff00bea, 0x00046cc8, | ||
229 | 0x3f8f8c72, 0x3ff00bef, 0x3f3490ac }, | ||
230 | }, | ||
231 | { 0x1e00, { | ||
232 | 0x001fbbf4, 0x001fbbf4, 0x09425112, | ||
233 | 0x001fa800, 0x002fc7ed, 0x0792b110, | ||
234 | 0x000f980e, 0x001fdbe6, 0x0613110a, | ||
235 | 0x3fff8c20, 0x001fe7e3, 0x04a368fd, | ||
236 | 0x3fcf8c33, 0x000ff7e2, 0x0343b8ed, | ||
237 | 0x3f9f8c4a, 0x000fffe3, 0x0203f8da, | ||
238 | 0x3f5f9c61, 0x000003e6, 0x00e428c5, | ||
239 | 0x3f1fb07b, 0x000003eb, 0x3fe440af }, | ||
240 | }, | ||
241 | { 0x2000, { | ||
242 | 0x000fa400, 0x000fa400, 0x09625902, | ||
243 | 0x3fff980c, 0x001fb7f5, 0x0812b0ff, | ||
244 | 0x3fdf901c, 0x001fc7ed, 0x06b2fcfa, | ||
245 | 0x3faf902d, 0x001fd3e8, 0x055348f1, | ||
246 | 0x3f7f983f, 0x001fe3e5, 0x04038ce3, | ||
247 | 0x3f3fa454, 0x001fefe3, 0x02e3c8d1, | ||
248 | 0x3f0fb86a, 0x001ff7e4, 0x01c3e8c0, | ||
249 | 0x3ecfd880, 0x000fffe6, 0x00c404ac }, | ||
250 | }, | ||
251 | { 0x2200, { | ||
252 | 0x3fdf9c0b, 0x3fdf9c0b, 0x09725cf4, | ||
253 | 0x3fbf9818, 0x3fffa400, 0x0842a8f1, | ||
254 | 0x3f8f9827, 0x000fb3f7, 0x0702f0ec, | ||
255 | 0x3f5fa037, 0x000fc3ef, 0x05d330e4, | ||
256 | 0x3f2fac49, 0x001fcfea, 0x04a364d9, | ||
257 | 0x3effc05c, 0x001fdbe7, 0x038394ca, | ||
258 | 0x3ecfdc6f, 0x001fe7e6, 0x0273b0bb, | ||
259 | 0x3ea00083, 0x001fefe6, 0x0183c0a9 }, | ||
260 | }, | ||
261 | { 0x2400, { | ||
262 | 0x3f9fa014, 0x3f9fa014, 0x098260e6, | ||
263 | 0x3f7f9c23, 0x3fcf9c0a, 0x08629ce5, | ||
264 | 0x3f4fa431, 0x3fefa400, 0x0742d8e1, | ||
265 | 0x3f1fb440, 0x3fffb3f8, 0x062310d9, | ||
266 | 0x3eefc850, 0x000fbbf2, 0x050340d0, | ||
267 | 0x3ecfe062, 0x000fcbec, 0x041364c2, | ||
268 | 0x3ea00073, 0x001fd3ea, 0x03037cb5, | ||
269 | 0x3e902086, 0x001fdfe8, 0x022388a5 }, | ||
270 | }, | ||
271 | { 0x2600, { | ||
272 | 0x3f5fa81e, 0x3f5fa81e, 0x096258da, | ||
273 | 0x3f3fac2b, 0x3f8fa412, 0x088290d8, | ||
274 | 0x3f0fbc38, 0x3fafa408, 0x0772c8d5, | ||
275 | 0x3eefcc47, 0x3fcfa800, 0x0672f4ce, | ||
276 | 0x3ecfe456, 0x3fefaffa, 0x05531cc6, | ||
277 | 0x3eb00066, 0x3fffbbf3, 0x047334bb, | ||
278 | 0x3ea01c77, 0x000fc7ee, 0x039348ae, | ||
279 | 0x3ea04486, 0x000fd3eb, 0x02b350a1 }, | ||
280 | }, | ||
281 | { 0x2800, { | ||
282 | 0x3f2fb426, 0x3f2fb426, 0x094250ce, | ||
283 | 0x3f0fc032, 0x3f4fac1b, 0x086284cd, | ||
284 | 0x3eefd040, 0x3f7fa811, 0x0782acc9, | ||
285 | 0x3ecfe84c, 0x3f9fa807, 0x06a2d8c4, | ||
286 | 0x3eb0005b, 0x3fbfac00, 0x05b2f4bc, | ||
287 | 0x3eb0186a, 0x3fdfb3fa, 0x04c308b4, | ||
288 | 0x3eb04077, 0x3fefbbf4, 0x03f31ca8, | ||
289 | 0x3ec06884, 0x000fbff2, 0x03031c9e }, | ||
290 | }, | ||
291 | { 0x2a00, { | ||
292 | 0x3f0fc42d, 0x3f0fc42d, 0x090240c4, | ||
293 | 0x3eefd439, 0x3f2fb822, 0x08526cc2, | ||
294 | 0x3edfe845, 0x3f4fb018, 0x078294bf, | ||
295 | 0x3ec00051, 0x3f6fac0f, 0x06b2b4bb, | ||
296 | 0x3ec0185f, 0x3f8fac07, 0x05e2ccb4, | ||
297 | 0x3ec0386b, 0x3fafac00, 0x0502e8ac, | ||
298 | 0x3ed05c77, 0x3fcfb3fb, 0x0432f0a3, | ||
299 | 0x3ef08482, 0x3fdfbbf6, 0x0372f898 }, | ||
300 | }, | ||
301 | { 0x2c00, { | ||
302 | 0x3eefdc31, 0x3eefdc31, 0x08e238b8, | ||
303 | 0x3edfec3d, 0x3f0fc828, 0x082258b9, | ||
304 | 0x3ed00049, 0x3f1fc01e, 0x077278b6, | ||
305 | 0x3ed01455, 0x3f3fb815, 0x06c294b2, | ||
306 | 0x3ed03460, 0x3f5fb40d, 0x0602acac, | ||
307 | 0x3ef0506c, 0x3f7fb006, 0x0542c0a4, | ||
308 | 0x3f107476, 0x3f9fb400, 0x0472c89d, | ||
309 | 0x3f309c80, 0x3fbfb7fc, 0x03b2cc94 }, | ||
310 | }, | ||
311 | { 0x2e00, { | ||
312 | 0x3eefec37, 0x3eefec37, 0x088220b0, | ||
313 | 0x3ee00041, 0x3effdc2d, 0x07f244ae, | ||
314 | 0x3ee0144c, 0x3f0fd023, 0x07625cad, | ||
315 | 0x3ef02c57, 0x3f1fc81a, 0x06c274a9, | ||
316 | 0x3f004861, 0x3f3fbc13, 0x060288a6, | ||
317 | 0x3f20686b, 0x3f5fb80c, 0x05529c9e, | ||
318 | 0x3f408c74, 0x3f6fb805, 0x04b2ac96, | ||
319 | 0x3f80ac7e, 0x3f8fb800, 0x0402ac8e }, | ||
320 | }, | ||
321 | { 0x3000, { | ||
322 | 0x3ef0003a, 0x3ef0003a, 0x084210a6, | ||
323 | 0x3ef01045, 0x3effec32, 0x07b228a7, | ||
324 | 0x3f00284e, 0x3f0fdc29, 0x073244a4, | ||
325 | 0x3f104058, 0x3f0fd420, 0x06a258a2, | ||
326 | 0x3f305c62, 0x3f2fc818, 0x0612689d, | ||
327 | 0x3f508069, 0x3f3fc011, 0x05728496, | ||
328 | 0x3f80a072, 0x3f4fc00a, 0x04d28c90, | ||
329 | 0x3fc0c07b, 0x3f6fbc04, 0x04429088 }, | ||
330 | }, | ||
331 | { 0x3200, { | ||
332 | 0x3f00103e, 0x3f00103e, 0x07f1fc9e, | ||
333 | 0x3f102447, 0x3f000035, 0x0782149d, | ||
334 | 0x3f203c4f, 0x3f0ff02c, 0x07122c9c, | ||
335 | 0x3f405458, 0x3f0fe424, 0x06924099, | ||
336 | 0x3f607061, 0x3f1fd41d, 0x06024c97, | ||
337 | 0x3f909068, 0x3f2fcc16, 0x05726490, | ||
338 | 0x3fc0b070, 0x3f3fc80f, 0x04f26c8a, | ||
339 | 0x0000d077, 0x3f4fc409, 0x04627484 }, | ||
340 | }, | ||
341 | { 0x3400, { | ||
342 | 0x3f202040, 0x3f202040, 0x07a1e898, | ||
343 | 0x3f303449, 0x3f100c38, 0x0741fc98, | ||
344 | 0x3f504c50, 0x3f10002f, 0x06e21495, | ||
345 | 0x3f706459, 0x3f1ff028, 0x06722492, | ||
346 | 0x3fa08060, 0x3f1fe421, 0x05f2348f, | ||
347 | 0x3fd09c67, 0x3f1fdc19, 0x05824c89, | ||
348 | 0x0000bc6e, 0x3f2fd014, 0x04f25086, | ||
349 | 0x0040dc74, 0x3f3fcc0d, 0x04825c7f }, | ||
350 | }, | ||
351 | { 0x3600, { | ||
352 | 0x3f403042, 0x3f403042, 0x0761d890, | ||
353 | 0x3f504848, 0x3f301c3b, 0x0701f090, | ||
354 | 0x3f805c50, 0x3f200c33, 0x06a2008f, | ||
355 | 0x3fa07458, 0x3f10002b, 0x06520c8d, | ||
356 | 0x3fd0905e, 0x3f1ff424, 0x05e22089, | ||
357 | 0x0000ac65, 0x3f1fe81d, 0x05823483, | ||
358 | 0x0030cc6a, 0x3f2fdc18, 0x04f23c81, | ||
359 | 0x0080e871, 0x3f2fd412, 0x0482407c }, | ||
360 | }, | ||
361 | { 0x3800, { | ||
362 | 0x3f604043, 0x3f604043, 0x0721c88a, | ||
363 | 0x3f80544a, 0x3f502c3c, 0x06d1d88a, | ||
364 | 0x3fb06851, 0x3f301c35, 0x0681e889, | ||
365 | 0x3fd08456, 0x3f30082f, 0x0611fc88, | ||
366 | 0x00009c5d, 0x3f200027, 0x05d20884, | ||
367 | 0x0030b863, 0x3f2ff421, 0x05621880, | ||
368 | 0x0070d468, 0x3f2fe81b, 0x0502247c, | ||
369 | 0x00c0ec6f, 0x3f2fe015, 0x04a22877 }, | ||
370 | }, | ||
371 | { 0x3a00, { | ||
372 | 0x3f904c44, 0x3f904c44, 0x06e1b884, | ||
373 | 0x3fb0604a, 0x3f70383e, 0x0691c885, | ||
374 | 0x3fe07451, 0x3f502c36, 0x0661d483, | ||
375 | 0x00009055, 0x3f401831, 0x0601ec81, | ||
376 | 0x0030a85b, 0x3f300c2a, 0x05b1f480, | ||
377 | 0x0070c061, 0x3f300024, 0x0562047a, | ||
378 | 0x00b0d867, 0x3f3ff41e, 0x05020c77, | ||
379 | 0x00f0f46b, 0x3f2fec19, 0x04a21474 }, | ||
380 | }, | ||
381 | { 0x3c00, { | ||
382 | 0x3fb05c43, 0x3fb05c43, 0x06c1b07e, | ||
383 | 0x3fe06c4b, 0x3f902c3f, 0x0681c081, | ||
384 | 0x0000844f, 0x3f703838, 0x0631cc7d, | ||
385 | 0x00309855, 0x3f602433, 0x05d1d47e, | ||
386 | 0x0060b459, 0x3f50142e, 0x0581e47b, | ||
387 | 0x00a0c85f, 0x3f400828, 0x0531f078, | ||
388 | 0x00e0e064, 0x3f300021, 0x0501fc73, | ||
389 | 0x00b0fc6a, 0x3f3ff41d, 0x04a20873 }, | ||
390 | }, | ||
391 | { 0x3e00, { | ||
392 | 0x3fe06444, 0x3fe06444, 0x0681a07a, | ||
393 | 0x00007849, 0x3fc0503f, 0x0641b07a, | ||
394 | 0x0020904d, 0x3fa0403a, 0x05f1c07a, | ||
395 | 0x0060a453, 0x3f803034, 0x05c1c878, | ||
396 | 0x0090b858, 0x3f70202f, 0x0571d477, | ||
397 | 0x00d0d05d, 0x3f501829, 0x0531e073, | ||
398 | 0x0110e462, 0x3f500825, 0x04e1e471, | ||
399 | 0x01510065, 0x3f40001f, 0x04a1f06d }, | ||
400 | }, | ||
401 | { 0x4000, { | ||
402 | 0x00007044, 0x00007044, 0x06519476, | ||
403 | 0x00208448, 0x3fe05c3f, 0x0621a476, | ||
404 | 0x0050984d, 0x3fc04c3a, 0x05e1b075, | ||
405 | 0x0080ac52, 0x3fa03c35, 0x05a1b875, | ||
406 | 0x00c0c056, 0x3f803030, 0x0561c473, | ||
407 | 0x0100d45b, 0x3f70202b, 0x0521d46f, | ||
408 | 0x0140e860, 0x3f601427, 0x04d1d46e, | ||
409 | 0x01810064, 0x3f500822, 0x0491dc6b }, | ||
410 | }, | ||
411 | { 0x5000, { | ||
412 | 0x0110a442, 0x0110a442, 0x0551545e, | ||
413 | 0x0140b045, 0x00e0983f, 0x0531585f, | ||
414 | 0x0160c047, 0x00c08c3c, 0x0511645e, | ||
415 | 0x0190cc4a, 0x00908039, 0x04f1685f, | ||
416 | 0x01c0dc4c, 0x00707436, 0x04d1705e, | ||
417 | 0x0200e850, 0x00506833, 0x04b1785b, | ||
418 | 0x0230f453, 0x00305c30, 0x0491805a, | ||
419 | 0x02710056, 0x0010542d, 0x04718059 }, | ||
420 | }, | ||
421 | { 0x6000, { | ||
422 | 0x01c0bc40, 0x01c0bc40, 0x04c13052, | ||
423 | 0x01e0c841, 0x01a0b43d, 0x04c13851, | ||
424 | 0x0210cc44, 0x0180a83c, 0x04a13453, | ||
425 | 0x0230d845, 0x0160a03a, 0x04913c52, | ||
426 | 0x0260e047, 0x01409838, 0x04714052, | ||
427 | 0x0280ec49, 0x01208c37, 0x04514c50, | ||
428 | 0x02b0f44b, 0x01008435, 0x04414c50, | ||
429 | 0x02d1004c, 0x00e07c33, 0x0431544f }, | ||
430 | }, | ||
431 | { 0x7000, { | ||
432 | 0x0230c83e, 0x0230c83e, 0x04711c4c, | ||
433 | 0x0250d03f, 0x0210c43c, 0x0471204b, | ||
434 | 0x0270d840, 0x0200b83c, 0x0451244b, | ||
435 | 0x0290dc42, 0x01e0b43a, 0x0441244c, | ||
436 | 0x02b0e443, 0x01c0b038, 0x0441284b, | ||
437 | 0x02d0ec44, 0x01b0a438, 0x0421304a, | ||
438 | 0x02f0f445, 0x0190a036, 0x04213449, | ||
439 | 0x0310f847, 0x01709c34, 0x04213848 }, | ||
440 | }, | ||
441 | { 0x8000, { | ||
442 | 0x0280d03d, 0x0280d03d, 0x04310c48, | ||
443 | 0x02a0d43e, 0x0270c83c, 0x04311047, | ||
444 | 0x02b0dc3e, 0x0250c83a, 0x04311447, | ||
445 | 0x02d0e040, 0x0240c03a, 0x04211446, | ||
446 | 0x02e0e840, 0x0220bc39, 0x04111847, | ||
447 | 0x0300e842, 0x0210b438, 0x04012445, | ||
448 | 0x0310f043, 0x0200b037, 0x04012045, | ||
449 | 0x0330f444, 0x01e0ac36, 0x03f12445 }, | ||
450 | }, | ||
451 | { 0xefff, { | ||
452 | 0x0340dc3a, 0x0340dc3a, 0x03b0ec40, | ||
453 | 0x0340e03a, 0x0330e039, 0x03c0f03e, | ||
454 | 0x0350e03b, 0x0330dc39, 0x03c0ec3e, | ||
455 | 0x0350e43a, 0x0320dc38, 0x03c0f43e, | ||
456 | 0x0360e43b, 0x0320d839, 0x03b0f03e, | ||
457 | 0x0360e83b, 0x0310d838, 0x03c0fc3b, | ||
458 | 0x0370e83b, 0x0310d439, 0x03a0f83d, | ||
459 | 0x0370e83c, 0x0300d438, 0x03b0fc3c }, | ||
460 | } | ||
461 | }; | ||
462 | |||
120 | enum rcar_vin_state { | 463 | enum rcar_vin_state { |
121 | STOPPED = 0, | 464 | STOPPED = 0, |
122 | RUNNING, | 465 | RUNNING, |
@@ -161,6 +504,9 @@ struct rcar_vin_cam { | |||
161 | /* Client output, as seen by the VIN */ | 504 | /* Client output, as seen by the VIN */ |
162 | unsigned int width; | 505 | unsigned int width; |
163 | unsigned int height; | 506 | unsigned int height; |
507 | /* User window from S_FMT */ | ||
508 | unsigned int out_width; | ||
509 | unsigned int out_height; | ||
164 | /* | 510 | /* |
165 | * User window from S_CROP / G_CROP, produced by client cropping and | 511 | * User window from S_CROP / G_CROP, produced by client cropping and |
166 | * scaling, VIN scaling and VIN cropping, mapped back onto the client | 512 | * scaling, VIN scaling and VIN cropping, mapped back onto the client |
@@ -332,7 +678,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) | |||
332 | vnmc |= VNMC_BPS; | 678 | vnmc |= VNMC_BPS; |
333 | 679 | ||
334 | /* progressive or interlaced mode */ | 680 | /* progressive or interlaced mode */ |
335 | interrupts = progressive ? VNIE_FIE | VNIE_EFE : VNIE_EFE; | 681 | interrupts = progressive ? VNIE_FIE : VNIE_EFE; |
336 | 682 | ||
337 | /* ack interrupts */ | 683 | /* ack interrupts */ |
338 | iowrite32(interrupts, priv->base + VNINTS_REG); | 684 | iowrite32(interrupts, priv->base + VNINTS_REG); |
@@ -667,6 +1013,60 @@ static void rcar_vin_clock_stop(struct soc_camera_host *ici) | |||
667 | /* VIN does not have "mclk" */ | 1013 | /* VIN does not have "mclk" */ |
668 | } | 1014 | } |
669 | 1015 | ||
1016 | static void set_coeff(struct rcar_vin_priv *priv, unsigned short xs) | ||
1017 | { | ||
1018 | int i; | ||
1019 | const struct vin_coeff *p_prev_set = NULL; | ||
1020 | const struct vin_coeff *p_set = NULL; | ||
1021 | |||
1022 | /* Look for suitable coefficient values */ | ||
1023 | for (i = 0; i < ARRAY_SIZE(vin_coeff_set); i++) { | ||
1024 | p_prev_set = p_set; | ||
1025 | p_set = &vin_coeff_set[i]; | ||
1026 | |||
1027 | if (xs < p_set->xs_value) | ||
1028 | break; | ||
1029 | } | ||
1030 | |||
1031 | /* Use previous value if its XS value is closer */ | ||
1032 | if (p_prev_set && p_set && | ||
1033 | xs - p_prev_set->xs_value < p_set->xs_value - xs) | ||
1034 | p_set = p_prev_set; | ||
1035 | |||
1036 | /* Set coefficient registers */ | ||
1037 | iowrite32(p_set->coeff_set[0], priv->base + VNC1A_REG); | ||
1038 | iowrite32(p_set->coeff_set[1], priv->base + VNC1B_REG); | ||
1039 | iowrite32(p_set->coeff_set[2], priv->base + VNC1C_REG); | ||
1040 | |||
1041 | iowrite32(p_set->coeff_set[3], priv->base + VNC2A_REG); | ||
1042 | iowrite32(p_set->coeff_set[4], priv->base + VNC2B_REG); | ||
1043 | iowrite32(p_set->coeff_set[5], priv->base + VNC2C_REG); | ||
1044 | |||
1045 | iowrite32(p_set->coeff_set[6], priv->base + VNC3A_REG); | ||
1046 | iowrite32(p_set->coeff_set[7], priv->base + VNC3B_REG); | ||
1047 | iowrite32(p_set->coeff_set[8], priv->base + VNC3C_REG); | ||
1048 | |||
1049 | iowrite32(p_set->coeff_set[9], priv->base + VNC4A_REG); | ||
1050 | iowrite32(p_set->coeff_set[10], priv->base + VNC4B_REG); | ||
1051 | iowrite32(p_set->coeff_set[11], priv->base + VNC4C_REG); | ||
1052 | |||
1053 | iowrite32(p_set->coeff_set[12], priv->base + VNC5A_REG); | ||
1054 | iowrite32(p_set->coeff_set[13], priv->base + VNC5B_REG); | ||
1055 | iowrite32(p_set->coeff_set[14], priv->base + VNC5C_REG); | ||
1056 | |||
1057 | iowrite32(p_set->coeff_set[15], priv->base + VNC6A_REG); | ||
1058 | iowrite32(p_set->coeff_set[16], priv->base + VNC6B_REG); | ||
1059 | iowrite32(p_set->coeff_set[17], priv->base + VNC6C_REG); | ||
1060 | |||
1061 | iowrite32(p_set->coeff_set[18], priv->base + VNC7A_REG); | ||
1062 | iowrite32(p_set->coeff_set[19], priv->base + VNC7B_REG); | ||
1063 | iowrite32(p_set->coeff_set[20], priv->base + VNC7C_REG); | ||
1064 | |||
1065 | iowrite32(p_set->coeff_set[21], priv->base + VNC8A_REG); | ||
1066 | iowrite32(p_set->coeff_set[22], priv->base + VNC8B_REG); | ||
1067 | iowrite32(p_set->coeff_set[23], priv->base + VNC8C_REG); | ||
1068 | } | ||
1069 | |||
670 | /* rect is guaranteed to not exceed the scaled camera rectangle */ | 1070 | /* rect is guaranteed to not exceed the scaled camera rectangle */ |
671 | static int rcar_vin_set_rect(struct soc_camera_device *icd) | 1071 | static int rcar_vin_set_rect(struct soc_camera_device *icd) |
672 | { | 1072 | { |
@@ -676,6 +1076,7 @@ static int rcar_vin_set_rect(struct soc_camera_device *icd) | |||
676 | unsigned int left_offset, top_offset; | 1076 | unsigned int left_offset, top_offset; |
677 | unsigned char dsize = 0; | 1077 | unsigned char dsize = 0; |
678 | struct v4l2_rect *cam_subrect = &cam->subrect; | 1078 | struct v4l2_rect *cam_subrect = &cam->subrect; |
1079 | u32 value; | ||
679 | 1080 | ||
680 | dev_dbg(icd->parent, "Crop %ux%u@%u:%u\n", | 1081 | dev_dbg(icd->parent, "Crop %ux%u@%u:%u\n", |
681 | icd->user_width, icd->user_height, cam->vin_left, cam->vin_top); | 1082 | icd->user_width, icd->user_height, cam->vin_left, cam->vin_top); |
@@ -695,40 +1096,64 @@ static int rcar_vin_set_rect(struct soc_camera_device *icd) | |||
695 | 1096 | ||
696 | /* Set Start/End Pixel/Line Pre-Clip */ | 1097 | /* Set Start/End Pixel/Line Pre-Clip */ |
697 | iowrite32(left_offset << dsize, priv->base + VNSPPRC_REG); | 1098 | iowrite32(left_offset << dsize, priv->base + VNSPPRC_REG); |
698 | iowrite32((left_offset + cam->width - 1) << dsize, | 1099 | iowrite32((left_offset + cam_subrect->width - 1) << dsize, |
699 | priv->base + VNEPPRC_REG); | 1100 | priv->base + VNEPPRC_REG); |
700 | switch (priv->field) { | 1101 | switch (priv->field) { |
701 | case V4L2_FIELD_INTERLACED: | 1102 | case V4L2_FIELD_INTERLACED: |
702 | case V4L2_FIELD_INTERLACED_TB: | 1103 | case V4L2_FIELD_INTERLACED_TB: |
703 | case V4L2_FIELD_INTERLACED_BT: | 1104 | case V4L2_FIELD_INTERLACED_BT: |
704 | iowrite32(top_offset / 2, priv->base + VNSLPRC_REG); | 1105 | iowrite32(top_offset / 2, priv->base + VNSLPRC_REG); |
705 | iowrite32((top_offset + cam->height) / 2 - 1, | 1106 | iowrite32((top_offset + cam_subrect->height) / 2 - 1, |
706 | priv->base + VNELPRC_REG); | 1107 | priv->base + VNELPRC_REG); |
707 | break; | 1108 | break; |
708 | default: | 1109 | default: |
709 | iowrite32(top_offset, priv->base + VNSLPRC_REG); | 1110 | iowrite32(top_offset, priv->base + VNSLPRC_REG); |
710 | iowrite32(top_offset + cam->height - 1, | 1111 | iowrite32(top_offset + cam_subrect->height - 1, |
711 | priv->base + VNELPRC_REG); | 1112 | priv->base + VNELPRC_REG); |
712 | break; | 1113 | break; |
713 | } | 1114 | } |
714 | 1115 | ||
1116 | /* Set scaling coefficient */ | ||
1117 | value = 0; | ||
1118 | if (cam_subrect->height != cam->out_height) | ||
1119 | value = (4096 * cam_subrect->height) / cam->out_height; | ||
1120 | dev_dbg(icd->parent, "YS Value: %x\n", value); | ||
1121 | iowrite32(value, priv->base + VNYS_REG); | ||
1122 | |||
1123 | value = 0; | ||
1124 | if (cam_subrect->width != cam->out_width) | ||
1125 | value = (4096 * cam_subrect->width) / cam->out_width; | ||
1126 | |||
1127 | /* Horizontal upscaling is up to double size */ | ||
1128 | if (0 < value && value < 2048) | ||
1129 | value = 2048; | ||
1130 | |||
1131 | dev_dbg(icd->parent, "XS Value: %x\n", value); | ||
1132 | iowrite32(value, priv->base + VNXS_REG); | ||
1133 | |||
1134 | /* Horizontal upscaling is carried out by scaling down from double size */ | ||
1135 | if (value < 4096) | ||
1136 | value *= 2; | ||
1137 | |||
1138 | set_coeff(priv, value); | ||
1139 | |||
715 | /* Set Start/End Pixel/Line Post-Clip */ | 1140 | /* Set Start/End Pixel/Line Post-Clip */ |
716 | iowrite32(0, priv->base + VNSPPOC_REG); | 1141 | iowrite32(0, priv->base + VNSPPOC_REG); |
717 | iowrite32(0, priv->base + VNSLPOC_REG); | 1142 | iowrite32(0, priv->base + VNSLPOC_REG); |
718 | iowrite32((cam_subrect->width - 1) << dsize, priv->base + VNEPPOC_REG); | 1143 | iowrite32((cam->out_width - 1) << dsize, priv->base + VNEPPOC_REG); |
719 | switch (priv->field) { | 1144 | switch (priv->field) { |
720 | case V4L2_FIELD_INTERLACED: | 1145 | case V4L2_FIELD_INTERLACED: |
721 | case V4L2_FIELD_INTERLACED_TB: | 1146 | case V4L2_FIELD_INTERLACED_TB: |
722 | case V4L2_FIELD_INTERLACED_BT: | 1147 | case V4L2_FIELD_INTERLACED_BT: |
723 | iowrite32(cam_subrect->height / 2 - 1, | 1148 | iowrite32(cam->out_height / 2 - 1, |
724 | priv->base + VNELPOC_REG); | 1149 | priv->base + VNELPOC_REG); |
725 | break; | 1150 | break; |
726 | default: | 1151 | default: |
727 | iowrite32(cam_subrect->height - 1, priv->base + VNELPOC_REG); | 1152 | iowrite32(cam->out_height - 1, priv->base + VNELPOC_REG); |
728 | break; | 1153 | break; |
729 | } | 1154 | } |
730 | 1155 | ||
731 | iowrite32(ALIGN(cam->width, 0x10), priv->base + VNIS_REG); | 1156 | iowrite32(ALIGN(cam->out_width, 0x10), priv->base + VNIS_REG); |
732 | 1157 | ||
733 | return 0; | 1158 | return 0; |
734 | } | 1159 | } |
@@ -819,7 +1244,7 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd) | |||
819 | if (ret < 0 && ret != -ENOIOCTLCMD) | 1244 | if (ret < 0 && ret != -ENOIOCTLCMD) |
820 | return ret; | 1245 | return ret; |
821 | 1246 | ||
822 | val = priv->field == V4L2_FIELD_NONE ? VNDMR2_FTEV : 0; | 1247 | val = VNDMR2_FTEV | VNDMR2_VLV(1); |
823 | if (!(common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) | 1248 | if (!(common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) |
824 | val |= VNDMR2_VPS; | 1249 | val |= VNDMR2_VPS; |
825 | if (!(common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)) | 1250 | if (!(common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)) |
@@ -880,6 +1305,14 @@ static const struct soc_mbus_pixelfmt rcar_vin_formats[] = { | |||
880 | .layout = SOC_MBUS_LAYOUT_PLANAR_Y_C, | 1305 | .layout = SOC_MBUS_LAYOUT_PLANAR_Y_C, |
881 | }, | 1306 | }, |
882 | { | 1307 | { |
1308 | .fourcc = V4L2_PIX_FMT_YUYV, | ||
1309 | .name = "YUYV", | ||
1310 | .bits_per_sample = 16, | ||
1311 | .packing = SOC_MBUS_PACKING_NONE, | ||
1312 | .order = SOC_MBUS_ORDER_LE, | ||
1313 | .layout = SOC_MBUS_LAYOUT_PACKED, | ||
1314 | }, | ||
1315 | { | ||
883 | .fourcc = V4L2_PIX_FMT_UYVY, | 1316 | .fourcc = V4L2_PIX_FMT_UYVY, |
884 | .name = "UYVY", | 1317 | .name = "UYVY", |
885 | .bits_per_sample = 16, | 1318 | .bits_per_sample = 16, |
@@ -999,6 +1432,8 @@ static int rcar_vin_get_formats(struct soc_camera_device *icd, unsigned int idx, | |||
999 | cam->subrect = rect; | 1432 | cam->subrect = rect; |
1000 | cam->width = mf.width; | 1433 | cam->width = mf.width; |
1001 | cam->height = mf.height; | 1434 | cam->height = mf.height; |
1435 | cam->out_width = mf.width; | ||
1436 | cam->out_height = mf.height; | ||
1002 | 1437 | ||
1003 | icd->host_priv = cam; | 1438 | icd->host_priv = cam; |
1004 | } else { | 1439 | } else { |
@@ -1259,6 +1694,9 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, | |||
1259 | dev_dbg(dev, "W: %u : %u, H: %u : %u\n", | 1694 | dev_dbg(dev, "W: %u : %u, H: %u : %u\n", |
1260 | vin_sub_width, pix->width, vin_sub_height, pix->height); | 1695 | vin_sub_width, pix->width, vin_sub_height, pix->height); |
1261 | 1696 | ||
1697 | cam->out_width = pix->width; | ||
1698 | cam->out_height = pix->height; | ||
1699 | |||
1262 | icd->current_fmt = xlate; | 1700 | icd->current_fmt = xlate; |
1263 | 1701 | ||
1264 | priv->field = field; | 1702 | priv->field = field; |
@@ -1310,8 +1748,12 @@ static int rcar_vin_try_fmt(struct soc_camera_device *icd, | |||
1310 | if (ret < 0) | 1748 | if (ret < 0) |
1311 | return ret; | 1749 | return ret; |
1312 | 1750 | ||
1313 | pix->width = mf.width; | 1751 | /* Adjust only if VIN cannot scale */ |
1314 | pix->height = mf.height; | 1752 | if (pix->width > mf.width * 2) |
1753 | pix->width = mf.width * 2; | ||
1754 | if (pix->height > mf.height * 3) | ||
1755 | pix->height = mf.height * 3; | ||
1756 | |||
1315 | pix->field = mf.field; | 1757 | pix->field = mf.field; |
1316 | pix->colorspace = mf.colorspace; | 1758 | pix->colorspace = mf.colorspace; |
1317 | 1759 | ||
@@ -1395,6 +1837,8 @@ static struct soc_camera_host_ops rcar_vin_host_ops = { | |||
1395 | 1837 | ||
1396 | #ifdef CONFIG_OF | 1838 | #ifdef CONFIG_OF |
1397 | static struct of_device_id rcar_vin_of_table[] = { | 1839 | static struct of_device_id rcar_vin_of_table[] = { |
1840 | { .compatible = "renesas,vin-r8a7794", .data = (void *)RCAR_GEN2 }, | ||
1841 | { .compatible = "renesas,vin-r8a7793", .data = (void *)RCAR_GEN2 }, | ||
1398 | { .compatible = "renesas,vin-r8a7791", .data = (void *)RCAR_GEN2 }, | 1842 | { .compatible = "renesas,vin-r8a7791", .data = (void *)RCAR_GEN2 }, |
1399 | { .compatible = "renesas,vin-r8a7790", .data = (void *)RCAR_GEN2 }, | 1843 | { .compatible = "renesas,vin-r8a7790", .data = (void *)RCAR_GEN2 }, |
1400 | { .compatible = "renesas,vin-r8a7779", .data = (void *)RCAR_H1 }, | 1844 | { .compatible = "renesas,vin-r8a7779", .data = (void *)RCAR_H1 }, |
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index ee5c3992b276..39ff79f6aa67 100644 --- a/drivers/media/platform/vivid/vivid-vid-out.c +++ b/drivers/media/platform/vivid/vivid-vid-out.c | |||
@@ -625,7 +625,7 @@ int vivid_vid_out_g_selection(struct file *file, void *priv, | |||
625 | sel->r = dev->fmt_out_rect; | 625 | sel->r = dev->fmt_out_rect; |
626 | break; | 626 | break; |
627 | case V4L2_SEL_TGT_CROP_BOUNDS: | 627 | case V4L2_SEL_TGT_CROP_BOUNDS: |
628 | if (!dev->has_compose_out) | 628 | if (!dev->has_crop_out) |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | sel->r = vivid_max_rect; | 630 | sel->r = vivid_max_rect; |
631 | break; | 631 | break; |
diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig index 056181f2f569..7496f332f3f5 100644 --- a/drivers/media/usb/Kconfig +++ b/drivers/media/usb/Kconfig | |||
@@ -24,7 +24,6 @@ if MEDIA_ANALOG_TV_SUPPORT | |||
24 | comment "Analog TV USB devices" | 24 | comment "Analog TV USB devices" |
25 | source "drivers/media/usb/pvrusb2/Kconfig" | 25 | source "drivers/media/usb/pvrusb2/Kconfig" |
26 | source "drivers/media/usb/hdpvr/Kconfig" | 26 | source "drivers/media/usb/hdpvr/Kconfig" |
27 | source "drivers/media/usb/tlg2300/Kconfig" | ||
28 | source "drivers/media/usb/usbvision/Kconfig" | 27 | source "drivers/media/usb/usbvision/Kconfig" |
29 | source "drivers/media/usb/stk1160/Kconfig" | 28 | source "drivers/media/usb/stk1160/Kconfig" |
30 | source "drivers/media/usb/go7007/Kconfig" | 29 | source "drivers/media/usb/go7007/Kconfig" |
diff --git a/drivers/media/usb/Makefile b/drivers/media/usb/Makefile index 6f2eb7c8416c..8874ba774a34 100644 --- a/drivers/media/usb/Makefile +++ b/drivers/media/usb/Makefile | |||
@@ -16,7 +16,6 @@ obj-$(CONFIG_VIDEO_CPIA2) += cpia2/ | |||
16 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ | 16 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ |
17 | obj-$(CONFIG_VIDEO_HDPVR) += hdpvr/ | 17 | obj-$(CONFIG_VIDEO_HDPVR) += hdpvr/ |
18 | obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/ | 18 | obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/ |
19 | obj-$(CONFIG_VIDEO_TLG2300) += tlg2300/ | ||
20 | obj-$(CONFIG_VIDEO_USBVISION) += usbvision/ | 19 | obj-$(CONFIG_VIDEO_USBVISION) += usbvision/ |
21 | obj-$(CONFIG_VIDEO_STK1160) += stk1160/ | 20 | obj-$(CONFIG_VIDEO_STK1160) += stk1160/ |
22 | obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/ | 21 | obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/ |
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 75658717961f..faac2f4e0f3a 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -1017,6 +1017,12 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, | |||
1017 | ret = ops->vidioc_querycap(file, fh, cap); | 1017 | ret = ops->vidioc_querycap(file, fh, cap); |
1018 | 1018 | ||
1019 | cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT; | 1019 | cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT; |
1020 | /* | ||
1021 | * Drivers MUST fill in device_caps, so check for this and | ||
1022 | * warn if it was forgotten. | ||
1023 | */ | ||
1024 | WARN_ON(!(cap->capabilities & V4L2_CAP_DEVICE_CAPS) || | ||
1025 | !cap->device_caps); | ||
1020 | cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT; | 1026 | cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT; |
1021 | 1027 | ||
1022 | return ret; | 1028 | return ret; |
diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig index 96498b7fc20e..2a054a99d433 100644 --- a/drivers/staging/media/Kconfig +++ b/drivers/staging/media/Kconfig | |||
@@ -27,12 +27,18 @@ source "drivers/staging/media/davinci_vpfe/Kconfig" | |||
27 | 27 | ||
28 | source "drivers/staging/media/dt3155v4l/Kconfig" | 28 | source "drivers/staging/media/dt3155v4l/Kconfig" |
29 | 29 | ||
30 | source "drivers/staging/media/tlg2300/Kconfig" | ||
31 | |||
30 | source "drivers/staging/media/mn88472/Kconfig" | 32 | source "drivers/staging/media/mn88472/Kconfig" |
31 | 33 | ||
32 | source "drivers/staging/media/mn88473/Kconfig" | 34 | source "drivers/staging/media/mn88473/Kconfig" |
33 | 35 | ||
34 | source "drivers/staging/media/omap4iss/Kconfig" | 36 | source "drivers/staging/media/omap4iss/Kconfig" |
35 | 37 | ||
38 | source "drivers/staging/media/parport/Kconfig" | ||
39 | |||
40 | source "drivers/staging/media/vino/Kconfig" | ||
41 | |||
36 | # Keep LIRC at the end, as it has sub-menus | 42 | # Keep LIRC at the end, as it has sub-menus |
37 | source "drivers/staging/media/lirc/Kconfig" | 43 | source "drivers/staging/media/lirc/Kconfig" |
38 | 44 | ||
diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile index 30fb352fc4a9..412b28408398 100644 --- a/drivers/staging/media/Makefile +++ b/drivers/staging/media/Makefile | |||
@@ -6,4 +6,7 @@ obj-$(CONFIG_VIDEO_DM365_VPFE) += davinci_vpfe/ | |||
6 | obj-$(CONFIG_VIDEO_OMAP4) += omap4iss/ | 6 | obj-$(CONFIG_VIDEO_OMAP4) += omap4iss/ |
7 | obj-$(CONFIG_DVB_MN88472) += mn88472/ | 7 | obj-$(CONFIG_DVB_MN88472) += mn88472/ |
8 | obj-$(CONFIG_DVB_MN88473) += mn88473/ | 8 | obj-$(CONFIG_DVB_MN88473) += mn88473/ |
9 | obj-y += parport/ | ||
10 | obj-$(CONFIG_VIDEO_TLG2300) += tlg2300/ | ||
11 | obj-y += vino/ | ||
9 | 12 | ||
diff --git a/drivers/media/parport/Kconfig b/drivers/staging/media/parport/Kconfig index 948c981d9f05..15974efdba1d 100644 --- a/drivers/media/parport/Kconfig +++ b/drivers/staging/media/parport/Kconfig | |||
@@ -7,18 +7,22 @@ menuconfig MEDIA_PARPORT_SUPPORT | |||
7 | 7 | ||
8 | if MEDIA_PARPORT_SUPPORT | 8 | if MEDIA_PARPORT_SUPPORT |
9 | config VIDEO_BWQCAM | 9 | config VIDEO_BWQCAM |
10 | tristate "Quickcam BW Video For Linux" | 10 | tristate "Quickcam BW Video For Linux (Deprecated)" |
11 | depends on PARPORT && VIDEO_V4L2 | 11 | depends on PARPORT && VIDEO_V4L2 |
12 | select VIDEOBUF2_VMALLOC | 12 | select VIDEOBUF2_VMALLOC |
13 | help | 13 | help |
14 | Say Y have if you the black and white version of the QuickCam | 14 | Say Y have if you the black and white version of the QuickCam |
15 | camera. See the next option for the color version. | 15 | camera. See the next option for the color version. |
16 | 16 | ||
17 | This driver is deprecated and will be removed soon. If you have | ||
18 | hardware for this and you want to work on this driver, then contact | ||
19 | the linux-media mailinglist. | ||
20 | |||
17 | To compile this driver as a module, choose M here: the | 21 | To compile this driver as a module, choose M here: the |
18 | module will be called bw-qcam. | 22 | module will be called bw-qcam. |
19 | 23 | ||
20 | config VIDEO_CQCAM | 24 | config VIDEO_CQCAM |
21 | tristate "QuickCam Colour Video For Linux" | 25 | tristate "QuickCam Colour Video For Linux (Deprecated)" |
22 | depends on PARPORT && VIDEO_V4L2 | 26 | depends on PARPORT && VIDEO_V4L2 |
23 | help | 27 | help |
24 | This is the video4linux driver for the colour version of the | 28 | This is the video4linux driver for the colour version of the |
@@ -28,18 +32,26 @@ config VIDEO_CQCAM | |||
28 | as a module (c-qcam). | 32 | as a module (c-qcam). |
29 | Read <file:Documentation/video4linux/CQcam.txt> for more information. | 33 | Read <file:Documentation/video4linux/CQcam.txt> for more information. |
30 | 34 | ||
35 | This driver is deprecated and will be removed soon. If you have | ||
36 | hardware for this and you want to work on this driver, then contact | ||
37 | the linux-media mailinglist. | ||
38 | |||
31 | config VIDEO_PMS | 39 | config VIDEO_PMS |
32 | tristate "Mediavision Pro Movie Studio Video For Linux" | 40 | tristate "Mediavision Pro Movie Studio Video For Linux (Deprecated)" |
33 | depends on ISA && VIDEO_V4L2 | 41 | depends on ISA && VIDEO_V4L2 |
34 | help | 42 | help |
35 | Say Y if you have the ISA Mediavision Pro Movie Studio | 43 | Say Y if you have the ISA Mediavision Pro Movie Studio |
36 | capture card. | 44 | capture card. |
37 | 45 | ||
46 | This driver is deprecated and will be removed soon. If you have | ||
47 | hardware for this and you want to work on this driver, then contact | ||
48 | the linux-media mailinglist. | ||
49 | |||
38 | To compile this driver as a module, choose M here: the | 50 | To compile this driver as a module, choose M here: the |
39 | module will be called pms. | 51 | module will be called pms. |
40 | 52 | ||
41 | config VIDEO_W9966 | 53 | config VIDEO_W9966 |
42 | tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux" | 54 | tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux (Deprecated)" |
43 | depends on PARPORT_1284 && PARPORT && VIDEO_V4L2 | 55 | depends on PARPORT_1284 && PARPORT && VIDEO_V4L2 |
44 | help | 56 | help |
45 | Video4linux driver for Winbond's w9966 based Webcams. | 57 | Video4linux driver for Winbond's w9966 based Webcams. |
@@ -50,4 +62,8 @@ config VIDEO_W9966 | |||
50 | 62 | ||
51 | Check out <file:Documentation/video4linux/w9966.txt> for more | 63 | Check out <file:Documentation/video4linux/w9966.txt> for more |
52 | information. | 64 | information. |
65 | |||
66 | This driver is deprecated and will be removed soon. If you have | ||
67 | hardware for this and you want to work on this driver, then contact | ||
68 | the linux-media mailinglist. | ||
53 | endif | 69 | endif |
diff --git a/drivers/media/parport/Makefile b/drivers/staging/media/parport/Makefile index 4eea06d7af5b..4eea06d7af5b 100644 --- a/drivers/media/parport/Makefile +++ b/drivers/staging/media/parport/Makefile | |||
diff --git a/drivers/media/parport/bw-qcam.c b/drivers/staging/media/parport/bw-qcam.c index 67b9da1dc43f..67b9da1dc43f 100644 --- a/drivers/media/parport/bw-qcam.c +++ b/drivers/staging/media/parport/bw-qcam.c | |||
diff --git a/drivers/media/parport/c-qcam.c b/drivers/staging/media/parport/c-qcam.c index b9010bd3ed3e..b9010bd3ed3e 100644 --- a/drivers/media/parport/c-qcam.c +++ b/drivers/staging/media/parport/c-qcam.c | |||
diff --git a/drivers/media/parport/pms.c b/drivers/staging/media/parport/pms.c index e6b497528cea..e6b497528cea 100644 --- a/drivers/media/parport/pms.c +++ b/drivers/staging/media/parport/pms.c | |||
diff --git a/drivers/media/parport/w9966.c b/drivers/staging/media/parport/w9966.c index f7502f3a6a3c..f7502f3a6a3c 100644 --- a/drivers/media/parport/w9966.c +++ b/drivers/staging/media/parport/w9966.c | |||
diff --git a/drivers/media/usb/tlg2300/Kconfig b/drivers/staging/media/tlg2300/Kconfig index 645d915267e6..81784c6f7b88 100644 --- a/drivers/media/usb/tlg2300/Kconfig +++ b/drivers/staging/media/tlg2300/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | config VIDEO_TLG2300 | 1 | config VIDEO_TLG2300 |
2 | tristate "Telegent TLG2300 USB video capture support" | 2 | tristate "Telegent TLG2300 USB video capture support (Deprecated)" |
3 | depends on VIDEO_DEV && I2C && SND && DVB_CORE | 3 | depends on VIDEO_DEV && I2C && SND && DVB_CORE |
4 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
5 | select VIDEO_TVEEPROM | 5 | select VIDEO_TVEEPROM |
@@ -12,5 +12,9 @@ config VIDEO_TLG2300 | |||
12 | This is a video4linux driver for Telegent tlg2300 based TV cards. | 12 | This is a video4linux driver for Telegent tlg2300 based TV cards. |
13 | The driver supports V4L2, DVB-T and radio. | 13 | The driver supports V4L2, DVB-T and radio. |
14 | 14 | ||
15 | This driver is deprecated and will be removed soon. If you have | ||
16 | hardware for this and you want to work on this driver, then contact | ||
17 | the linux-media mailinglist. | ||
18 | |||
15 | To compile this driver as a module, choose M here: the | 19 | To compile this driver as a module, choose M here: the |
16 | module will be called poseidon | 20 | module will be called poseidon |
diff --git a/drivers/media/usb/tlg2300/Makefile b/drivers/staging/media/tlg2300/Makefile index 137f8e38cdec..137f8e38cdec 100644 --- a/drivers/media/usb/tlg2300/Makefile +++ b/drivers/staging/media/tlg2300/Makefile | |||
diff --git a/drivers/media/usb/tlg2300/pd-alsa.c b/drivers/staging/media/tlg2300/pd-alsa.c index dd8fe100590f..dd8fe100590f 100644 --- a/drivers/media/usb/tlg2300/pd-alsa.c +++ b/drivers/staging/media/tlg2300/pd-alsa.c | |||
diff --git a/drivers/media/usb/tlg2300/pd-common.h b/drivers/staging/media/tlg2300/pd-common.h index 9e23ad32d2fe..9e23ad32d2fe 100644 --- a/drivers/media/usb/tlg2300/pd-common.h +++ b/drivers/staging/media/tlg2300/pd-common.h | |||
diff --git a/drivers/media/usb/tlg2300/pd-dvb.c b/drivers/staging/media/tlg2300/pd-dvb.c index ca4994a5190c..ca4994a5190c 100644 --- a/drivers/media/usb/tlg2300/pd-dvb.c +++ b/drivers/staging/media/tlg2300/pd-dvb.c | |||
diff --git a/drivers/media/usb/tlg2300/pd-main.c b/drivers/staging/media/tlg2300/pd-main.c index b31f4791b8ff..b31f4791b8ff 100644 --- a/drivers/media/usb/tlg2300/pd-main.c +++ b/drivers/staging/media/tlg2300/pd-main.c | |||
diff --git a/drivers/media/usb/tlg2300/pd-radio.c b/drivers/staging/media/tlg2300/pd-radio.c index b391194a840c..b391194a840c 100644 --- a/drivers/media/usb/tlg2300/pd-radio.c +++ b/drivers/staging/media/tlg2300/pd-radio.c | |||
diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/staging/media/tlg2300/pd-video.c index 8cd7f02fcf9f..8cd7f02fcf9f 100644 --- a/drivers/media/usb/tlg2300/pd-video.c +++ b/drivers/staging/media/tlg2300/pd-video.c | |||
diff --git a/drivers/media/usb/tlg2300/vendorcmds.h b/drivers/staging/media/tlg2300/vendorcmds.h index ba6f4ae3b2c2..ba6f4ae3b2c2 100644 --- a/drivers/media/usb/tlg2300/vendorcmds.h +++ b/drivers/staging/media/tlg2300/vendorcmds.h | |||
diff --git a/drivers/staging/media/vino/Kconfig b/drivers/staging/media/vino/Kconfig new file mode 100644 index 000000000000..03700dadafd8 --- /dev/null +++ b/drivers/staging/media/vino/Kconfig | |||
@@ -0,0 +1,24 @@ | |||
1 | config VIDEO_VINO | ||
2 | tristate "SGI Vino Video For Linux (Deprecated)" | ||
3 | depends on I2C && SGI_IP22 && VIDEO_V4L2 | ||
4 | select VIDEO_SAA7191 if MEDIA_SUBDRV_AUTOSELECT | ||
5 | help | ||
6 | Say Y here to build in support for the Vino video input system found | ||
7 | on SGI Indy machines. | ||
8 | |||
9 | This driver is deprecated and will be removed soon. If you have | ||
10 | hardware for this and you want to work on this driver, then contact | ||
11 | the linux-media mailinglist. | ||
12 | |||
13 | config VIDEO_SAA7191 | ||
14 | tristate "Philips SAA7191 video decoder (Deprecated)" | ||
15 | depends on VIDEO_V4L2 && I2C | ||
16 | ---help--- | ||
17 | Support for the Philips SAA7191 video decoder. | ||
18 | |||
19 | This driver is deprecated and will be removed soon. If you have | ||
20 | hardware for this and you want to work on this driver, then contact | ||
21 | the linux-media mailinglist. | ||
22 | |||
23 | To compile this driver as a module, choose M here: the | ||
24 | module will be called saa7191. | ||
diff --git a/drivers/staging/media/vino/Makefile b/drivers/staging/media/vino/Makefile new file mode 100644 index 000000000000..914c2513687c --- /dev/null +++ b/drivers/staging/media/vino/Makefile | |||
@@ -0,0 +1,3 @@ | |||
1 | obj-$(CONFIG_VIDEO_VINO) += indycam.o | ||
2 | obj-$(CONFIG_VIDEO_VINO) += vino.o | ||
3 | obj-$(CONFIG_VIDEO_SAA7191) += saa7191.o | ||
diff --git a/drivers/media/platform/indycam.c b/drivers/staging/media/vino/indycam.c index f1d192bbcb4c..f1d192bbcb4c 100644 --- a/drivers/media/platform/indycam.c +++ b/drivers/staging/media/vino/indycam.c | |||
diff --git a/drivers/media/platform/indycam.h b/drivers/staging/media/vino/indycam.h index 881f21c474c4..881f21c474c4 100644 --- a/drivers/media/platform/indycam.h +++ b/drivers/staging/media/vino/indycam.h | |||
diff --git a/drivers/media/i2c/saa7191.c b/drivers/staging/media/vino/saa7191.c index 8e9699268a63..8e9699268a63 100644 --- a/drivers/media/i2c/saa7191.c +++ b/drivers/staging/media/vino/saa7191.c | |||
diff --git a/drivers/media/i2c/saa7191.h b/drivers/staging/media/vino/saa7191.h index 803c74d6066f..803c74d6066f 100644 --- a/drivers/media/i2c/saa7191.h +++ b/drivers/staging/media/vino/saa7191.h | |||
diff --git a/drivers/media/platform/vino.c b/drivers/staging/media/vino/vino.c index 2c85357f774d..2c85357f774d 100644 --- a/drivers/media/platform/vino.c +++ b/drivers/staging/media/vino/vino.c | |||
diff --git a/drivers/media/platform/vino.h b/drivers/staging/media/vino/vino.h index de2d615ae7c9..de2d615ae7c9 100644 --- a/drivers/media/platform/vino.h +++ b/drivers/staging/media/vino/vino.h | |||
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index 5a86d8ede09c..26db20647e6f 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h | |||
@@ -31,9 +31,9 @@ struct v4l2_mbus_framefmt { | |||
31 | __u32 code; | 31 | __u32 code; |
32 | __u32 field; | 32 | __u32 field; |
33 | __u32 colorspace; | 33 | __u32 colorspace; |
34 | __u32 ycbcr_enc; | 34 | __u16 ycbcr_enc; |
35 | __u32 quantization; | 35 | __u16 quantization; |
36 | __u32 reserved[5]; | 36 | __u32 reserved[6]; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifndef __KERNEL__ | 39 | #ifndef __KERNEL__ |