[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YP4Sfo0PjLokYi3B@google.com>
Date: Mon, 26 Jul 2021 10:40:14 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Tomasz Figa <tfiga@...omium.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Ricardo Ribalda <ribalda@...omium.org>,
Christoph Hellwig <hch@....de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Collabora Kernel ML <kernel@...labora.com>
Subject: Re: [PATCHv3 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT
flag
On (21/07/22 19:33), Dafna Hirschfeld wrote:
[..]
> > int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)
> > {
> > int ret = vb2_verify_memory_type(q, req->memory, req->type);
> > + u32 flags = req->flags;
> > fill_buf_caps(q, &req->capabilities);
> > - return ret ? ret : vb2_core_reqbufs(q, req->memory, 0, &req->count);
> > + validate_memory_flags(q, req->memory, &flags);
> > + req->flags = flags;
>
> you can do instead
>
> validate_memory_flags(q, req->memory, &req->flags);
->flags are u32 for create-bufs and u8 for reqi-bufs. So `*flags = <value>`
can write to ->reserved[] for req-bufs (if the value is huge enough).
Powered by blists - more mailing lists