[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1187a3f660b092d8a9d5437445155edfc0744a4f.camel@collabora.com>
Date: Tue, 24 Mar 2020 07:17:01 -0300
From: Ezequiel Garcia <ezequiel@...labora.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>,
Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
Cc: Hans Verkuil <hans.verkuil@...co.com>,
Tomasz Figa <tfiga@...omium.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Sakari Ailus <sakari.ailus@....fi>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Pawel Osciak <posciak@...omium.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Helen Koike <helen.koike@...labora.com>,
nicolas.dufresne@...labora.co.uk
Subject: Re: [PATCHv4 04/11] videobuf2: add queue memory consistency
parameter
On Tue, 2020-03-24 at 11:39 +0900, Sergey Senozhatsky wrote:
> On (20/03/20 14:46), Dafna Hirschfeld wrote:
> [..]
> > > +static void set_queue_consistency(struct vb2_queue *q, bool consistent_mem)
> > > +{
> > > + if (!vb2_queue_allows_cache_hints(q))
> > > + return;
> > > +
> > > + if (consistent_mem)
> > > + q->dma_attrs &= ~DMA_ATTR_NON_CONSISTENT;
> > > + else
> > > + q->dma_attrs |= DMA_ATTR_NON_CONSISTENT;
> > > +}
> > > +
> > > int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
> > > - unsigned int *count)
> > > + bool consistent_mem, unsigned int *count)
> > You extended the vb2_core_reqbufs accepting a new boolean that
> > is decided according to the setting of the V4L2_FLAG_MEMORY_NON_CONSISTENT
> > but in the future some other flags might be added, and so I think it
> > is better to replace the boolean with a u32 consisting of all the flags.
>
> Don't have any objections. Can change the `bool' to `u32'.
>
or maybe an enum instead? That would help get a cleaner
interface.
Thanks,
Ezequiel
Powered by blists - more mailing lists