[PATCH]v4l: list entries no need to check

2010-11-17 Thread Figo.zhang
list entries are not need to be inited, so it no need for checking. Reported-by: Andrew Chew Signed-off-by: Figo.zhang --- drivers/media/video/mx1_camera.c |3 --- drivers/media/video/pxa_camera.c |3 --- drivers/media/video/sh_mobile_ceu_camera.c |3 --- 3

Re: [PATCH 1/1] videobuf: Initialize lists in videobuf_buffer.

2010-11-16 Thread Figo.zhang
On 11/17/2010 03:11 PM, Hans Verkuil wrote: On Wednesday, November 17, 2010 02:38:09 Andrew Chew wrote: diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index c969111..f7e0f86 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers

Re: [PATCH 1/1] videobuf: Initialize lists in videobuf_buffer.

2010-11-16 Thread Figo.zhang
于 11/17/2010 09:38 AM, Andrew Chew 写道: diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index c969111..f7e0f86 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -193,6 +193,8 @@ static stru

Re: [PATCH v4 2/6] drivers:staging: ti-st: fmdrv_v4l2 sources

2010-11-16 Thread Figo.zhang
于 11/16/2010 09:18 PM, manjunatha_ha...@ti.com 写道: > From: Manjunatha Halli > > This module interfaces V4L2 subsystem and FM common > module. It registers itself with V4L2 as Radio module. > > Signed-off-by: Manjunatha Halli > --- > drivers/staging/ti-st/fmdrv_v4l2.c | 757 > +

Re: [PATCH 1/1] videobuf: Initialize lists in videobuf_buffer.

2010-11-16 Thread Figo.zhang
> > diff --git a/drivers/media/video/videobuf-dma-contig.c > b/drivers/media/video/videobuf-dma-contig.c > index c969111..f7e0f86 100644 > --- a/drivers/media/video/videobuf-dma-contig.c > +++ b/drivers/media/video/videobuf-dma-contig.c > @@ -193,6 +193,8 @@ static struct videobuf_buffer *__vide

Re: Allocating videobuf_buffer, but lists not being initialized

2010-11-16 Thread Figo.zhang
于 11/16/2010 03:37 PM, Hans Verkuil 写道: On Tuesday, November 16, 2010 02:10:39 Andrew Chew wrote: I'm looking at drivers/media/video/videobuf-dma-contig.c's __videobuf_alloc() routine. We call kzalloc() to allocate the videobuf_buffer. However, I don't see where the two lists (vb->stream and

Re: Allocating videobuf_buffer, but lists not being initialized

2010-11-16 Thread Figo.zhang
于 11/16/2010 03:40 PM, Hans Verkuil 写道: On Tuesday, November 16, 2010 06:29:53 Pawel Osciak wrote: On Mon, Nov 15, 2010 at 17:10, Andrew Chew wrote: I'm looking at drivers/media/video/videobuf-dma-contig.c's __videobuf_alloc() routine. We call kzalloc() to allocate the videobuf_buffer. Howe

