[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219081340.GA122464@google.com>
Date: Wed, 19 Feb 2020 17:13:40 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Hans Verkuil <hverkuil@...all.nl>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
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
Subject: Re: [RFC][PATCHv2 02/12] videobuf2: handle V4L2 buffer cache flags
On (20/02/19 09:07), Hans Verkuil wrote:
[..]
> > +static void set_buffer_cache_hints(struct vb2_queue *q,
> > + struct vb2_buffer *vb,
> > + struct v4l2_buffer *b)
> > +{
> > + /*
> > + * DMA exporter should take care of cache syncs, so we can avoid
> > + * explicit ->prepare()/->finish() syncs. For other ->memory types
> > + * we always need ->prepare() or/and ->finish() cache sync.
> > + */
> > + if (q->memory == VB2_MEMORY_DMABUF) {
> > + vb->need_cache_sync_on_finish = 0;
> > + vb->need_cache_sync_on_prepare = 0;
> > + return;
> > + }
> > +
> > + if (!q->allow_cache_hints)
> > + return;
> > +
> > + vb->need_cache_sync_on_prepare = 1;
>
> This needs a comment explaining why prepare is set to 1 by default. I remember
> we discussed this earlier, and the conclusion of that discussion needs to be
> documented here in a comment.
Please ignore this patch. There is a follow up which sets _both_
flags by default. The purpose is to preserve the existing behaviour,
we can do all sorts of incremental changes (clear flags in more cases,
etc.) later on. Do you want me to document this in the code?
-ss
Powered by blists - more mailing lists