Commit 8cad7f06 authored by Linus Torvalds's avatar Linus Torvalds

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

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] gspca - sonixj: Better handling of the bridge registers 0x01 and 0x17
  [media] gspca - sonixj: Add the bit definitions of the bridge reg 0x01 and 0x17
  [media] gspca - sonixj: Set the flag for some devices
  [media] gspca - sonixj: Add a flag in the driver_info table
  [media] gspca - sonixj: Fix a bad probe exchange
  [media] gspca - sonixj: Move bridge init to sd start
  [media] bttv: remove unneeded locking comments
  [media] bttv: fix mutex use before init (BZ#24602)
  [media] Don't export format_by_forcc on two different drivers
parents 92d7c9b2 0e4d413a
...@@ -558,7 +558,7 @@ static void saa7146_set_window(struct saa7146_dev *dev, int width, int height, e ...@@ -558,7 +558,7 @@ static void saa7146_set_window(struct saa7146_dev *dev, int width, int height, e
static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field, u32 pixelformat) static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field, u32 pixelformat)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
struct saa7146_format *sfmt = format_by_fourcc(dev, pixelformat); struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev, pixelformat);
int b_depth = vv->ov_fmt->depth; int b_depth = vv->ov_fmt->depth;
int b_bpl = vv->ov_fb.fmt.bytesperline; int b_bpl = vv->ov_fb.fmt.bytesperline;
...@@ -702,7 +702,7 @@ static int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa71 ...@@ -702,7 +702,7 @@ static int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa71
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
struct saa7146_video_dma vdma1; struct saa7146_video_dma vdma1;
struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat);
int width = buf->fmt->width; int width = buf->fmt->width;
int height = buf->fmt->height; int height = buf->fmt->height;
...@@ -827,7 +827,7 @@ static int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa71 ...@@ -827,7 +827,7 @@ static int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa71
struct saa7146_video_dma vdma2; struct saa7146_video_dma vdma2;
struct saa7146_video_dma vdma3; struct saa7146_video_dma vdma3;
struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat);
int width = buf->fmt->width; int width = buf->fmt->width;
int height = buf->fmt->height; int height = buf->fmt->height;
...@@ -994,7 +994,7 @@ static void program_capture_engine(struct saa7146_dev *dev, int planar) ...@@ -994,7 +994,7 @@ static void program_capture_engine(struct saa7146_dev *dev, int planar)
void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next) void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next)
{ {
struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat);
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
u32 vdma1_prot_addr; u32 vdma1_prot_addr;
......
...@@ -84,7 +84,7 @@ static struct saa7146_format formats[] = { ...@@ -84,7 +84,7 @@ static struct saa7146_format formats[] = {
static int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format); static int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format);
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc) struct saa7146_format* saa7146_format_by_fourcc(struct saa7146_dev *dev, int fourcc)
{ {
int i, j = NUM_FORMATS; int i, j = NUM_FORMATS;
...@@ -266,7 +266,7 @@ static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *bu ...@@ -266,7 +266,7 @@ static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *bu
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
struct scatterlist *list = dma->sglist; struct scatterlist *list = dma->sglist;
int length = dma->sglen; int length = dma->sglen;
struct saa7146_format *sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); struct saa7146_format *sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat);
DEB_EE(("dev:%p, buf:%p, sg_len:%d\n",dev,buf,length)); DEB_EE(("dev:%p, buf:%p, sg_len:%d\n",dev,buf,length));
...@@ -408,7 +408,7 @@ static int video_begin(struct saa7146_fh *fh) ...@@ -408,7 +408,7 @@ static int video_begin(struct saa7146_fh *fh)
} }
} }
fmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); fmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat);
/* we need to have a valid format set here */ /* we need to have a valid format set here */
BUG_ON(NULL == fmt); BUG_ON(NULL == fmt);
...@@ -460,7 +460,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file) ...@@ -460,7 +460,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
return -EBUSY; return -EBUSY;
} }
fmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); fmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat);
/* we need to have a valid format set here */ /* we need to have a valid format set here */
BUG_ON(NULL == fmt); BUG_ON(NULL == fmt);
...@@ -536,7 +536,7 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f ...@@ -536,7 +536,7 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f
return -EPERM; return -EPERM;
/* check args */ /* check args */
fmt = format_by_fourcc(dev, fb->fmt.pixelformat); fmt = saa7146_format_by_fourcc(dev, fb->fmt.pixelformat);
if (NULL == fmt) if (NULL == fmt)
return -EINVAL; return -EINVAL;
...@@ -760,7 +760,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_forma ...@@ -760,7 +760,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_forma
DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: dev:%p, fh:%p\n", dev, fh)); DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: dev:%p, fh:%p\n", dev, fh));
fmt = format_by_fourcc(dev, f->fmt.pix.pixelformat); fmt = saa7146_format_by_fourcc(dev, f->fmt.pix.pixelformat);
if (NULL == fmt) if (NULL == fmt)
return -EINVAL; return -EINVAL;
...@@ -1264,7 +1264,7 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -1264,7 +1264,7 @@ static int buffer_prepare(struct videobuf_queue *q,
buf->fmt = &fh->video_fmt; buf->fmt = &fh->video_fmt;
buf->vb.field = fh->video_fmt.field; buf->vb.field = fh->video_fmt.field;
sfmt = format_by_fourcc(dev,buf->fmt->pixelformat); sfmt = saa7146_format_by_fourcc(dev,buf->fmt->pixelformat);
release_all_pagetables(dev, buf); release_all_pagetables(dev, buf);
if( 0 != IS_PLANAR(sfmt->trans)) { if( 0 != IS_PLANAR(sfmt->trans)) {
...@@ -1378,7 +1378,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file) ...@@ -1378,7 +1378,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
fh->video_fmt.pixelformat = V4L2_PIX_FMT_BGR24; fh->video_fmt.pixelformat = V4L2_PIX_FMT_BGR24;
fh->video_fmt.bytesperline = 0; fh->video_fmt.bytesperline = 0;
fh->video_fmt.field = V4L2_FIELD_ANY; fh->video_fmt.field = V4L2_FIELD_ANY;
sfmt = format_by_fourcc(dev,fh->video_fmt.pixelformat); sfmt = saa7146_format_by_fourcc(dev,fh->video_fmt.pixelformat);
fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8; fh->video_fmt.sizeimage = (fh->video_fmt.width * fh->video_fmt.height * sfmt->depth)/8;
videobuf_queue_sg_init(&fh->video_q, &video_qops, videobuf_queue_sg_init(&fh->video_q, &video_qops,
......
This diff is collapsed.
This diff is collapsed.
...@@ -92,7 +92,7 @@ int cx25821_get_format_size(void) ...@@ -92,7 +92,7 @@ int cx25821_get_format_size(void)
return ARRAY_SIZE(formats); return ARRAY_SIZE(formats);
} }
struct cx25821_fmt *format_by_fourcc(unsigned int fourcc) struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc)
{ {
unsigned int i; unsigned int i;
...@@ -848,7 +848,7 @@ static int video_open(struct file *file) ...@@ -848,7 +848,7 @@ static int video_open(struct file *file)
pix_format = pix_format =
(dev->channels[ch_id].pixel_formats == (dev->channels[ch_id].pixel_formats ==
PIXEL_FRMT_411) ? V4L2_PIX_FMT_Y41P : V4L2_PIX_FMT_YUYV; PIXEL_FRMT_411) ? V4L2_PIX_FMT_Y41P : V4L2_PIX_FMT_YUYV;
fh->fmt = format_by_fourcc(pix_format); fh->fmt = cx25821_format_by_fourcc(pix_format);
v4l2_prio_open(&dev->channels[ch_id].prio, &fh->prio); v4l2_prio_open(&dev->channels[ch_id].prio, &fh->prio);
...@@ -1010,7 +1010,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -1010,7 +1010,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
if (0 != err) if (0 != err)
return err; return err;
fh->fmt = format_by_fourcc(f->fmt.pix.pixelformat); fh->fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat);
fh->vidq.field = f->fmt.pix.field; fh->vidq.field = f->fmt.pix.field;
/* check if width and height is valid based on set standard */ /* check if width and height is valid based on set standard */
...@@ -1119,7 +1119,7 @@ int cx25821_vidioc_try_fmt_vid_cap(struct file *file, void *priv, struct v4l2_fo ...@@ -1119,7 +1119,7 @@ int cx25821_vidioc_try_fmt_vid_cap(struct file *file, void *priv, struct v4l2_fo
enum v4l2_field field; enum v4l2_field field;
unsigned int maxw, maxh; unsigned int maxw, maxh;
fmt = format_by_fourcc(f->fmt.pix.pixelformat); fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat);
if (NULL == fmt) if (NULL == fmt)
return -EINVAL; return -EINVAL;
......
...@@ -87,7 +87,7 @@ extern unsigned int vid_limit; ...@@ -87,7 +87,7 @@ extern unsigned int vid_limit;
#define FORMAT_FLAGS_PACKED 0x01 #define FORMAT_FLAGS_PACKED 0x01
extern struct cx25821_fmt formats[]; extern struct cx25821_fmt formats[];
extern struct cx25821_fmt *format_by_fourcc(unsigned int fourcc); extern struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc);
extern struct cx25821_data timeout_data[MAX_VID_CHANNEL_NUM]; extern struct cx25821_data timeout_data[MAX_VID_CHANNEL_NUM];
extern void cx25821_dump_video_queue(struct cx25821_dev *dev, extern void cx25821_dump_video_queue(struct cx25821_dev *dev,
......
...@@ -161,7 +161,7 @@ extern struct list_head saa7146_devices; ...@@ -161,7 +161,7 @@ extern struct list_head saa7146_devices;
extern struct mutex saa7146_devices_lock; extern struct mutex saa7146_devices_lock;
int saa7146_register_extension(struct saa7146_extension*); int saa7146_register_extension(struct saa7146_extension*);
int saa7146_unregister_extension(struct saa7146_extension*); int saa7146_unregister_extension(struct saa7146_extension*);
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); struct saa7146_format* saa7146_format_by_fourcc(struct saa7146_dev *dev, int fourcc);
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt);
void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt);
int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length ); int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment