]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.36 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 19:33:48 +0000 (11:33 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 19:33:48 +0000 (11:33 -0800)
queue-2.6.36/don-t-export-format_by_forcc-on-two-different-drivers.patch [new file with mode: 0644]
queue-2.6.36/gspca-sonixj-add-a-flag-in-the-driver_info-table.patch [new file with mode: 0644]
queue-2.6.36/gspca-sonixj-set-the-flag-for-some-devices.patch [new file with mode: 0644]

diff --git a/queue-2.6.36/don-t-export-format_by_forcc-on-two-different-drivers.patch b/queue-2.6.36/don-t-export-format_by_forcc-on-two-different-drivers.patch
new file mode 100644 (file)
index 0000000..bba4e0e
--- /dev/null
@@ -0,0 +1,205 @@
+From a757ee2216211278680dd8ac869aabe7b4a9970d Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab@redhat.com>
+Date: Thu, 2 Dec 2010 01:57:03 -0200
+Subject: [media] Don't export format_by_forcc on two different drivers
+
+From: Mauro Carvalho Chehab <mchehab@redhat.com>
+
+commit a757ee2216211278680dd8ac869aabe7b4a9970d upstream.
+
+Drivers should append their name on exported symbols, to avoid
+conflicts with allyesconfig:
+
+drivers/staging/built-in.o: In function `format_by_fourcc':
+/home/v4l/work_trees/linus/drivers/staging/cx25821/cx25821-video.c:96: multiple definition of `format_by_fourcc'
+drivers/media/built-in.o:/home/v4l/work_trees/linus/drivers/media/common/saa7146_video.c:88: first defined here
+
+Let's rename both occurences with a small shellscript:
+
+for i in drivers/staging/cx25821/*.[ch]; do sed s,format_by_fourcc,cx25821_format_by_fourcc,g <$i >a && mv a $i; done
+for i in drivers/media/common/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done
+for i in include/media/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done
+
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/common/saa7146_hlp.c      |    8 ++++----
+ drivers/media/common/saa7146_video.c    |   16 ++++++++--------
+ drivers/staging/cx25821/cx25821-video.c |    8 ++++----
+ drivers/staging/cx25821/cx25821-video.h |    2 +-
+ include/media/saa7146.h                 |    2 +-
+ 5 files changed, 18 insertions(+), 18 deletions(-)
+
+--- a/drivers/media/common/saa7146_hlp.c
++++ b/drivers/media/common/saa7146_hlp.c
+@@ -558,7 +558,7 @@ static void saa7146_set_window(struct sa
+ 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_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_bpl = vv->ov_fb.fmt.bytesperline;
+@@ -702,7 +702,7 @@ static int calculate_video_dma_grab_pack
+       struct saa7146_vv *vv = dev->vv_data;
+       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 height = buf->fmt->height;
+@@ -827,7 +827,7 @@ static int calculate_video_dma_grab_plan
+       struct saa7146_video_dma vdma2;
+       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 height = buf->fmt->height;
+@@ -994,7 +994,7 @@ static void program_capture_engine(struc
+ 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;
+       u32 vdma1_prot_addr;
+--- a/drivers/media/common/saa7146_video.c
++++ b/drivers/media/common/saa7146_video.c
+@@ -84,7 +84,7 @@ static struct saa7146_format formats[] =
+ 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;
+@@ -266,7 +266,7 @@ static int saa7146_pgtable_build(struct
+       struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
+       struct scatterlist *list = dma->sglist;
+       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));
+@@ -408,7 +408,7 @@ static int video_begin(struct saa7146_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 */
+       BUG_ON(NULL == fmt);
+@@ -460,7 +460,7 @@ static int video_end(struct saa7146_fh *
+               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 */
+       BUG_ON(NULL == fmt);
+@@ -536,7 +536,7 @@ static int vidioc_s_fbuf(struct file *fi
+               return -EPERM;
+       /* check args */
+-      fmt = format_by_fourcc(dev, fb->fmt.pixelformat);
++      fmt = saa7146_format_by_fourcc(dev, fb->fmt.pixelformat);
+       if (NULL == fmt)
+               return -EINVAL;
+@@ -760,7 +760,7 @@ static int vidioc_try_fmt_vid_cap(struct
+       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)
+               return -EINVAL;
+@@ -1264,7 +1264,7 @@ static int buffer_prepare(struct videobu
+               buf->fmt       = &fh->video_fmt;
+               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);
+               if( 0 != IS_PLANAR(sfmt->trans)) {
+@@ -1378,7 +1378,7 @@ static int video_open(struct saa7146_dev
+       fh->video_fmt.pixelformat = V4L2_PIX_FMT_BGR24;
+       fh->video_fmt.bytesperline = 0;
+       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;
+       videobuf_queue_sg_init(&fh->video_q, &video_qops,
+--- a/drivers/staging/cx25821/cx25821-video.c
++++ b/drivers/staging/cx25821/cx25821-video.c
+@@ -92,7 +92,7 @@ int cx25821_get_format_size(void)
+       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;
+@@ -848,7 +848,7 @@ static int video_open(struct file *file)
+        pix_format =
+          (dev->channels[ch_id].pixel_formats ==
+           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);
+@@ -1009,7 +1009,7 @@ static int vidioc_s_fmt_vid_cap(struct f
+        if (0 != 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;
+        /* check if width and height is valid based on set standard */
+@@ -1117,7 +1117,7 @@ int cx25821_vidioc_try_fmt_vid_cap(struc
+       enum v4l2_field field;
+       unsigned int maxw, maxh;
+-      fmt = format_by_fourcc(f->fmt.pix.pixelformat);
++      fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat);
+       if (NULL == fmt)
+               return -EINVAL;
+--- a/drivers/staging/cx25821/cx25821-video.h
++++ b/drivers/staging/cx25821/cx25821-video.h
+@@ -87,7 +87,7 @@ extern unsigned int vid_limit;
+ #define FORMAT_FLAGS_PACKED       0x01
+ 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 void cx25821_dump_video_queue(struct cx25821_dev *dev,
+--- a/include/media/saa7146.h
++++ b/include/media/saa7146.h
+@@ -161,7 +161,7 @@ extern struct list_head saa7146_devices;
+ extern struct mutex saa7146_devices_lock;
+ int saa7146_register_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);
+ 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 );
diff --git a/queue-2.6.36/gspca-sonixj-add-a-flag-in-the-driver_info-table.patch b/queue-2.6.36/gspca-sonixj-add-a-flag-in-the-driver_info-table.patch
new file mode 100644 (file)
index 0000000..2b20322
--- /dev/null
@@ -0,0 +1,53 @@
+From c6c14330717f9850b4b4c054b81424b9979cd07d Mon Sep 17 00:00:00 2001
+From: Jean-Francois Moine <moinejf@free.fr>
+Date: Tue, 14 Dec 2010 16:15:37 -0300
+Subject: [media] gspca - sonixj: Add a flag in the driver_info table
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jean-Francois Moine <moinejf@free.fr>
+
+commit c6c14330717f9850b4b4c054b81424b9979cd07d upstream.
+
+Signed-off-by: Jean-François Moine <moinejf@free.fr>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/gspca/sonixj.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/video/gspca/sonixj.c
++++ b/drivers/media/video/gspca/sonixj.c
+@@ -56,6 +56,7 @@ struct sd {
+       u8 jpegqual;                    /* webcam quality */
+       u8 reg18;
++      u8 flags;
+       s8 ag_cnt;
+ #define AG_CNT_START 13
+@@ -1780,7 +1781,8 @@ static int sd_config(struct gspca_dev *g
+       struct cam *cam;
+       sd->bridge = id->driver_info >> 16;
+-      sd->sensor = id->driver_info;
++      sd->sensor = id->driver_info >> 8;
++      sd->flags = id->driver_info;
+       cam = &gspca_dev->cam;
+       if (sd->sensor == SENSOR_ADCM1700) {
+@@ -2987,7 +2989,11 @@ static const struct sd_desc sd_desc = {
+ /* -- module initialisation -- */
+ #define BS(bridge, sensor) \
+       .driver_info = (BRIDGE_ ## bridge << 16) \
+-                      | SENSOR_ ## sensor
++                      | (SENSOR_ ## sensor << 8)
++#define BSF(bridge, sensor, flags) \
++      .driver_info = (BRIDGE_ ## bridge << 16) \
++                      | (SENSOR_ ## sensor << 8) \
++                      | (flags)
+ static const __devinitdata struct usb_device_id device_table[] = {
+ #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
+       {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)},
diff --git a/queue-2.6.36/gspca-sonixj-set-the-flag-for-some-devices.patch b/queue-2.6.36/gspca-sonixj-set-the-flag-for-some-devices.patch
new file mode 100644 (file)
index 0000000..baa0950
--- /dev/null
@@ -0,0 +1,47 @@
+From b2272a49e7df37732d73988f00468ce31e1ebc92 Mon Sep 17 00:00:00 2001
+From: Jean-Francois Moine <moinejf@free.fr>
+Date: Tue, 14 Dec 2010 16:16:16 -0300
+Subject: [media] gspca - sonixj: Set the flag for some devices
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jean-Francois Moine <moinejf@free.fr>
+
+commit b2272a49e7df37732d73988f00468ce31e1ebc92 upstream.
+
+The flag PDN_INV indicates that the sensor pin S_PWR_DN has not the same
+value as other webcams with the same sensor. For now, only two webcams have
+been so detected: the Microsoft's VX1000 and VX3000.
+
+Signed-off-by: Jean-François Moine <moinejf@free.fr>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/gspca/sonixj.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/video/gspca/sonixj.c
++++ b/drivers/media/video/gspca/sonixj.c
+@@ -87,6 +87,9 @@ enum sensors {
+       SENSOR_SP80708,
+ };
++/* device flags */
++#define PDN_INV       1               /* inverse pin S_PWR_DN / sn_xxx tables */
++
+ /* V4L2 controls supported by the driver */
+ static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
+ static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
+@@ -2990,8 +2993,8 @@ static const __devinitdata struct usb_de
+       {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)},
+       {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)},
+ #endif
+-      {USB_DEVICE(0x045e, 0x00f5), BS(SN9C105, OV7660)},
+-      {USB_DEVICE(0x045e, 0x00f7), BS(SN9C105, OV7660)},
++      {USB_DEVICE(0x045e, 0x00f5), BSF(SN9C105, OV7660, PDN_INV)},
++      {USB_DEVICE(0x045e, 0x00f7), BSF(SN9C105, OV7660, PDN_INV)},
+       {USB_DEVICE(0x0471, 0x0327), BS(SN9C105, MI0360)},
+       {USB_DEVICE(0x0471, 0x0328), BS(SN9C105, MI0360)},
+       {USB_DEVICE(0x0471, 0x0330), BS(SN9C105, MI0360)},