Thread (69 messages) 69 messages, 4 authors, 2012-06-18

Re: [RFCv1 PATCH 28/32] vivi: use vb2 helper functions.

From: Hans Verkuil <hidden>
Date: 2012-06-18 11:41:16

On Mon June 18 2012 12:08:10 Laurent Pinchart wrote:
Hi Hans,

Thanks for the patch.

On Sunday 10 June 2012 12:25:50 Hans Verkuil wrote:
quoted
From: Hans Verkuil <redacted>

Signed-off-by: Hans Verkuil <redacted>
---
 drivers/media/video/vivi.c |  160 ++++++-----------------------------------
 1 file changed, 21 insertions(+), 139 deletions(-)
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 1e4da5e..1e8c4f3 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -767,7 +767,13 @@ static int queue_setup(struct vb2_queue *vq, const
struct v4l2_format *fmt, struct vivi_dev *dev = vb2_get_drv_priv(vq);
 	unsigned long size;

-	size = dev->width * dev->height * dev->pixelsize;
+	if (fmt)
+		size = fmt->fmt.pix.sizeimage;
+	else
+		size = dev->width * dev->height * dev->pixelsize;
+
+	if (size == 0)
+		return -EINVAL;
If I'm not mistaken, this is a bug fix to properly support CREATE_BUF, right ? 
If so it should be split to its own patch.
OK.

	Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help