OSDN Git Service

media: videobuf2: Don't assert held reservation lock for dma-buf mmapping
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 29 May 2023 22:39:30 +0000 (01:39 +0300)
committerDmitry Osipenko <dmitry.osipenko@collabora.com>
Wed, 21 Jun 2023 17:22:20 +0000 (20:22 +0300)
commit6f508c8875702ff865440cfff3929dd36083e8b2
tree88e5d835cc1ee763e10adab5d05d5285686558cb
parent387dc06fd16c9664086188655bef73b7e263bb12
media: videobuf2: Don't assert held reservation lock for dma-buf mmapping

Don't assert held dma-buf reservation lock on memory mapping of exported
buffer.

We're going to change dma-buf mmap() locking policy such that exporters
will have to handle the lock. The previous locking policy caused deadlock
problem for DRM drivers in a case of self-imported dma-bufs once these
drivers are moved to use reservation lock universally. The problem is
solved by moving the lock down to exporters. This patch prepares videobuf2
for the locking policy update.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230529223935.2672495-2-dmitry.osipenko@collabora.com
drivers/media/common/videobuf2/videobuf2-dma-contig.c
drivers/media/common/videobuf2/videobuf2-dma-sg.c
drivers/media/common/videobuf2/videobuf2-vmalloc.c