Re: [RFC][PATCHv2 01/12] videobuf2: add cache management members

From: Sergey Senozhatsky
Date: Wed Feb 19 2020 - 03:16:43 EST


On (20/02/19 09:05), Hans Verkuil wrote:
> On 2/4/20 3:56 AM, Sergey Senozhatsky wrote:

[..]

> > diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
> > index a2b2208b02da..026004180440 100644
> > --- a/include/media/videobuf2-core.h
> > +++ b/include/media/videobuf2-core.h
> > @@ -263,6 +263,10 @@ struct vb2_buffer {
> > * after the 'buf_finish' op is called.
> > * copied_timestamp: the timestamp of this capture buffer was copied
> > * from an output buffer.
> > + * need_cache_sync_on_prepare: do not sync/invalidate cache from
> > + * buffer's ->prepare() callback.
> > + * need_cache_sync_on_finish: do not sync/invalidate cache from buffer's
> > + * ->finish() callback.
>
> Shouldn't 'do not' be deleted from the flag descriptions? If the flag is set,
> then you need to sync/validate, right?

Hmm, kind of work both ways. Maybe the wording can be more specific,
e.g. "Do/skip cache sync/invalidation" even more detailed "When set
perform cache sync/invalidation from ..."

-ss