All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] media: coda: set output buffer bytesused to appease v4l2-compliance
@ 2022-04-04 16:35 Philipp Zabel
  2022-04-04 16:35 ` [PATCH 2/7] media: coda: disable encoder cmd ioctl on decoder and vice versa Philipp Zabel
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Philipp Zabel @ 2022-04-04 16:35 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab, kernel

The V4L2 specification states:

 "If the application sets this to 0 for an output stream, then bytesused
  will be set to the size of the buffer (see the length field of this
  struct) by the driver."

Since we set allow_zero_bytesused, we have to handle this ourselves.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/chips-media/coda-bit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/chips-media/coda-bit.c b/drivers/media/platform/chips-media/coda-bit.c
index c484c008ab02..705a179ea8f0 100644
--- a/drivers/media/platform/chips-media/coda-bit.c
+++ b/drivers/media/platform/chips-media/coda-bit.c
@@ -381,6 +381,9 @@ void coda_fill_bitstream(struct coda_ctx *ctx, struct list_head *buffer_list)
 		/* Dump empty buffers */
 		if (!vb2_get_plane_payload(&src_buf->vb2_buf, 0)) {
 			src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
+			vb2_set_plane_payload(&src_buf->vb2_buf, 0,
+					      vb2_plane_size(&src_buf->vb2_buf,
+							     0));
 			v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
 			continue;
 		}
-- 
2.30.2


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

end of thread, other threads:[~2022-04-26 10:07 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 16:35 [PATCH 1/7] media: coda: set output buffer bytesused to appease v4l2-compliance Philipp Zabel
2022-04-04 16:35 ` [PATCH 2/7] media: coda: disable encoder cmd ioctl on decoder and vice versa Philipp Zabel
2022-04-05 14:07   ` Nicolas Dufresne
2022-04-04 16:35 ` [PATCH 3/7] media: coda: disable encoder ioctls for decoder devices Philipp Zabel
2022-04-05 14:13   ` Nicolas Dufresne
2022-04-04 16:35 ` [PATCH 4/7] media: coda: disable stateful encoder ioctls for jpeg encoder Philipp Zabel
2022-04-05 14:14   ` Nicolas Dufresne
2022-04-04 16:35 ` [PATCH 5/7] media: coda: fix default JPEG colorimetry Philipp Zabel
2022-04-05 14:15   ` Nicolas Dufresne
2022-04-21 10:02   ` Hans Verkuil
2022-04-21 10:38     ` Philipp Zabel
2022-04-21 11:06       ` Hans Verkuil
2022-04-26  9:21         ` Philipp Zabel
2022-04-21 14:54     ` Philipp Zabel
2022-04-21 15:28       ` Philipp Zabel
2022-04-04 16:35 ` [PATCH 6/7] media: coda: enable capture G_PARM for stateful encoder Philipp Zabel
2022-04-05 14:19   ` Nicolas Dufresne
2022-04-21 10:30   ` Hans Verkuil
2022-04-21 14:58     ` Philipp Zabel
2022-04-25  5:34       ` Hans Verkuil
2022-04-04 16:35 ` [PATCH 7/7] media: coda: enable capture S_PARM " Philipp Zabel
2022-04-05 14:22   ` Nicolas Dufresne
2022-04-05 15:03     ` Philipp Zabel
2022-04-05 16:00       ` Nicolas Dufresne
2022-04-05 14:05 ` [PATCH 1/7] media: coda: set output buffer bytesused to appease v4l2-compliance Nicolas Dufresne
2022-04-21  9:44 ` Hans Verkuil
2022-04-21 10:24   ` Philipp Zabel
2022-04-26  5:52     ` Hans Verkuil
2022-04-26  9:32       ` Philipp Zabel

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.