LinuxTV Patchwork [v5,03/23] cedrus: set requires_requests

login
register
mail settings
Submitter Dafna Hirschfeld
Date March 6, 2019, 9:13 p.m.
Message ID <20190306211343.15302-4-dafna3@gmail.com>
Download mbox | patch
Permalink /patch/54892/
State Under Review
Delegated to: Hans Verkuil
Headers show

Comments

Dafna Hirschfeld - March 6, 2019, 9:13 p.m.
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.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 +
 1 file changed, 1 insertion(+)
Paul Kocialkowski - March 12, 2019, 3:32 p.m.
Hi,

On Wed, 2019-03-06 at 13:13 -0800, Dafna Hirschfeld wrote:
> 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.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Note that this is true for now, but we might need to get rid of the
flag when adding support for decoding JPEG, which may not require the
request API.

Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> ---
>  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)
Hans Verkuil - March 13, 2019, 2:59 p.m.
On 3/12/19 4:32 PM, Paul Kocialkowski wrote:
> Hi,
> 
> On Wed, 2019-03-06 at 13:13 -0800, Dafna Hirschfeld wrote:
>> 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.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> Note that this is true for now, but we might need to get rid of the
> flag when adding support for decoding JPEG, which may not require the
> request API.

I thought about this some more, and the flag can just be set or cleared
whenever a new format is set. I.e. when JPEG is selected, then both the
supports_requests and requires_requests flags can be set to false, and
set to true again when a non-JPEG format is set.

Regards,

	Hans

> 
> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> 
> Cheers,
> 
> Paul
> 
>> ---
>>  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)

Patch

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)

Privacy Policy