Merge branch 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
V4L/DVB: pxa_camera: move fifo reset direct before dma start
V4L/DVB: video: testing unsigned for less than 0
V4L/DVB: mx1-camera: compile fix
V4L/DVB: budget: Oops: "BUG: unable to handle kernel NULL pointer dereference"
V4L/DVB: ngene: Workaround for stuck DiSEqC pin
V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
V4L/DVB: v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1
V4L/DVB: feature-removal: announce videotext.h removal
V4L/DVB: V4L - vpfe capture - fix for kernel crash
V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver
V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration
V4L/DVB: saa7146: fix up bytesperline if it is an impossible value
V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation fails
V4L/DVB: V4L - Makfile:Removed duplicate entry of davinci
V4L/DVB: omap24xxcam: potential buffer overflow

+90 -65
+23
Documentation/feature-removal-schedule.txt
··· 589 589 Generally invoked by accident today. 590 590 Seen as doing more harm than good. 591 591 Who: Len Brown <len.brown@intel.com> 592 + 593 + ---------------------------- 594 + 595 + What: video4linux /dev/vtx teletext API support 596 + When: 2.6.35 597 + Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c 598 + include/linux/videotext.h 599 + Why: The vtx device nodes have been superseded by vbi device nodes 600 + for many years. No applications exist that use the vtx support. 601 + Of the two i2c drivers that actually support this API the saa5249 602 + has been impossible to use for a year now and no known hardware 603 + that supports this device exists. The saa5246a is theoretically 604 + supported by the old mxb boards, but it never actually worked. 605 + 606 + In summary: there is no hardware that can use this API and there 607 + are no applications actually implementing this API. 608 + 609 + The vtx support still reserves minors 192-223 and we would really 610 + like to reuse those for upcoming new functionality. In the unlikely 611 + event that new hardware appears that wants to use the functionality 612 + provided by the vtx API, then that functionality should be build 613 + around the sliced VBI API instead. 614 + Who: Hans Verkuil <hverkuil@xs4all.nl>
+7 -1
arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
··· 31 31 #define DMA_MODE_WRITE 1 32 32 #define DMA_MODE_MASK 1 33 33 34 - #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) 34 + #define MX1_DMA_REG(offset) MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR + (offset)) 35 + 36 + /* DMA Interrupt Mask Register */ 37 + #define MX1_DMA_DIMR MX1_DMA_REG(0x08) 38 + 39 + /* Channel Control Register */ 40 + #define MX1_DMA_CCR(x) MX1_DMA_REG(0x8c + ((x) << 6)) 35 41 36 42 #define IMX_DMA_MEMSIZE_32 (0 << 4) 37 43 #define IMX_DMA_MEMSIZE_8 (1 << 4)
+5 -6
drivers/media/common/saa7146_fops.c
··· 423 423 } 424 424 } 425 425 426 - int saa7146_vv_devinit(struct saa7146_dev *dev) 427 - { 428 - return v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); 429 - } 430 - EXPORT_SYMBOL_GPL(saa7146_vv_devinit); 431 - 432 426 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) 433 427 { 434 428 struct saa7146_vv *vv; 429 + int err; 430 + 431 + err = v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); 432 + if (err) 433 + return err; 435 434 436 435 vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); 437 436 if (vv == NULL) {
+5 -3
drivers/media/common/saa7146_video.c
··· 558 558 /* ok, accept it */ 559 559 vv->ov_fb = *fb; 560 560 vv->ov_fmt = fmt; 561 - if (0 == vv->ov_fb.fmt.bytesperline) 562 - vv->ov_fb.fmt.bytesperline = 563 - vv->ov_fb.fmt.width * fmt->depth / 8; 561 + 562 + if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { 563 + vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; 564 + DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline)); 565 + } 564 566 565 567 mutex_unlock(&dev->lock); 566 568 return 0;
+4
drivers/media/dvb/frontends/stv090x.c
··· 4470 4470 if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) 4471 4471 goto err; 4472 4472 4473 + /* workaround for stuck DiSEqC output */ 4474 + if (config->diseqc_envelope_mode) 4475 + stv090x_send_diseqc_burst(fe, SEC_MINI_A); 4476 + 4473 4477 return 0; 4474 4478 err: 4475 4479 dprintk(FE_ERROR, 1, "I/O error");
-3
drivers/media/dvb/ttpci/budget.c
··· 643 643 &budget->i2c_adap, 644 644 &tt1600_isl6423_config); 645 645 646 - } else { 647 - dvb_frontend_detach(budget->dvb_frontend); 648 - budget->dvb_frontend = NULL; 649 646 } 650 647 } 651 648 break;
+2 -2
drivers/media/video/Kconfig
··· 361 361 362 362 config VIDEO_SAA7191 363 363 tristate "Philips SAA7191 video decoder" 364 - depends on VIDEO_V4L1 && I2C 364 + depends on VIDEO_V4L2 && I2C 365 365 ---help--- 366 366 Support for the Philips SAA7191 video decoder. 367 367 ··· 756 756 757 757 config VIDEO_MXB 758 758 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" 759 - depends on PCI && VIDEO_V4L1 && I2C 759 + depends on PCI && VIDEO_V4L2 && I2C 760 760 select VIDEO_SAA7146_VV 761 761 select VIDEO_TUNER 762 762 select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
-2
drivers/media/video/Makefile
··· 160 160 obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o 161 161 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o 162 162 163 - obj-$(CONFIG_ARCH_DAVINCI) += davinci/ 164 - 165 163 obj-$(CONFIG_VIDEO_AU0828) += au0828/ 166 164 167 165 obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
+23 -15
drivers/media/video/davinci/vpfe_capture.c
··· 223 223 BUG_ON(!dev->hw_ops.get_frame_format); 224 224 BUG_ON(!dev->hw_ops.get_pixel_format); 225 225 BUG_ON(!dev->hw_ops.set_pixel_format); 226 - BUG_ON(!dev->hw_ops.set_params); 227 226 BUG_ON(!dev->hw_ops.set_image_window); 228 227 BUG_ON(!dev->hw_ops.get_image_window); 229 228 BUG_ON(!dev->hw_ops.get_line_length); ··· 1688 1689 struct vpfe_device *vpfe_dev = video_drvdata(file); 1689 1690 int ret = 0; 1690 1691 1691 - v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); 1692 + v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); 1692 1693 1693 1694 if (vpfe_dev->started) { 1694 1695 /* only allowed if streaming is not started */ 1695 - v4l2_err(&vpfe_dev->v4l2_dev, "device already started\n"); 1696 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1697 + "device already started\n"); 1696 1698 return -EBUSY; 1697 1699 } 1698 1700 ··· 1705 1705 case VPFE_CMD_S_CCDC_RAW_PARAMS: 1706 1706 v4l2_warn(&vpfe_dev->v4l2_dev, 1707 1707 "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); 1708 - ret = ccdc_dev->hw_ops.set_params(param); 1709 - if (ret) { 1710 - v4l2_err(&vpfe_dev->v4l2_dev, 1711 - "Error in setting parameters in CCDC\n"); 1712 - goto unlock_out; 1713 - } 1714 - if (vpfe_get_ccdc_image_format(vpfe_dev, &vpfe_dev->fmt) < 0) { 1715 - v4l2_err(&vpfe_dev->v4l2_dev, 1716 - "Invalid image format at CCDC\n"); 1717 - goto unlock_out; 1708 + if (ccdc_dev->hw_ops.set_params) { 1709 + ret = ccdc_dev->hw_ops.set_params(param); 1710 + if (ret) { 1711 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1712 + "Error setting parameters in CCDC\n"); 1713 + goto unlock_out; 1714 + } 1715 + if (vpfe_get_ccdc_image_format(vpfe_dev, 1716 + &vpfe_dev->fmt) < 0) { 1717 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1718 + "Invalid image format at CCDC\n"); 1719 + goto unlock_out; 1720 + } 1721 + } else { 1722 + ret = -EINVAL; 1723 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1724 + "VPFE_CMD_S_CCDC_RAW_PARAMS not supported\n"); 1718 1725 } 1719 1726 break; 1720 1727 default: ··· 1837 1830 if (NULL == ccdc_cfg) { 1838 1831 v4l2_err(pdev->dev.driver, 1839 1832 "Memory allocation failed for ccdc_cfg\n"); 1840 - goto probe_free_dev_mem; 1833 + goto probe_free_lock; 1841 1834 } 1842 1835 1843 1836 strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); ··· 1989 1982 probe_out_release_irq: 1990 1983 free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); 1991 1984 probe_free_ccdc_cfg_mem: 1992 - mutex_unlock(&ccdc_lock); 1993 1985 kfree(ccdc_cfg); 1986 + probe_free_lock: 1987 + mutex_unlock(&ccdc_lock); 1994 1988 probe_free_dev_mem: 1995 1989 kfree(vpfe_dev); 1996 1990 return ret;
+1 -1
drivers/media/video/gspca/sn9c20x.c
··· 1427 1427 struct gspca_dev *gspca_dev = (struct gspca_dev *)data; 1428 1428 struct sd *sd = (struct sd *) gspca_dev; 1429 1429 1430 - DECLARE_WAIT_QUEUE_HEAD(wait); 1430 + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait); 1431 1431 set_freezable(); 1432 1432 for (;;) { 1433 1433 if (kthread_should_stop())
-1
drivers/media/video/gspca/spca508.c
··· 1513 1513 static const __devinitdata struct usb_device_id device_table[] = { 1514 1514 {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, 1515 1515 {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, 1516 - {USB_DEVICE(0x0461, 0x0815), .driver_info = MicroInnovationIC200}, 1517 1516 {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, 1518 1517 {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, 1519 1518 {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2},
+1
drivers/media/video/gspca/spca561.c
··· 1053 1053 {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, 1054 1054 {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, 1055 1055 {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, 1056 + {USB_DEVICE(0x0461, 0x0815), .driver_info = Rev072A}, 1056 1057 {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, 1057 1058 {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, 1058 1059 {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A},
-2
drivers/media/video/gspca/stv06xx/stv06xx.c
··· 524 524 {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, 525 525 /* QuickCam Messenger (new) */ 526 526 {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, 527 - /* QuickCam Messenger (new) */ 528 - {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 }, 529 527 {} 530 528 }; 531 529 MODULE_DEVICE_TABLE(usb, device_table);
-3
drivers/media/video/hexium_gemini.c
··· 356 356 357 357 DEB_EE((".\n")); 358 358 359 - ret = saa7146_vv_devinit(dev); 360 - if (ret) 361 - return ret; 362 359 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 363 360 if (NULL == hexium) { 364 361 printk("hexium_gemini: not enough kernel memory in hexium_attach().\n");
-4
drivers/media/video/hexium_orion.c
··· 216 216 return -EFAULT; 217 217 } 218 218 219 - err = saa7146_vv_devinit(dev); 220 - if (err) 221 - return err; 222 - 223 219 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 224 220 if (NULL == hexium) { 225 221 printk("hexium_orion: hexium_probe: not enough kernel memory.\n");
+3 -5
drivers/media/video/mx1_camera.c
··· 49 49 /* 50 50 * CSI registers 51 51 */ 52 - #define DMA_CCR(x) (0x8c + ((x) << 6)) /* Control Registers */ 53 - #define DMA_DIMR 0x08 /* Interrupt mask Register */ 54 52 #define CSICR1 0x00 /* CSI Control Register 1 */ 55 53 #define CSISR 0x08 /* CSI Status Register */ 56 54 #define CSIRXR 0x10 /* CSI RxFIFO Register */ ··· 782 784 pcdev); 783 785 784 786 imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, 785 - IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0); 787 + IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0); 786 788 /* burst length : 16 words = 64 bytes */ 787 789 imx_dma_config_burstlen(pcdev->dma_chan, 0); 788 790 ··· 796 798 set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - 797 799 &mx1_camera_sof_fiq_start); 798 800 799 - regs.ARM_r8 = DMA_BASE + DMA_DIMR; 800 - regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan); 801 + regs.ARM_r8 = (long)MX1_DMA_DIMR; 802 + regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan); 801 803 regs.ARM_r10 = (long)pcdev->base + CSICR1; 802 804 regs.ARM_fp = (long)pcdev->base + CSISR; 803 805 regs.ARM_sp = 1 << pcdev->dma_chan;
+8 -9
drivers/media/video/mxb.c
··· 169 169 static int mxb_probe(struct saa7146_dev *dev) 170 170 { 171 171 struct mxb *mxb = NULL; 172 - int err; 173 172 174 - err = saa7146_vv_devinit(dev); 175 - if (err) 176 - return err; 177 173 mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); 178 174 if (mxb == NULL) { 179 175 DEB_D(("not enough kernel memory.\n")); ··· 695 699 /* this function only gets called when the probing was successful */ 696 700 static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) 697 701 { 698 - struct mxb *mxb = (struct mxb *)dev->ext_priv; 702 + struct mxb *mxb; 699 703 700 704 DEB_EE(("dev:%p\n", dev)); 701 705 702 - /* checking for i2c-devices can be omitted here, because we 703 - already did this in "mxb_vl42_probe" */ 704 - 705 706 saa7146_vv_init(dev, &vv_data); 707 + if (mxb_probe(dev)) { 708 + saa7146_vv_release(dev); 709 + return -1; 710 + } 711 + mxb = (struct mxb *)dev->ext_priv; 712 + 706 713 vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; 707 714 vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; 708 715 vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; ··· 725 726 vv_data.ops.vidioc_default = vidioc_default; 726 727 if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { 727 728 ERR(("cannot register capture v4l2 device. skipping.\n")); 729 + saa7146_vv_release(dev); 728 730 return -1; 729 731 } 730 732 ··· 846 846 .pci_tbl = &pci_tbl[0], 847 847 .module = THIS_MODULE, 848 848 849 - .probe = mxb_probe, 850 849 .attach = mxb_attach, 851 850 .detach = mxb_detach, 852 851
+1 -1
drivers/media/video/omap24xxcam.c
··· 1405 1405 } 1406 1406 1407 1407 size = 0; 1408 - for (i = first; i <= last; i++) { 1408 + for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) { 1409 1409 struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); 1410 1410 1411 1411 for (j = 0; j < dma->sglen; j++) {
+6 -5
drivers/media/video/pxa_camera.c
··· 609 609 */ 610 610 static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) 611 611 { 612 - unsigned long cicr0, cifr; 612 + unsigned long cicr0; 613 613 614 614 dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); 615 - /* Reset the FIFOs */ 616 - cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; 617 - __raw_writel(cifr, pcdev->base + CIFR); 618 615 /* Enable End-Of-Frame Interrupt */ 619 616 cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; 620 617 cicr0 &= ~CICR0_EOFM; ··· 932 935 static irqreturn_t pxa_camera_irq(int irq, void *data) 933 936 { 934 937 struct pxa_camera_dev *pcdev = data; 935 - unsigned long status, cicr0; 938 + unsigned long status, cifr, cicr0; 936 939 struct pxa_buffer *buf; 937 940 struct videobuf_buffer *vb; 938 941 ··· 946 949 __raw_writel(status, pcdev->base + CISR); 947 950 948 951 if (status & CISR_EOF) { 952 + /* Reset the FIFOs */ 953 + cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; 954 + __raw_writel(cifr, pcdev->base + CIFR); 955 + 949 956 pcdev->active = list_first_entry(&pcdev->capture, 950 957 struct pxa_buffer, vb.queue); 951 958 vb = &pcdev->active->vb;
+1 -1
drivers/media/video/sh_mobile_ceu_camera.c
··· 1633 1633 height = pix->height; 1634 1634 1635 1635 pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); 1636 - if (pix->bytesperline < 0) 1636 + if ((int)pix->bytesperline < 0) 1637 1637 return pix->bytesperline; 1638 1638 pix->sizeimage = height * pix->bytesperline; 1639 1639
-1
include/media/saa7146_vv.h
··· 188 188 void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, 189 189 struct saa7146_buf *buf); 190 190 191 - int saa7146_vv_devinit(struct saa7146_dev *dev); 192 191 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); 193 192 int saa7146_vv_release(struct saa7146_dev* dev); 194 193