mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
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
This commit is contained in:
commit
417a9ef1f4
@ -589,3 +589,26 @@ Why: Useful in 2003, implementation is a hack.
|
||||
Generally invoked by accident today.
|
||||
Seen as doing more harm than good.
|
||||
Who: Len Brown <len.brown@intel.com>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: video4linux /dev/vtx teletext API support
|
||||
When: 2.6.35
|
||||
Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c
|
||||
include/linux/videotext.h
|
||||
Why: The vtx device nodes have been superseded by vbi device nodes
|
||||
for many years. No applications exist that use the vtx support.
|
||||
Of the two i2c drivers that actually support this API the saa5249
|
||||
has been impossible to use for a year now and no known hardware
|
||||
that supports this device exists. The saa5246a is theoretically
|
||||
supported by the old mxb boards, but it never actually worked.
|
||||
|
||||
In summary: there is no hardware that can use this API and there
|
||||
are no applications actually implementing this API.
|
||||
|
||||
The vtx support still reserves minors 192-223 and we would really
|
||||
like to reuse those for upcoming new functionality. In the unlikely
|
||||
event that new hardware appears that wants to use the functionality
|
||||
provided by the vtx API, then that functionality should be build
|
||||
around the sliced VBI API instead.
|
||||
Who: Hans Verkuil <hverkuil@xs4all.nl>
|
||||
|
@ -31,7 +31,13 @@
|
||||
#define DMA_MODE_WRITE 1
|
||||
#define DMA_MODE_MASK 1
|
||||
|
||||
#define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR)
|
||||
#define MX1_DMA_REG(offset) MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR + (offset))
|
||||
|
||||
/* DMA Interrupt Mask Register */
|
||||
#define MX1_DMA_DIMR MX1_DMA_REG(0x08)
|
||||
|
||||
/* Channel Control Register */
|
||||
#define MX1_DMA_CCR(x) MX1_DMA_REG(0x8c + ((x) << 6))
|
||||
|
||||
#define IMX_DMA_MEMSIZE_32 (0 << 4)
|
||||
#define IMX_DMA_MEMSIZE_8 (1 << 4)
|
||||
|
@ -423,15 +423,14 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status)
|
||||
}
|
||||
}
|
||||
|
||||
int saa7146_vv_devinit(struct saa7146_dev *dev)
|
||||
{
|
||||
return v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(saa7146_vv_devinit);
|
||||
|
||||
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||
{
|
||||
struct saa7146_vv *vv;
|
||||
int err;
|
||||
|
||||
err = v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL);
|
||||
if (vv == NULL) {
|
||||
|
@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f
|
||||
/* ok, accept it */
|
||||
vv->ov_fb = *fb;
|
||||
vv->ov_fmt = fmt;
|
||||
if (0 == vv->ov_fb.fmt.bytesperline)
|
||||
vv->ov_fb.fmt.bytesperline =
|
||||
vv->ov_fb.fmt.width * fmt->depth / 8;
|
||||
|
||||
if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) {
|
||||
vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8;
|
||||
DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline));
|
||||
}
|
||||
|
||||
mutex_unlock(&dev->lock);
|
||||
return 0;
|
||||
|
@ -4470,6 +4470,10 @@ static int stv090x_setup(struct dvb_frontend *fe)
|
||||
if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0)
|
||||
goto err;
|
||||
|
||||
/* workaround for stuck DiSEqC output */
|
||||
if (config->diseqc_envelope_mode)
|
||||
stv090x_send_diseqc_burst(fe, SEC_MINI_A);
|
||||
|
||||
return 0;
|
||||
err:
|
||||
dprintk(FE_ERROR, 1, "I/O error");
|
||||
|
@ -643,9 +643,6 @@ static void frontend_init(struct budget *budget)
|
||||
&budget->i2c_adap,
|
||||
&tt1600_isl6423_config);
|
||||
|
||||
} else {
|
||||
dvb_frontend_detach(budget->dvb_frontend);
|
||||
budget->dvb_frontend = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -361,7 +361,7 @@ config VIDEO_SAA717X
|
||||
|
||||
config VIDEO_SAA7191
|
||||
tristate "Philips SAA7191 video decoder"
|
||||
depends on VIDEO_V4L1 && I2C
|
||||
depends on VIDEO_V4L2 && I2C
|
||||
---help---
|
||||
Support for the Philips SAA7191 video decoder.
|
||||
|
||||
@ -756,7 +756,7 @@ source "drivers/media/video/saa7134/Kconfig"
|
||||
|
||||
config VIDEO_MXB
|
||||
tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
|
||||
depends on PCI && VIDEO_V4L1 && I2C
|
||||
depends on PCI && VIDEO_V4L2 && I2C
|
||||
select VIDEO_SAA7146_VV
|
||||
select VIDEO_TUNER
|
||||
select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
|
||||
|
@ -160,8 +160,6 @@ obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o
|
||||
obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
|
||||
obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o
|
||||
|
||||
obj-$(CONFIG_ARCH_DAVINCI) += davinci/
|
||||
|
||||
obj-$(CONFIG_VIDEO_AU0828) += au0828/
|
||||
|
||||
obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
|
||||
|
@ -223,7 +223,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev)
|
||||
BUG_ON(!dev->hw_ops.get_frame_format);
|
||||
BUG_ON(!dev->hw_ops.get_pixel_format);
|
||||
BUG_ON(!dev->hw_ops.set_pixel_format);
|
||||
BUG_ON(!dev->hw_ops.set_params);
|
||||
BUG_ON(!dev->hw_ops.set_image_window);
|
||||
BUG_ON(!dev->hw_ops.get_image_window);
|
||||
BUG_ON(!dev->hw_ops.get_line_length);
|
||||
@ -1689,11 +1688,12 @@ static long vpfe_param_handler(struct file *file, void *priv,
|
||||
struct vpfe_device *vpfe_dev = video_drvdata(file);
|
||||
int ret = 0;
|
||||
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n");
|
||||
v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n");
|
||||
|
||||
if (vpfe_dev->started) {
|
||||
/* only allowed if streaming is not started */
|
||||
v4l2_err(&vpfe_dev->v4l2_dev, "device already started\n");
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
|
||||
"device already started\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
@ -1705,16 +1705,23 @@ static long vpfe_param_handler(struct file *file, void *priv,
|
||||
case VPFE_CMD_S_CCDC_RAW_PARAMS:
|
||||
v4l2_warn(&vpfe_dev->v4l2_dev,
|
||||
"VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n");
|
||||
ret = ccdc_dev->hw_ops.set_params(param);
|
||||
if (ret) {
|
||||
v4l2_err(&vpfe_dev->v4l2_dev,
|
||||
"Error in setting parameters in CCDC\n");
|
||||
goto unlock_out;
|
||||
}
|
||||
if (vpfe_get_ccdc_image_format(vpfe_dev, &vpfe_dev->fmt) < 0) {
|
||||
v4l2_err(&vpfe_dev->v4l2_dev,
|
||||
"Invalid image format at CCDC\n");
|
||||
goto unlock_out;
|
||||
if (ccdc_dev->hw_ops.set_params) {
|
||||
ret = ccdc_dev->hw_ops.set_params(param);
|
||||
if (ret) {
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
|
||||
"Error setting parameters in CCDC\n");
|
||||
goto unlock_out;
|
||||
}
|
||||
if (vpfe_get_ccdc_image_format(vpfe_dev,
|
||||
&vpfe_dev->fmt) < 0) {
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
|
||||
"Invalid image format at CCDC\n");
|
||||
goto unlock_out;
|
||||
}
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
|
||||
"VPFE_CMD_S_CCDC_RAW_PARAMS not supported\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -1830,7 +1837,7 @@ static __init int vpfe_probe(struct platform_device *pdev)
|
||||
if (NULL == ccdc_cfg) {
|
||||
v4l2_err(pdev->dev.driver,
|
||||
"Memory allocation failed for ccdc_cfg\n");
|
||||
goto probe_free_dev_mem;
|
||||
goto probe_free_lock;
|
||||
}
|
||||
|
||||
strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32);
|
||||
@ -1982,8 +1989,9 @@ probe_out_video_release:
|
||||
probe_out_release_irq:
|
||||
free_irq(vpfe_dev->ccdc_irq0, vpfe_dev);
|
||||
probe_free_ccdc_cfg_mem:
|
||||
mutex_unlock(&ccdc_lock);
|
||||
kfree(ccdc_cfg);
|
||||
probe_free_lock:
|
||||
mutex_unlock(&ccdc_lock);
|
||||
probe_free_dev_mem:
|
||||
kfree(vpfe_dev);
|
||||
return ret;
|
||||
|
@ -1427,7 +1427,7 @@ static int input_kthread(void *data)
|
||||
struct gspca_dev *gspca_dev = (struct gspca_dev *)data;
|
||||
struct sd *sd = (struct sd *) gspca_dev;
|
||||
|
||||
DECLARE_WAIT_QUEUE_HEAD(wait);
|
||||
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait);
|
||||
set_freezable();
|
||||
for (;;) {
|
||||
if (kthread_should_stop())
|
||||
|
@ -1513,7 +1513,6 @@ static const struct sd_desc sd_desc = {
|
||||
static const __devinitdata struct usb_device_id device_table[] = {
|
||||
{USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam},
|
||||
{USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista},
|
||||
{USB_DEVICE(0x0461, 0x0815), .driver_info = MicroInnovationIC200},
|
||||
{USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110},
|
||||
{USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam},
|
||||
{USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2},
|
||||
|
@ -1053,6 +1053,7 @@ static const __devinitdata struct usb_device_id device_table[] = {
|
||||
{USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A},
|
||||
{USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A},
|
||||
{USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A},
|
||||
{USB_DEVICE(0x0461, 0x0815), .driver_info = Rev072A},
|
||||
{USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A},
|
||||
{USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A},
|
||||
{USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A},
|
||||
|
@ -524,8 +524,6 @@ static const __devinitdata struct usb_device_id device_table[] = {
|
||||
{USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 },
|
||||
/* QuickCam Messenger (new) */
|
||||
{USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 },
|
||||
/* QuickCam Messenger (new) */
|
||||
{USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, device_table);
|
||||
|
@ -356,9 +356,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
|
||||
|
||||
DEB_EE((".\n"));
|
||||
|
||||
ret = saa7146_vv_devinit(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
|
||||
if (NULL == hexium) {
|
||||
printk("hexium_gemini: not enough kernel memory in hexium_attach().\n");
|
||||
|
@ -216,10 +216,6 @@ static int hexium_probe(struct saa7146_dev *dev)
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
err = saa7146_vv_devinit(dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL);
|
||||
if (NULL == hexium) {
|
||||
printk("hexium_orion: hexium_probe: not enough kernel memory.\n");
|
||||
|
@ -49,8 +49,6 @@
|
||||
/*
|
||||
* CSI registers
|
||||
*/
|
||||
#define DMA_CCR(x) (0x8c + ((x) << 6)) /* Control Registers */
|
||||
#define DMA_DIMR 0x08 /* Interrupt mask Register */
|
||||
#define CSICR1 0x00 /* CSI Control Register 1 */
|
||||
#define CSISR 0x08 /* CSI Status Register */
|
||||
#define CSIRXR 0x10 /* CSI RxFIFO Register */
|
||||
@ -784,7 +782,7 @@ static int __init mx1_camera_probe(struct platform_device *pdev)
|
||||
pcdev);
|
||||
|
||||
imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO,
|
||||
IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0);
|
||||
IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0);
|
||||
/* burst length : 16 words = 64 bytes */
|
||||
imx_dma_config_burstlen(pcdev->dma_chan, 0);
|
||||
|
||||
@ -798,8 +796,8 @@ static int __init mx1_camera_probe(struct platform_device *pdev)
|
||||
set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end -
|
||||
&mx1_camera_sof_fiq_start);
|
||||
|
||||
regs.ARM_r8 = DMA_BASE + DMA_DIMR;
|
||||
regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan);
|
||||
regs.ARM_r8 = (long)MX1_DMA_DIMR;
|
||||
regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan);
|
||||
regs.ARM_r10 = (long)pcdev->base + CSICR1;
|
||||
regs.ARM_fp = (long)pcdev->base + CSISR;
|
||||
regs.ARM_sp = 1 << pcdev->dma_chan;
|
||||
|
@ -169,11 +169,7 @@ static struct saa7146_extension extension;
|
||||
static int mxb_probe(struct saa7146_dev *dev)
|
||||
{
|
||||
struct mxb *mxb = NULL;
|
||||
int err;
|
||||
|
||||
err = saa7146_vv_devinit(dev);
|
||||
if (err)
|
||||
return err;
|
||||
mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL);
|
||||
if (mxb == NULL) {
|
||||
DEB_D(("not enough kernel memory.\n"));
|
||||
@ -699,14 +695,17 @@ static struct saa7146_ext_vv vv_data;
|
||||
/* this function only gets called when the probing was successful */
|
||||
static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
|
||||
{
|
||||
struct mxb *mxb = (struct mxb *)dev->ext_priv;
|
||||
struct mxb *mxb;
|
||||
|
||||
DEB_EE(("dev:%p\n", dev));
|
||||
|
||||
/* checking for i2c-devices can be omitted here, because we
|
||||
already did this in "mxb_vl42_probe" */
|
||||
|
||||
saa7146_vv_init(dev, &vv_data);
|
||||
if (mxb_probe(dev)) {
|
||||
saa7146_vv_release(dev);
|
||||
return -1;
|
||||
}
|
||||
mxb = (struct mxb *)dev->ext_priv;
|
||||
|
||||
vv_data.ops.vidioc_queryctrl = vidioc_queryctrl;
|
||||
vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl;
|
||||
vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl;
|
||||
@ -726,6 +725,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data
|
||||
vv_data.ops.vidioc_default = vidioc_default;
|
||||
if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
|
||||
ERR(("cannot register capture v4l2 device. skipping.\n"));
|
||||
saa7146_vv_release(dev);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -846,7 +846,6 @@ static struct saa7146_extension extension = {
|
||||
.pci_tbl = &pci_tbl[0],
|
||||
.module = THIS_MODULE,
|
||||
|
||||
.probe = mxb_probe,
|
||||
.attach = mxb_attach,
|
||||
.detach = mxb_detach,
|
||||
|
||||
|
@ -1405,7 +1405,7 @@ static int omap24xxcam_mmap_buffers(struct file *file,
|
||||
}
|
||||
|
||||
size = 0;
|
||||
for (i = first; i <= last; i++) {
|
||||
for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) {
|
||||
struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]);
|
||||
|
||||
for (j = 0; j < dma->sglen; j++) {
|
||||
|
@ -609,12 +609,9 @@ static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev,
|
||||
*/
|
||||
static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev)
|
||||
{
|
||||
unsigned long cicr0, cifr;
|
||||
unsigned long cicr0;
|
||||
|
||||
dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__);
|
||||
/* Reset the FIFOs */
|
||||
cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
|
||||
__raw_writel(cifr, pcdev->base + CIFR);
|
||||
/* Enable End-Of-Frame Interrupt */
|
||||
cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB;
|
||||
cicr0 &= ~CICR0_EOFM;
|
||||
@ -935,7 +932,7 @@ static void pxa_camera_deactivate(struct pxa_camera_dev *pcdev)
|
||||
static irqreturn_t pxa_camera_irq(int irq, void *data)
|
||||
{
|
||||
struct pxa_camera_dev *pcdev = data;
|
||||
unsigned long status, cicr0;
|
||||
unsigned long status, cifr, cicr0;
|
||||
struct pxa_buffer *buf;
|
||||
struct videobuf_buffer *vb;
|
||||
|
||||
@ -949,6 +946,10 @@ static irqreturn_t pxa_camera_irq(int irq, void *data)
|
||||
__raw_writel(status, pcdev->base + CISR);
|
||||
|
||||
if (status & CISR_EOF) {
|
||||
/* Reset the FIFOs */
|
||||
cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F;
|
||||
__raw_writel(cifr, pcdev->base + CIFR);
|
||||
|
||||
pcdev->active = list_first_entry(&pcdev->capture,
|
||||
struct pxa_buffer, vb.queue);
|
||||
vb = &pcdev->active->vb;
|
||||
|
@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
|
||||
height = pix->height;
|
||||
|
||||
pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt);
|
||||
if (pix->bytesperline < 0)
|
||||
if ((int)pix->bytesperline < 0)
|
||||
return pix->bytesperline;
|
||||
pix->sizeimage = height * pix->bytesperline;
|
||||
|
||||
|
@ -188,7 +188,6 @@ void saa7146_buffer_timeout(unsigned long data);
|
||||
void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q,
|
||||
struct saa7146_buf *buf);
|
||||
|
||||
int saa7146_vv_devinit(struct saa7146_dev *dev);
|
||||
int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
|
||||
int saa7146_vv_release(struct saa7146_dev* dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user