Skip to content

Commit f5cd42a

Browse files
jc-kynesim6by9
authored andcommitted
hevc_d: Do not map OUTPUT or CAPTURE buffers to kernel
Decoder does not need OUTPUT or CAPTURE buffers mapped into memory. Set the queue dma_attrs to indicate this. Signed-off-by: John Cox <[email protected]>
1 parent f417c82 commit f5cd42a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/media/platform/raspberrypi/hevc_dec/hevc_d_video.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ int hevc_d_queue_init(void *priv, struct vb2_queue *src_vq,
706706

707707
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
708708
src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
709+
src_vq->dma_attrs = DMA_ATTR_NO_KERNEL_MAPPING;
709710
src_vq->drv_priv = ctx;
710711
src_vq->buf_struct_size = sizeof(struct hevc_d_buffer);
711712
src_vq->ops = &hevc_d_qops;
@@ -722,6 +723,7 @@ int hevc_d_queue_init(void *priv, struct vb2_queue *src_vq,
722723

723724
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
724725
dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
726+
dst_vq->dma_attrs = DMA_ATTR_NO_KERNEL_MAPPING;
725727
dst_vq->drv_priv = ctx;
726728
dst_vq->buf_struct_size = sizeof(struct hevc_d_buffer);
727729
dst_vq->min_queued_buffers = 1;

0 commit comments

Comments
 (0)