On 02/06/2020 14:10, Sergey Senozhatsky wrote: > On (20/06/02 12:27), Hans Verkuil wrote: > [..] >>> Sorry, Hans, do you suggest to have something like this: >>> >>> if (q->memory == VB2_MEMORY_DMABUF) { >>> vb->need_cache_sync_on_finish = 0; >>> vb->need_cache_sync_on_prepare = 0; >>> b->flags &= ~V4L2_BUF_FLAG_NO_CACHE_INVALIDATE; >>> b->flags &= ~V4L2_BUF_FLAG_NO_CACHE_CLEAN; >>> return; >>> } >>> >>> I didn't clear the ->flags there because we clear the vb flush/sync >>> flags: ->need_cache_sync_on_finish/prepare are zeros for DMABUF memory >>> type. Which is equivalent to passing V4L2_BUF_FLAG_NO_CACHE_INVALIDATE >>> V4L2_BUF_FLAG_NO_CACHE_CLEAN. IOW we would clearing both "vb's do cache >>> sync" and request's "do not cache sync". >> >> Ah, yes. In that case the v4l-utils patch is likely wrong. >> Can you take a look at that patch? > > Hans, are we talking about "v4l2-utils: test cache_hints for MMAP queues" > patch? I can take a look, yes. Yes, that's the one. Hans