linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vivid: Set vid_cap_streaming and vid_out_streaming to true
@ 2019-09-09  9:11 Vandana BN
  2019-09-09  9:19 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Vandana BN @ 2019-09-09  9:11 UTC (permalink / raw)
  To: linux-media, linux-kernel-mentees; +Cc: hverkuil, Vandana BN

when vbi/meta stream is started, followed by video streaming,
the vid_cap_streaming and vid_out_streaming were not being set to true,
which would cause the video stream to stop when vbi/meta stream is stopped.
This patch allows to set vid_cap_streaming and vid_out_streaming to true.

Signed-off-by: Vandana BN <bnvandana@gmail.com>
---
 drivers/media/platform/vivid/vivid-vid-cap.c | 3 ---
 drivers/media/platform/vivid/vivid-vid-out.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 8cbaa0c998ed..2d030732feac 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -223,9 +223,6 @@ static int vid_cap_start_streaming(struct vb2_queue *vq, unsigned count)
 	if (vb2_is_streaming(&dev->vb_vid_out_q))
 		dev->can_loop_video = vivid_vid_can_loop(dev);
 
-	if (dev->kthread_vid_cap)
-		return 0;
-
 	dev->vid_cap_seq_count = 0;
 	dprintk(dev, 1, "%s\n", __func__);
 	for (i = 0; i < VIDEO_MAX_FRAME; i++)
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index 148b663a6075..a0364ac497f9 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -161,9 +161,6 @@ static int vid_out_start_streaming(struct vb2_queue *vq, unsigned count)
 	if (vb2_is_streaming(&dev->vb_vid_cap_q))
 		dev->can_loop_video = vivid_vid_can_loop(dev);
 
-	if (dev->kthread_vid_out)
-		return 0;
-
 	dev->vid_out_seq_count = 0;
 	dprintk(dev, 1, "%s\n", __func__);
 	if (dev->start_streaming_error) {
-- 
2.17.1


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

* Re: [PATCH] vivid: Set vid_cap_streaming and vid_out_streaming to true
  2019-09-09  9:11 [PATCH] vivid: Set vid_cap_streaming and vid_out_streaming to true Vandana BN
@ 2019-09-09  9:19 ` Hans Verkuil
  2019-09-09  9:43   ` [PATCH v2] " Vandana BN
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2019-09-09  9:19 UTC (permalink / raw)
  To: Vandana BN, linux-media, linux-kernel-mentees

Hi Vandana,

The patch is right, but the commit log can be improved:

On 9/9/19 11:11 AM, Vandana BN wrote:
> when vbi/meta stream is started, followed by video streaming,

Since this patch will be applied before the patch that adds metadata,
you can't refer to meta yet. Just stick to vbi.

Also: 'when' -> 'When'

> the vid_cap_streaming and vid_out_streaming were not being set to true,
> which would cause the video stream to stop when vbi/meta stream is stopped.

Drop /meta here as well.

> This patch allows to set vid_cap_streaming and vid_out_streaming to true.

You can add a line here saying:

"According to Hans Verkuil it appears that these 'if (dev->kthread_vid_cap)'
checks are a left-over from the original vivid development and should never
have been there."

> 
> Signed-off-by: Vandana BN <bnvandana@gmail.com>

Add this line:

Cc: <stable@vger.kernel.org>      # for v3.18 and up

Since this is a fix valid for all kernels that support vivid.

Regards,

	Hans

> ---
>  drivers/media/platform/vivid/vivid-vid-cap.c | 3 ---
>  drivers/media/platform/vivid/vivid-vid-out.c | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
> index 8cbaa0c998ed..2d030732feac 100644
> --- a/drivers/media/platform/vivid/vivid-vid-cap.c
> +++ b/drivers/media/platform/vivid/vivid-vid-cap.c
> @@ -223,9 +223,6 @@ static int vid_cap_start_streaming(struct vb2_queue *vq, unsigned count)
>  	if (vb2_is_streaming(&dev->vb_vid_out_q))
>  		dev->can_loop_video = vivid_vid_can_loop(dev);
>  
> -	if (dev->kthread_vid_cap)
> -		return 0;
> -
>  	dev->vid_cap_seq_count = 0;
>  	dprintk(dev, 1, "%s\n", __func__);
>  	for (i = 0; i < VIDEO_MAX_FRAME; i++)
> diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
> index 148b663a6075..a0364ac497f9 100644
> --- a/drivers/media/platform/vivid/vivid-vid-out.c
> +++ b/drivers/media/platform/vivid/vivid-vid-out.c
> @@ -161,9 +161,6 @@ static int vid_out_start_streaming(struct vb2_queue *vq, unsigned count)
>  	if (vb2_is_streaming(&dev->vb_vid_cap_q))
>  		dev->can_loop_video = vivid_vid_can_loop(dev);
>  
> -	if (dev->kthread_vid_out)
> -		return 0;
> -
>  	dev->vid_out_seq_count = 0;
>  	dprintk(dev, 1, "%s\n", __func__);
>  	if (dev->start_streaming_error) {
> 


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

* [PATCH v2] vivid: Set vid_cap_streaming and vid_out_streaming to true
  2019-09-09  9:19 ` Hans Verkuil
@ 2019-09-09  9:43   ` Vandana BN
  0 siblings, 0 replies; 3+ messages in thread
From: Vandana BN @ 2019-09-09  9:43 UTC (permalink / raw)
  To: linux-media, linux-kernel-mentees; +Cc: hverkuil, Vandana BN, stable

When vbi stream is started, followed by video streaming,
the vid_cap_streaming and vid_out_streaming were not being set to true,
which would cause the video stream to stop when vbi stream is stopped.
This patch allows to set vid_cap_streaming and vid_out_streaming to true.
According to Hans Verkuil it appears that these 'if (dev->kthread_vid_cap)'
checks are a left-over from the original vivid development and should never
have been there.

Signed-off-by: Vandana BN <bnvandana@gmail.com>
Cc: <stable@vger.kernel.org>      # for v3.18 and up
---
 drivers/media/platform/vivid/vivid-vid-cap.c | 3 ---
 drivers/media/platform/vivid/vivid-vid-out.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 8cbaa0c998ed..2d030732feac 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -223,9 +223,6 @@ static int vid_cap_start_streaming(struct vb2_queue *vq, unsigned count)
 	if (vb2_is_streaming(&dev->vb_vid_out_q))
 		dev->can_loop_video = vivid_vid_can_loop(dev);
 
-	if (dev->kthread_vid_cap)
-		return 0;
-
 	dev->vid_cap_seq_count = 0;
 	dprintk(dev, 1, "%s\n", __func__);
 	for (i = 0; i < VIDEO_MAX_FRAME; i++)
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index 148b663a6075..a0364ac497f9 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -161,9 +161,6 @@ static int vid_out_start_streaming(struct vb2_queue *vq, unsigned count)
 	if (vb2_is_streaming(&dev->vb_vid_cap_q))
 		dev->can_loop_video = vivid_vid_can_loop(dev);
 
-	if (dev->kthread_vid_out)
-		return 0;
-
 	dev->vid_out_seq_count = 0;
 	dprintk(dev, 1, "%s\n", __func__);
 	if (dev->start_streaming_error) {
-- 
2.17.1


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

end of thread, other threads:[~2019-09-09  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09  9:11 [PATCH] vivid: Set vid_cap_streaming and vid_out_streaming to true Vandana BN
2019-09-09  9:19 ` Hans Verkuil
2019-09-09  9:43   ` [PATCH v2] " Vandana BN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).