]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: videobuf2-core: reverse the iteration order in __vb2_buf_dmabuf_put
authorYunke Cao <yunkec@chromium.org>
Wed, 14 Aug 2024 02:06:42 +0000 (11:06 +0900)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 14 Aug 2024 08:05:32 +0000 (10:05 +0200)
commit1da4e16130d36c712e00bf045f09f194aac964b8
tree0b4f2cd73c461ebb2ff7298a9e01805021c044ce
parent95af7c00f35b9cb0873afb8f191f42e04714ed2a
media: videobuf2-core: reverse the iteration order in __vb2_buf_dmabuf_put

This patch prepares for allowing multiple planes to share the same DMA
buffer attachment.

Release the planes from num_planes - 1 to 0 so that we don't leave invalid
mem_priv pointers behind.

Signed-off-by: Yunke Cao <yunkec@chromium.org>
Acked-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/common/videobuf2/videobuf2-core.c