lkml.org 
[lkml]   [2020]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 02/11] videobuf2: handle V4L2 buffer cache flags
On (20/02/27 12:58), Hans Verkuil wrote:
[..]
> > There are two possible alternative approaches:
> > - The first one is to move cache sync from ->finish() to dqbuf().
> > But this breaks some drivers, that need to fix-up buffers before
> > dequeueing them.
> >
> > - The second one is to move ->finish() call from ->done() to dqbuf.
>
> It's not clear what the purpose is of describing these alternative approaches.
> I'd just drop that. It's a bit confusing.

OK.

> > +/**
> > + * vb2_queue_allows_cache_hints() - Return true if the queue allows cache
> > + * and memory consistency hints.
> > + *
> > + * @q: pointer to &struct vb2_queue with videobuf2 queue
> > + */
> > +static inline bool vb2_queue_allows_cache_hints(struct vb2_queue *q)
> > +{
> > + return (q->allow_cache_hints != 0) && (q->memory == VB2_MEMORY_MMAP);
>
> Simply to:
>
> return q->allow_cache_hints && q->memory == VB2_MEMORY_MMAP;
>

OK. I saw vb2_is_busy()

static inline bool vb2_is_busy(struct vb2_queue *q)
{
return (q->num_buffers > 0);
}

in the very same header file and concluded that maybe this is the
preferred style.

-ss

\
 
 \ /
  Last update: 2020-02-28 02:21    [W:0.074 / U:4.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site