This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: videobuf2: always set buffer vb2 pointer
Author:  Sergey Senozhatsky <[email protected]>
Date:    Tue Sep 28 04:46:34 2021 +0100

We need to always link allocated vb2_dc_buf back to vb2_buffer because
we dereference vb2 in prepare() and finish() callbacks.

Signed-off-by: Sergey Senozhatsky <[email protected]>
Tested-by: Chen-Yu Tsai <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 +++
 1 file changed, 3 insertions(+)

---

diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c 
b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
index b052a4e36961..38767791955d 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
@@ -600,6 +600,7 @@ static void *vb2_dc_get_userptr(struct vb2_buffer *vb, 
struct device *dev,
 
        buf->dev = dev;
        buf->dma_dir = vb->vb2_queue->dma_dir;
+       buf->vb = vb;
 
        offset = lower_32_bits(offset_in_page(vaddr));
        vec = vb2_create_framevec(vaddr, size);
@@ -788,6 +789,8 @@ static void *vb2_dc_attach_dmabuf(struct vb2_buffer *vb, 
struct device *dev,
                return ERR_PTR(-ENOMEM);
 
        buf->dev = dev;
+       buf->vb = vb;
+
        /* create attachment for the dmabuf with the user device */
        dba = dma_buf_attach(dbuf, buf->dev);
        if (IS_ERR(dba)) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to