summaryrefslogtreecommitdiff
path: root/drivers/media/common/videobuf2/videobuf2-dma-sg.c
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2023-05-30 01:39:30 +0300
committerDmitry Osipenko <dmitry.osipenko@collabora.com>2023-06-21 20:22:20 +0300
commit6f508c8875702ff865440cfff3929dd36083e8b2 (patch)
tree88e5d835cc1ee763e10adab5d05d5285686558cb /drivers/media/common/videobuf2/videobuf2-dma-sg.c
parent387dc06fd16c9664086188655bef73b7e263bb12 (diff)
downloadlinux-6f508c8875702ff865440cfff3929dd36083e8b2.tar.xz
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
Diffstat (limited to 'drivers/media/common/videobuf2/videobuf2-dma-sg.c')
-rw-r--r--drivers/media/common/videobuf2/videobuf2-dma-sg.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
index 183037fb1273..28f3fdfe23a2 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
@@ -10,7 +10,6 @@
* the Free Software Foundation.
*/
-#include <linux/dma-resv.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/refcount.h>
@@ -498,8 +497,6 @@ static int vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf,
static int vb2_dma_sg_dmabuf_ops_mmap(struct dma_buf *dbuf,
struct vm_area_struct *vma)
{
- dma_resv_assert_held(dbuf->resv);
-
return vb2_dma_sg_mmap(dbuf->priv, vma);
}