{
struct rk3288_vpu_dev *vpu = NULL;
DEFINE_DMA_ATTRS(attrs_novm);
+ DEFINE_DMA_ATTRS(attrs_nohugepage);
struct video_device *vfd;
int ret = 0;
goto err_hw_probe;
}
+ /*
+ * We'll do mostly sequential access, so sacrifice TLB efficiency for
+ * faster allocation.
+ */
+ dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, &attrs_novm);
+
dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &attrs_novm);
vpu->alloc_ctx = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
&attrs_novm);
goto err_dma_contig;
}
- vpu->alloc_ctx_vm = vb2_dma_contig_init_ctx(&pdev->dev);
+ dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, &attrs_nohugepage);
+ vpu->alloc_ctx_vm = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
+ &attrs_nohugepage);
if (IS_ERR(vpu->alloc_ctx_vm)) {
ret = PTR_ERR(vpu->alloc_ctx_vm);
goto err_dma_contig_vm;