All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v4l: soc-camera: fix multiple simultaneous user case
@ 2010-12-25 21:29 Guennadi Liakhovetski
  2010-12-26  0:58 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2010-12-25 21:29 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab

A recent patch has introduced a regression, whereby a second open of an
soc-camera video device breaks the running capture. This patch fixes this bug
by guaranteeing, that video buffers get initialised only during the first open
of the device node.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

Mauro, please, let's try to get it in 2.6.37, or we'll have to push it to 
stable after 2.6.37 is out. I'm just posting it quickly and will push it 
to linuxtv.org like tomorrow or on Monday...

 drivers/media/video/soc_camera.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 335120c..052bd6d 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -405,13 +405,13 @@ static int soc_camera_open(struct file *file)
 		ret = soc_camera_set_fmt(icd, &f);
 		if (ret < 0)
 			goto esfmt;
+
+		ici->ops->init_videobuf(&icd->vb_vidq, icd);
 	}
 
 	file->private_data = icd;
 	dev_dbg(&icd->dev, "camera device open\n");
 
-	ici->ops->init_videobuf(&icd->vb_vidq, icd);
-
 	mutex_unlock(&icd->video_lock);
 
 	return 0;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] v4l: soc-camera: fix multiple simultaneous user case
  2010-12-25 21:29 [PATCH] v4l: soc-camera: fix multiple simultaneous user case Guennadi Liakhovetski
@ 2010-12-26  0:58 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-12-26  0:58 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List

Em 25-12-2010 19:29, Guennadi Liakhovetski escreveu:
> A recent patch has introduced a regression, whereby a second open of an
> soc-camera video device breaks the running capture. This patch fixes this bug
> by guaranteeing, that video buffers get initialised only during the first open
> of the device node.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> Mauro, please, let's try to get it in 2.6.37, or we'll have to push it to 
> stable after 2.6.37 is out. I'm just posting it quickly and will push it 
> to linuxtv.org like tomorrow or on Monday...

Ok, I've applied it and sent it today to my linux-next tree. Stephen will only 
pull from it at Dec, 27/28, likely in time for the last pull request for .37.

Cheers,
Mauro
> 
>  drivers/media/video/soc_camera.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
> index 335120c..052bd6d 100644
> --- a/drivers/media/video/soc_camera.c
> +++ b/drivers/media/video/soc_camera.c
> @@ -405,13 +405,13 @@ static int soc_camera_open(struct file *file)
>  		ret = soc_camera_set_fmt(icd, &f);
>  		if (ret < 0)
>  			goto esfmt;
> +
> +		ici->ops->init_videobuf(&icd->vb_vidq, icd);
>  	}
>  
>  	file->private_data = icd;
>  	dev_dbg(&icd->dev, "camera device open\n");
>  
> -	ici->ops->init_videobuf(&icd->vb_vidq, icd);
> -
>  	mutex_unlock(&icd->video_lock);
>  
>  	return 0;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-26  0:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-25 21:29 [PATCH] v4l: soc-camera: fix multiple simultaneous user case Guennadi Liakhovetski
2010-12-26  0:58 ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.