Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-10-01 Thread Sylwester Nawrocki
Hello Hans, On 09/26/2011 04:25 PM, Hans Verkuil wrote: On Wednesday, September 14, 2011 16:30:47 Sylwester Nawrocki wrote: On 09/14/2011 09:10 AM, Scott Jiang wrote: +static int bcap_qbuf(struct file *file, void *priv, + struct v4l2_buffer *buf) +{ + struct

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-26 Thread Hans Verkuil
On Wednesday, September 14, 2011 16:30:47 Sylwester Nawrocki wrote: On 09/14/2011 09:10 AM, Scott Jiang wrote: +static int bcap_qbuf(struct file *file, void *priv, + struct v4l2_buffer *buf) +{ + struct bcap_device *bcap_dev = video_drvdata(file); + struct

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-17 Thread Guennadi Liakhovetski
One more clean-up possibility: On Tue, 13 Sep 2011, Scott Jiang wrote: this is a v4l2 bridge driver for Blackfin video capture device, support ppi interface Signed-off-by: Scott Jiang scott.jiang.li...@gmail.com --- [snip] diff --git a/drivers/media/video/blackfin/bfin_capture.c

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-16 Thread Guennadi Liakhovetski
On Fri, 16 Sep 2011, Scott Jiang wrote: 2011/9/16 Sylwester Nawrocki snj...@gmail.com: On 09/15/2011 04:40 AM, Scott Jiang wrote: 2011/9/14 Sylwester Nawrockis.nawro...@samsung.com: On 09/14/2011 09:10 AM, Scott Jiang wrote: +                     fmt =bcap_formats[i]; +              

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-16 Thread Scott Jiang
2011/9/13 Guennadi Liakhovetski g.liakhovet...@gmx.de: On Tue, 13 Sep 2011, Scott Jiang wrote: + +struct bcap_format { +     u8 *desc; +     u32 pixelformat; +     enum v4l2_mbus_pixelcode mbus_code; +     int bpp; /* bytes per pixel */ Don't you think you might have to process

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-16 Thread Guennadi Liakhovetski
On Fri, 16 Sep 2011, Scott Jiang wrote: 2011/9/13 Guennadi Liakhovetski g.liakhovet...@gmx.de: On Tue, 13 Sep 2011, Scott Jiang wrote: + +struct bcap_format { +     u8 *desc; +     u32 pixelformat; +     enum v4l2_mbus_pixelcode mbus_code; +     int bpp; /* bytes per pixel

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Guennadi Liakhovetski
On Thu, 15 Sep 2011, Scott Jiang wrote: accually this array is to convert mbus to pixformat. ppi supports any formats. You mean, it doesn't distinguish formats? It just packs bytes in RAM exactly as it ready them from the bus, and doesn't support any formats natively, i.e., doesn't offer any

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Scott Jiang
+ +#define CAPTURE_DRV_NAME        bfin_capture +#define BCAP_MIN_NUM_BUF        2 + +struct bcap_format { +     u8 *desc; +     u32 pixelformat; +     enum v4l2_mbus_pixelcode mbus_code; +     int bpp; /* bytes per pixel */ Don't you think you might have to process 12 bpp formats at

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Scott Jiang
2011/9/15 Guennadi Liakhovetski g.liakhovet...@gmx.de: On Thu, 15 Sep 2011, Scott Jiang wrote: accually this array is to convert mbus to pixformat. ppi supports any formats. You mean, it doesn't distinguish formats? It just packs bytes in RAM exactly as it ready them from the bus, and

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Guennadi Liakhovetski
On Thu, 15 Sep 2011, Scott Jiang wrote: 2011/9/15 Guennadi Liakhovetski g.liakhovet...@gmx.de: On Thu, 15 Sep 2011, Scott Jiang wrote: accually this array is to convert mbus to pixformat. ppi supports any formats. You mean, it doesn't distinguish formats? It just packs bytes in RAM

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Scott Jiang
I have considered using soc, but it can't support decoder when I began to write this driver in 2.6.38. soc_mediabus.c is a stand-alone module, it has no dependencies on soc-camera. Out of interest - what kind of decoder you mean? A tv-decoder? We do have a tv-decoder driver tw9910 under

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Guennadi Liakhovetski
On Thu, 15 Sep 2011, Scott Jiang wrote: I have considered using soc, but it can't support decoder when I began to write this driver in 2.6.38. soc_mediabus.c is a stand-alone module, it has no dependencies on soc-camera. Out of interest - what kind of decoder you mean? A tv-decoder?

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Sylwester Nawrocki
On 09/15/2011 08:37 AM, Scott Jiang wrote: + +#define CAPTURE_DRV_NAMEbfin_capture +#define BCAP_MIN_NUM_BUF2 + +struct bcap_format { + u8 *desc; + u32 pixelformat; + enum v4l2_mbus_pixelcode mbus_code; + int bpp; /* bytes per pixel */ Don't you think

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Sylwester Nawrocki
On 09/15/2011 04:40 AM, Scott Jiang wrote: 2011/9/14 Sylwester Nawrockis.nawro...@samsung.com: On 09/14/2011 09:10 AM, Scott Jiang wrote: + fmt =bcap_formats[i]; + if (mbus_code) + *mbus_code = fmt-mbus_code; +

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-15 Thread Scott Jiang
2011/9/16 Sylwester Nawrocki snj...@gmail.com: On 09/15/2011 04:40 AM, Scott Jiang wrote: 2011/9/14 Sylwester Nawrockis.nawro...@samsung.com: On 09/14/2011 09:10 AM, Scott Jiang wrote: +                     fmt =bcap_formats[i]; +                     if (mbus_code) +                        

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Scott Jiang
I think, the direct use of vb2_plane_cookie() is discouraged. vb2_dma_contig_plane_dma_addr() should work for you. I guess you mean vb2_dma_contig_plane_paddr no, in the current kernel it's vb2_dma_contig_plane_dma_addr(). See

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Scott Jiang
+static int bcap_qbuf(struct file *file, void *priv, +                     struct v4l2_buffer *buf) +{ +     struct bcap_device *bcap_dev = video_drvdata(file); +     struct v4l2_fh *fh = file-private_data; +     struct bcap_fh *bcap_fh = container_of(fh, struct bcap_fh, fh); + +     if

Re: [uclinux-dist-devel] [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Scott Jiang
i think at least these three are unused and should get punted +static int __devinit bcap_probe(struct platform_device *pdev) +{ +       struct bcap_device *bcap_dev; +       struct video_device *vfd; +       struct i2c_adapter *i2c_adap; you need to include linux/i2c.h for this no,

Re: [uclinux-dist-devel] [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Guennadi Liakhovetski
On Wed, 14 Sep 2011, Scott Jiang wrote: i think at least these three are unused and should get punted +static int __devinit bcap_probe(struct platform_device *pdev) +{ +       struct bcap_device *bcap_dev; +       struct video_device *vfd; +       struct i2c_adapter *i2c_adap;

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Sylwester Nawrocki
On 09/14/2011 09:10 AM, Scott Jiang wrote: +static int bcap_qbuf(struct file *file, void *priv, + struct v4l2_buffer *buf) +{ + struct bcap_device *bcap_dev = video_drvdata(file); + struct v4l2_fh *fh = file-private_data; + struct bcap_fh *bcap_fh =

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-14 Thread Scott Jiang
2011/9/14 Sylwester Nawrocki s.nawro...@samsung.com: On 09/14/2011 09:10 AM, Scott Jiang wrote: +static int bcap_qbuf(struct file *file, void *priv, +                     struct v4l2_buffer *buf) +{ +     struct bcap_device *bcap_dev = video_drvdata(file); +     struct v4l2_fh *fh =

[PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Scott Jiang
this is a v4l2 bridge driver for Blackfin video capture device, support ppi interface Signed-off-by: Scott Jiang scott.jiang.li...@gmail.com --- drivers/media/video/Makefile|2 + drivers/media/video/blackfin/Kconfig| 10 + drivers/media/video/blackfin/Makefile

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Guennadi Liakhovetski
Again, no complete review, just a couple of remarks On Tue, 13 Sep 2011, Scott Jiang wrote: this is a v4l2 bridge driver for Blackfin video capture device, support ppi interface Signed-off-by: Scott Jiang scott.jiang.li...@gmail.com --- [snip] diff --git

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Scott Jiang
+ +struct bcap_format { +     u8 *desc; +     u32 pixelformat; +     enum v4l2_mbus_pixelcode mbus_code; +     int bpp; /* bytes per pixel */ Don't you think you might have to process 12 bpp formats at some point, like YUV 4:2:0, or NV12? Maybe better calculate in bits from the beginning?

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Guennadi Liakhovetski
On Tue, 13 Sep 2011, Scott Jiang wrote: + +struct bcap_format { +     u8 *desc; +     u32 pixelformat; +     enum v4l2_mbus_pixelcode mbus_code; +     int bpp; /* bytes per pixel */ Don't you think you might have to process 12 bpp formats at some point, like YUV 4:2:0, or NV12?

Re: [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Sylwester Nawrocki
Hi Scott, On 09/13/2011 08:34 PM, Scott Jiang wrote: this is a v4l2 bridge driver for Blackfin video capture device, support ppi interface Signed-off-by: Scott Jiangscott.jiang.li...@gmail.com --- drivers/media/video/Makefile|2 +

Re: [uclinux-dist-devel] [PATCH 4/4] v4l2: add blackfin capture bridge driver

2011-09-13 Thread Mike Frysinger
On Tue, Sep 13, 2011 at 14:34, Scott Jiang wrote: --- /dev/null +++ b/drivers/media/video/blackfin/Kconfig @@ -0,0 +1,10 @@ +config VIDEO_BLACKFIN_CAPTURE +       tristate Blackfin Video Capture Driver +       depends on VIDEO_DEV BLACKFIN +       select VIDEOBUF2_DMA_CONTIG since the