From 43925e774ee9f5e800ee3bf3a762b3667e030e90 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Wed, 2 May 2007 03:13:47 +0200 Subject: saa7146: proper prototype for saa7146_video_do_ioctl() From: Adrian Bunk This patch adds a proper prototype for saa7146_video_do_ioctl() in include/media/saa7146_vv.h. Signed-off-by: Adrian Bunk Signed-off-by: Oliver Endriss --- linux/include/media/saa7146_vv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/include') diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h index 50e33b0e9..cce20ed5c 100644 --- a/linux/include/media/saa7146_vv.h +++ b/linux/include/media/saa7146_vv.h @@ -216,6 +216,8 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data); extern struct saa7146_use_ops saa7146_video_uops; int saa7146_start_preview(struct saa7146_fh *fh); int saa7146_stop_preview(struct saa7146_fh *fh); +int saa7146_video_do_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); /* from saa7146_vbi.c */ extern struct saa7146_use_ops saa7146_vbi_uops; -- cgit v1.2.3 From ce1fef0b7e749c71729bdacaa98708d9b65387a4 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Thu, 3 May 2007 17:23:44 +0200 Subject: saa7146: DMA: Correctly free resources on error, sync PCI streamed data From: Jon Burgess I added saa7146_vmalloc_destroy_pgtable() which frees the resources allocated by saa7146_vmalloc_build_pgtable() and updated the callers in budget-core.c and av7110.c. I have also been through the updated functions and updated the error paths to ensure they free all allocated resources on error. I also realised that there are other callers to saa7146_pgtable_free() which did not have any sg DMA mapped so it seems wrong to add the pci_unmap_sg() into that function. Instead I created saa7146_vmalloc_destroy_pgtable() to do this. Also included in this patch are the previous fixes for pci_unmap_sg() and syncing the PCI streamed data to work with a SWIOTLB and match the requirements documented in DMA-API.txt. Signed-off-by: Jon Burgess Signed-off-by: Oliver Endriss --- linux/include/media/saa7146.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/include') diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index ab0a60b4d..1904940e3 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -70,6 +70,7 @@ struct saa7146_pgtable { unsigned long offset; /* used for custom pagetables (used for example by budget dvb cards) */ struct scatterlist *slist; + int nents; }; struct saa7146_pci_extension_data { @@ -181,6 +182,7 @@ 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 ); char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt); +void saa7146_vfree_destroy_pgtable(struct pci_dev *pci, char *mem, struct saa7146_pgtable *pt); void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data); int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop); -- cgit v1.2.3 From e916f4cd0bb1f1815fcb5b617fa59ac57b4e7eb5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 13 May 2007 11:15:24 -0300 Subject: Backport several i2c cleanups from mainstream From: Mauro Carvalho Chehab backport commit 2096b956d24c4b5950b808fc23b218425d79ebb1 from David Brownell Maybe I've merged also other i2c cleanups here that happened on Kernel. Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/i2c-id.h | 4 +++- linux/include/media/ovcamchip.h | 1 - linux/include/media/tuner.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'linux/include') diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h index 9c21dc793..aa83d4163 100644 --- a/linux/include/linux/i2c-id.h +++ b/linux/include/linux/i2c-id.h @@ -117,6 +117,7 @@ #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ +#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ #define I2C_DRIVERID_I2CDEV 900 #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ @@ -258,8 +259,9 @@ /* --- MCP107 adapter */ #define I2C_HW_MPC107 0x0d0000 -/* --- Marvell mv64xxx i2c adapter */ +/* --- Embedded adapters */ #define I2C_HW_MV64XXX 0x190000 +#define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */ /* --- Miscellaneous adapters */ #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ diff --git a/linux/include/media/ovcamchip.h b/linux/include/media/ovcamchip.h index 9813334d6..9ac7da26e 100644 --- a/linux/include/media/ovcamchip.h +++ b/linux/include/media/ovcamchip.h @@ -17,7 +17,6 @@ #include "compat.h" #include #include -#include /* --------------------------------- */ /* ENUMERATIONS */ diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h index 27d2183a4..8e1e4738b 100644 --- a/linux/include/media/tuner.h +++ b/linux/include/media/tuner.h @@ -23,6 +23,7 @@ #define _TUNER_H #include +#include #include extern int tuner_debug; -- cgit v1.2.3 From 2392009ea8bfdab6078943ca39f6a5223e557f18 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 17 May 2007 11:41:44 +0200 Subject: Adding new fields to v4l2_pix_format broke the ABI, reverted that change From: Hans Verkuil Reverted the change to struct v4l2_pix_format. I completely missed that this struct was used by existing ioctls so that changing it broke the ABI. I will have to think of another way of setting the top/left coordinates but for now this change is reverted to preserve compatibility. Signed-off-by: Hans Verkuil --- linux/include/linux/videodev2.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 76af1e16a..8e46a2029 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -267,8 +267,6 @@ struct v4l2_pix_format __u32 sizeimage; enum v4l2_colorspace colorspace; __u32 priv; /* private data, depends on pixelformat */ - __u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ - __u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ }; /* Pixel format FOURCC depth Description */ -- cgit v1.2.3 From 29993ba41c50e8096ffd25fe704990479248d061 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 19 May 2007 19:50:35 +0200 Subject: Use v4l2_pix_out_fmt instead of v4l2_pix_fmt for video output format From: Hans Verkuil Adding top/left fields to v4l2_pix_fmt broke the ABI. To fix this a new v4l2_pix_out_fmt struct was introduced to specify the video output format. This new struct *does* have the additional top/left fields. The V4L2_CAP_VIDEO_OUTPUT_POS capability that was introduced is no longer needed and is removed. Signed-off-by: Hans Verkuil --- linux/include/linux/videodev2.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 8e46a2029..3d92c6b69 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -243,8 +243,7 @@ struct v4l2_capability #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ -#define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */ -#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */ +#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ @@ -1274,6 +1273,23 @@ struct v4l2_encoder_cmd { * Data services API by Michael Schimek */ +/* Video output format */ +/* The first part of this structure is identical to the v4l2_pix_format + structure, the fields after 'priv' are specific to the video output format. */ +struct v4l2_pix_out_format +{ + __u32 width; + __u32 height; + __u32 pixelformat; + enum v4l2_field field; + __u32 bytesperline; /* for padding, zero if unused */ + __u32 sizeimage; + enum v4l2_colorspace colorspace; + __u32 priv; /* private data, depends on pixelformat */ + __u32 top; + __u32 left; +}; + /* Raw VBI */ struct v4l2_vbi_format { @@ -1356,6 +1372,7 @@ struct v4l2_format union { struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE + struct v4l2_pix_out_format pix_out; // V4L2_BUF_TYPE_VIDEO_OUTPUT struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE -- cgit v1.2.3 From c5fbb8e80c9235232c11a933d7f0aef6b5734258 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 21 May 2007 12:44:02 +0200 Subject: Backed out changeset c7cb1aaec112a3ee7d6483b54d03d6a093754f10 --- linux/include/linux/videodev2.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 3d92c6b69..8e46a2029 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -243,7 +243,8 @@ struct v4l2_capability #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ -#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ +#define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */ +#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */ #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ @@ -1273,23 +1274,6 @@ struct v4l2_encoder_cmd { * Data services API by Michael Schimek */ -/* Video output format */ -/* The first part of this structure is identical to the v4l2_pix_format - structure, the fields after 'priv' are specific to the video output format. */ -struct v4l2_pix_out_format -{ - __u32 width; - __u32 height; - __u32 pixelformat; - enum v4l2_field field; - __u32 bytesperline; /* for padding, zero if unused */ - __u32 sizeimage; - enum v4l2_colorspace colorspace; - __u32 priv; /* private data, depends on pixelformat */ - __u32 top; - __u32 left; -}; - /* Raw VBI */ struct v4l2_vbi_format { @@ -1372,7 +1356,6 @@ struct v4l2_format union { struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE - struct v4l2_pix_out_format pix_out; // V4L2_BUF_TYPE_VIDEO_OUTPUT struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE -- cgit v1.2.3