From bfd383cd5fb790ada75ef97d42a8ff9bff58c6c0 Mon Sep 17 00:00:00 2001 From: Pavel Golikov Date: Fri, 24 Jun 2022 15:56:05 +0000 Subject: [PATCH] WIP: media: s5p-mfc: Allow cache hints for queues Passing V4L2_MEMORY_FLAG_NON_COHERENT from userspace significantly improves video rendering performance on Exynos 5422 (Odroid XU4). Signed-off-by: Pavel Golikov --- drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c index e30e54935d79..678323b7b258 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c @@ -876,6 +876,7 @@ static int s5p_mfc_open(struct file *file) q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; + q->allow_cache_hints = 1; ret = vb2_queue_init(q); if (ret) { mfc_err("Failed to initialize videobuf2 queue(capture)\n"); @@ -911,6 +912,7 @@ static int s5p_mfc_open(struct file *file) q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; + q->allow_cache_hints = 1; ret = vb2_queue_init(q); if (ret) { mfc_err("Failed to initialize videobuf2 queue(output)\n");