]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/media/platform/s5p-mfc/s5p_mfc.c
[media] s5p-mfc: Set DMA_ATTR_ALLOC_SINGLE_PAGES
[mirror_ubuntu-bionic-kernel.git] / drivers / media / platform / s5p-mfc / s5p_mfc.c
index 320124352e823e8389e49b5297a57a0d1ae23483..da735cda2882071d6f32bf3f16a69b25b2164c29 100644 (file)
@@ -851,6 +851,11 @@ static int s5p_mfc_open(struct file *file)
                ret = -ENOENT;
                goto err_queue_init;
        }
+       /*
+        * We'll do mostly sequential access, so sacrifice TLB efficiency for
+        * faster allocation.
+        */
+       q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
        q->mem_ops = &vb2_dma_contig_memops;
        q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
        ret = vb2_queue_init(q);
@@ -881,6 +886,12 @@ static int s5p_mfc_open(struct file *file)
         * will keep the value of bytesused intact.
         */
        q->allow_zero_bytesused = 1;
+
+       /*
+        * We'll do mostly sequential access, so sacrifice TLB efficiency for
+        * faster allocation.
+        */
+       q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;
        q->mem_ops = &vb2_dma_contig_memops;
        q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
        ret = vb2_queue_init(q);