Skip to contentSkip to conversation

vivid: Set vid_cap_streaming and vid_out_streaming to true

PATCH New bnvandana at gmail.com (Vandana BN) 1 participant 3 messages Sep 9, 2019

Subsystems (2)
lore
Share & tools
lore

bnvandana at gmail.com (Vandana BN)

#0 lore raw

PATCH 1/1 vivid: Set vid_cap_streaming and vid_out_streaming to true

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 at 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(-)
drivers/media/platform/vivid/vivid-vid-cap.c +0 -3
index 8cbaa0c998ed..2d030732feac 100644
@@ -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++)
drivers/media/platform/vivid/vivid-vid-out.c +0 -3
index 148b663a6075..a0364ac497f9 100644
@@ -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) {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 vivid: Set vid_cap_streaming and vid_out_streaming to true

Hi Vandana,

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

Quoted 1 line · Vandana BN

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'

Quoted 2 lines

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.

Quoted 1 line

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."

Quoted 2 lines
Signed-off-by Vandana BN <bnvandana at gmail.com>

Add this line:

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

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

Regards,

Hans

Quoted 34 lines
---
 drivers/media/platform/vivid/vivid-vid-cap.c | 3 ---
 drivers/media/platform/vivid/vivid-vid-out.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/media/platform/vivid/vivid-vid-cap.c +0 -3
index 8cbaa0c998ed..2d030732feac 100644
@@ -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++)
drivers/media/platform/vivid/vivid-vid-out.c +0 -3
index 148b663a6075..a0364ac497f9 100644
@@ -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 lore raw

PATCH v2 1/1 vivid: Set vid_cap_streaming and vid_out_streaming to true

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 at gmail.com>
Cc <stable at 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(-)
drivers/media/platform/vivid/vivid-vid-cap.c +0 -3
index 8cbaa0c998ed..2d030732feac 100644
@@ -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++)
drivers/media/platform/vivid/vivid-vid-out.c +0 -3
index 148b663a6075..a0364ac497f9 100644
@@ -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) {
Signature · 1 line
2.17.1