Re: [PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap

2010-08-02 Thread Figo.zhang
On Fri, 2010-07-30 at 19:39 +0800, Figo.zhang wrote: > On Fri, 2010-07-30 at 11:31 +0200, Laurent Pinchart wrote: > > Hi, > > > > On Friday 30 July 2010 02:08:02 Figo.zhang wrote: > > > a mmap issue for videobuf-dma-sg: it will alloc a new page for mmaping >

Re: [PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap

2010-07-30 Thread Figo.zhang
On Fri, 2010-07-30 at 11:31 +0200, Laurent Pinchart wrote: > Hi, > > On Friday 30 July 2010 02:08:02 Figo.zhang wrote: > > a mmap issue for videobuf-dma-sg: it will alloc a new page for mmaping when > > it encounter page fault at video_vm_ops->fault(). pls see > >

Re: [PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap

2010-07-30 Thread Figo.zhang
On Fri, 2010-07-30 at 11:31 +0200, Laurent Pinchart wrote: > Hi, > > On Friday 30 July 2010 02:08:02 Figo.zhang wrote: > > a mmap issue for videobuf-dma-sg: it will alloc a new page for mmaping when > > it encounter page fault at video_vm_ops->fault(). pls see > >

[PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap

2010-07-29 Thread Figo.zhang
if mem->dma.vmalloc is NULL at video_vm_ops->fault(), it will alloc memory by vmlloc_32(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c | 50 +++-- 1 files changed, 41 insertions(+), 9 deletions(-) diff --git a/drivers/media/video/video

Re: [PATCH v2]videobuf_dma_sg: a new implementation for mmap

2010-07-29 Thread Figo.zhang
hi Laurent, would you like to test this patch? btw, why i send the patch , patchwork websit display a part of my patch? https://patchwork.kernel.org/patch/114760/ Best, Figo.zhang On Wed, 2010-07-28 at 21:08 +0800, Figo.zhang wrote: > a mmap issue for videobuf-dma-sg: it will alloc a new p

[PATCH v2]videobuf_dma_sg: a new implementation for mmap

2010-07-28 Thread Figo.zhang
t will alloc memory by vmalloc_32(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c | 51 +++-- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 8359

[PATCH v2]videobuf_dma_sg: a new implementation for mmap

2010-07-28 Thread Figo.zhang
t will alloc memory by vmalloc_32(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c | 51 +++-- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 8359

[PATCH]videobuf_dma_sg: a new implementation for mmap

2010-07-27 Thread Figo.zhang
a mmap issue for videobuf-dma-sg: it will alloc a new page for mmaping when it encounter page fault at video_vm_ops->fault(). a new implementation for mmap, it translate the vmalloc to page at video_vm_ops->fault(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c

Re: how to mmap in videobuf-dma-sg.c

2010-07-24 Thread Figo.zhang
On Thu, 2009-05-21 at 07:35 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 21 May 2009 12:46:04 +0800 > "Figo.zhang" escreveu: > > > hi,all, > > I am puzzle that how to mmap ( V4L2_MEMORY_MMAP) in videobuf-dma-sg.c? > > > > In this file, it alloc t

[PATCH v3]poll method lose race condition

2009-06-16 Thread Figo.zhang
bttv-driver.c,cx23885-video.c,cx88-video.c: poll method lose race condition for capture video. In v2, use the clear logic.Thanks to Trent Piepho's help. In v3, fix a hold mutex locked issue. Signed-off-by: Figo.zhang --- drivers/media/video/bt8xx/bttv-driver.c |

Re: [PATCH]videobuf-core.c: add pointer check

2009-06-15 Thread Figo.zhang
On Sun, 2009-06-07 at 09:21 +0800, Figo.zhang wrote: > On Sun, 2009-06-07 at 09:16 +0800, Figo.zhang wrote: > > On Wed, 2009-06-03 at 10:01 +0800, Figo.zhang wrote: > > > add poiter check for videobuf_queue_core_init(). > > > > > > any guys who write a v4l

Re: [PATCH] zr364xx.c: vfree does its own NULL check

2009-06-15 Thread Figo.zhang
hi Mauro, is it ok for this patch? Best Regards, Figo.zhang On Sat, 2009-06-06 at 17:16 +0800, Figo.zhang wrote: > vfree() does it's own NULL checking, no need for explicit check before > calling it. > > Signed-off-by: Figo.zhang > --- > drivers/media/video/zr364

Re: [PATCH V2] poll method lose race condition

2009-06-15 Thread Figo.zhang
hi Mauro, is it ok for this v2? Best Regards, Figo.zhang > 2009/6/1 Figo.zhang > bttv-driver.c,cx23885-video.c,cx88-video.c: poll method lose > race condition for capture video. > > In v2, use the clear logic.Thanks to Tren

Re: [PATCH] ov511.c: video_register_device() return zero on success

2009-06-10 Thread Figo.zhang
On Thu, 2009-06-11 at 01:40 -0300, Mauro Carvalho Chehab wrote: > Em Wed, 10 Jun 2009 22:39:51 -0300 > Mauro Carvalho Chehab escreveu: > > > Em Sun, 31 May 2009 14:41:52 +0800 > > "Figo.zhang" escreveu: > > > > > video_register_device()

Re: how to mmap in videobuf-dma-sg.c

2009-06-10 Thread Figo.zhang
On Thu, 2009-05-21 at 18:48 +0800, Figo.zhang wrote: > On Thu, 2009-05-21 at 07:35 -0300, Mauro Carvalho Chehab wrote: > > Em Thu, 21 May 2009 12:46:04 +0800 > > "Figo.zhang" escreveu: > > > > > hi,all, > > > I am puzzle that how to mmap ( V4L2_M

Re: [PATCH]videobuf-core.c: add pointer check

2009-06-06 Thread Figo.zhang
On Sun, 2009-06-07 at 09:16 +0800, Figo.zhang wrote: > On Wed, 2009-06-03 at 10:01 +0800, Figo.zhang wrote: > > add poiter check for videobuf_queue_core_init(). > > > > any guys who write a v4l driver, pass a NULL pointer or a non-inintial > > pointer to

[PATCH]usbvision-core.c: vfree does its own NULL check

2009-06-06 Thread Figo.zhang
vfree() does it's own NULL checking,so no need for check before calling it. Signed-off-by: Figo.zhang --- drivers/media/video/usbvision/usbvision-core.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/media/video/usbvision/usbvision-core

[PATCH] zr364xx.c: vfree does its own NULL check

2009-06-06 Thread Figo.zhang
vfree() does it's own NULL checking, no need for explicit check before calling it. Signed-off-by: Figo.zhang --- drivers/media/video/zr364xx.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c

[PATCH] V4L: return -ENOMEM

2009-06-06 Thread Figo.zhang
it is better return -ENOMEM than -EIO Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index da1790e..03c8b04 100644 --- a

Re: [PATCH]V4L:some v4l drivers have error for video_register_device

2009-06-04 Thread Figo.zhang
On Thu, 2009-06-04 at 11:27 +0200, Hans Verkuil wrote: > > On Thu, 2009-06-04 at 11:18 +0200, Laurent Pinchart wrote: > >> Hi, > >> > >> On Thursday 04 June 2009 06:20:07 figo.zhang wrote: > >> > The function video_register_device() will call the

Re: [PATCH]videobuf-core.c: add pointer check

2009-06-04 Thread figo.zhang
On Wed, 2009-06-03 at 10:01 +0800, Figo.zhang wrote: > add poiter check for videobuf_queue_core_init(). > > any guys who write a v4l driver, pass a NULL pointer or a non-inintial > pointer to the first parameter such as videobuf_queue_sg_init() , it > would be crashed. >

Re: [PATCH]V4L:some v4l drivers have error for video_register_device

2009-06-04 Thread figo.zhang
On Thu, 2009-06-04 at 11:18 +0200, Laurent Pinchart wrote: > Hi, > > On Thursday 04 June 2009 06:20:07 figo.zhang wrote: > > The function video_register_device() will call the > > video_register_device_index(). In this function, firtly it will do some > > argments check

Re: [PATCH]V4L:some v4l drivers have error for video_register_device

2009-06-04 Thread figo.zhang
On Thu, 2009-06-04 at 11:18 +0200, Laurent Pinchart wrote: > Hi, > > On Thursday 04 June 2009 06:20:07 figo.zhang wrote: > > The function video_register_device() will call the > > video_register_device_index(). In this function, firtly it will do some > > argments check

Re: [PATCH]V4L:some v4l drivers have error for video_register_device

2009-06-03 Thread figo.zhang
0) STK_ERROR("v4l registration failed\n"); else STK_INFO("Syntek USB2.0 Camera is now controlling video device" " /dev/video%d\n", dev->vdev.num); Figo.zhang On Wed, 2009-05-27 at 11:25 +0800, Figo.zhan

[PATCH] videobuf-dma-sg.c : not need memset()

2009-06-02 Thread Figo.zhang
mem have malloc zero memory by kzalloc(), so it have not need to memset(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma

[PATCH]videobuf-core.c: add pointer check

2009-06-02 Thread Figo.zhang
add poiter check for videobuf_queue_core_init(). any guys who write a v4l driver, pass a NULL pointer or a non-inintial pointer to the first parameter such as videobuf_queue_sg_init() , it would be crashed. Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-core.c |1 + 1 files

[PATCH V2] poll method lose race condition

2009-05-31 Thread Figo.zhang
bttv-driver.c,cx23885-video.c,cx88-video.c: poll method lose race condition for capture video. In v2, use the clear logic.Thanks to Trent Piepho's help. Signed-off-by: Figo.zhang --- drivers/media/video/bt8xx/bttv-driver.c | 20 drivers/media/video/cx23885/cx

[PATCH] ov511.c: video_register_device() return zero on success

2009-05-30 Thread Figo.zhang
video_register_device() return zero on success, it would not return a positive integer. Signed-off-by: Figo.zhang --- drivers/media/video/ov511.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index 9af5532

[PATCH] bttv-driver.c :poll method lose race condition for capture video

2009-05-30 Thread Figo.zhang
bttv-driver.c,cx23885-video.c,cx88-video.c: poll method lose race condition for capture video. Signed-off-by: Figo.zhang --- drivers/media/video/bt8xx/bttv-driver.c |7 +-- drivers/media/video/cx23885/cx23885-video.c | 15 +++ drivers/media/video/cx88/cx88-video.c

[PATCH]V4L:some v4l drivers have error for video_register_device

2009-05-26 Thread Figo.zhang
) { /*err code*/ } Signed-off-by: Figo.zhang --- Documentation/video4linux/v4l2-framework.txt |2 +- drivers/media/radio/radio-maestro.c |2 +- drivers/media/radio/radio-si470x.c |2 +- drivers/media/video/cafe_ccic.c |2

Re: how to mmap in videobuf-dma-sg.c

2009-05-21 Thread Figo.zhang
On Thu, 2009-05-21 at 07:35 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 21 May 2009 12:46:04 +0800 > "Figo.zhang" escreveu: > > > hi,all, > > I am puzzle that how to mmap ( V4L2_MEMORY_MMAP) in videobuf-dma-sg.c? > > > > In this file, it alloc t

how to mmap in videobuf-dma-sg.c

2009-05-20 Thread Figo.zhang
hi,all, I am puzzle that how to mmap ( V4L2_MEMORY_MMAP) in videobuf-dma-sg.c? In this file, it alloc the momery using vmalloc_32() , and put this momery into sglist table,and then use dma_map_sg() to create sg dma at __videobuf_iolock() function. but in __videobuf_mmap_mapper(), i canot understa

[PATCH v2]saa7134-video.c: poll method lose race condition for capture video

2009-05-18 Thread figo.zhang
saa7134-video.c: poll method lose race condition for capture video. In v2, when buf == NULL, it will goto err, return "PULLERR" immediately. Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletion

Re: [PATCH]saa7134-video.c: poll method lose race condition

2009-05-17 Thread figo.zhang
On Mon, 2009-05-18 at 08:28 +0200, Guennadi Liakhovetski wrote: > Guennadi hi,Guennadi, I am sorry that it is my mistake. Figo.zhang -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH]saa7134-video.c: poll method lose race condition

2009-05-17 Thread figo.zhang
On Mon, 2009-05-18 at 05:49 +0200, hermann pitton wrote: > Am Montag, den 18.05.2009, 11:53 +0800 schrieb figo.zhang: > > On Mon, 2009-05-18 at 05:07 +0200, hermann pitton wrote: > > > Am Montag, den 18.05.2009, 10:13 +0800 schrieb figo.zhang: > > > > saa7134-

Re: [PATCH]saa7134-video.c: poll method lose race condition

2009-05-17 Thread figo.zhang
On Mon, 2009-05-18 at 05:07 +0200, hermann pitton wrote: > Am Montag, den 18.05.2009, 10:13 +0800 schrieb figo.zhang: > > saa7134-video.c: poll method lose race condition > > > > > > Signed-off-by: Figo.zhang > > --- > > drivers/media/video/saa7134/saa713

[PATCH]media/video: minor have assigned value twice

2009-05-17 Thread figo.zhang
The variable minor have assigned value twice, the first time is in the initial "video_device"data struct in those drivers,pls see saa7134-video.c,line 2503. Signed-off-by: Figo.zhang --- drivers/media/video/bt8xx/bttv-driver.c|1 - drivers/media/video/cx23885/cx23885-417

[PATCH]saa7134-video.c: poll method lose race condition

2009-05-17 Thread figo.zhang
saa7134-video.c: poll method lose race condition Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c

[PATCH][RESEND]saa7134-video.c: fix the block bug

2009-05-07 Thread figo.zhang
ointer to be NULL in the buffer_prepare() function. Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 4

[PATCH]saa7134-video.c: fix the block bug

2009-05-07 Thread figo.zhang
ter to be NULL int the buffer_prepare(). Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 493cad9..5

[PATCH][RESEND]saa7134-video.c: fix the block bug

2009-05-07 Thread figo.zhang
ter to be NULL int the buffer_prepare(). Signed-off-by: Figo.zhang --- drivers/media/video/saa7134/saa7134-video.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 493cad9..5