On Wed, Apr 24, 2024 at 7:25 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > Tomasz, > > I would appreciate it if you can review this series. Sorry, I've been out for the last 2 weeks. Catching up now and should get to this shortly. Best, Tomasz > > Regards, > > Hans > > On 03/04/2024 11:13, Yunke Cao wrote: > > Hi, > > > > This patch set avoids attaching and mapping a dma_buf multiple times when > > several planes in one vb2 buffer share the same dma_buf. > > > > 1/3 and 2/3 refactors __prepare_dmabuf() > > 3/3 adds a flag to avoid duplicated attaching > > > > Changelog since v1: > > - Add patch 1/3 to refactor __prepare_dmabuf() > > - Add patch 2/3 to resolve Tomasz's comment on __vb2_buf_dmabuf_put()'s > > iteration order > > - Fix mem_priv in patch 3/3 > > - Rename duplicated_dbuf to dbuf_duplicated > > > > Yunke Cao (3): > > media: videobuf2-core: release all planes first in __prepare_dmabuf() > > media: videobuf2-core: reverse the iteration order in > > __vb2_buf_dmabuf_put > > media: videobuf2-core: attach once if multiple planes share the same > > dbuf > > > > .../media/common/videobuf2/videobuf2-core.c | 97 +++++++++++-------- > > include/media/videobuf2-core.h | 3 + > > 2 files changed, 62 insertions(+), 38 deletions(-) > > >