media: videobuf2-dma-sg: fix vmap callback
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Thu, 23 Nov 2023 22:32:05 +0000 (23:32 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:31:14 +0000 (08:31 +0100)
commit608ca5a60ee47b48fec210aeb7a795a64eb5dcee
treef6ad0b11fe5bdb31437dff3d4e0c486370680371
parent357547b87673ca88455c40aafffeea161207a52a
media: videobuf2-dma-sg: fix vmap callback

For dmabuf import users to be able to use the vaddr from another
videobuf2-dma-sg source, the exporter needs to set a proper vaddr on
vb2_dma_sg_dmabuf_ops_vmap callback. This patch adds vmap on map if
buf->vaddr was not set.

Cc: stable@kernel.org
Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map")
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/common/videobuf2/videobuf2-dma-sg.c