linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hverkuil-cisco@xs4all.nl
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Subject: [PATCH v5.1 2/2] cedrus: set requires_requests
Date: Wed, 20 Mar 2019 13:33:05 +0100	[thread overview]
Message-ID: <20190320123305.5224-3-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190320123305.5224-1-hverkuil-cisco@xs4all.nl>

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

The cedrus stateless decoder requires the use of request, so
indicate this by setting requires_requests to 1.

Note that the cedrus driver never checked for this, and as far
as I can tell would just crash if an attempt was made to queue
a buffer without a request.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
index b47854b3bce4..9673874ece10 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
@@ -536,6 +536,7 @@ int cedrus_queue_init(void *priv, struct vb2_queue *src_vq,
 	src_vq->lock = &ctx->dev->dev_mutex;
 	src_vq->dev = ctx->dev->dev;
 	src_vq->supports_requests = true;
+	src_vq->requires_requests = true;
 
 	ret = vb2_queue_init(src_vq);
 	if (ret)
-- 
2.20.1


  parent reply	other threads:[~2019-03-20 12:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 12:33 [PATCH v5.1 0/2] add requires_requests bit for stateless codecs hverkuil-cisco
2019-03-20 12:33 ` [PATCH v5.1 1/2] vb2: " hverkuil-cisco
2019-03-20 12:55   ` Mauro Carvalho Chehab
2019-03-20 13:06     ` Hans Verkuil
2019-03-20 13:22       ` Mauro Carvalho Chehab
2019-03-20 12:33 ` hverkuil-cisco [this message]
2019-03-20 12:55   ` [PATCH v5.1 2/2] cedrus: set requires_requests Mauro Carvalho Chehab
2019-03-20 14:23   ` [PATCH v5.1 3/2] media requests: return EBADR instead of EACCES Hans Verkuil
2019-03-20 14:28     ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320123305.5224-3-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).