Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c4350c6 authored by Steve Cohen's avatar Steve Cohen
Browse files

msm: sde: avoid segmentation of dma_buf mappings



Ensure dma_buf mappings aren't broken in to multiple segments
by setting the devices segment size and boundary.  This will
improve performance and the sg_dma_len() API will now give
the full buffer size.

Change-Id: Ic8a6ac00e839255bee8b9fb09362b4a5c51d1f83
Signed-off-by: default avatarSteve Cohen <cohens@codeaurora.org>
parent 068d6b16
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -639,6 +639,13 @@ int sde_smmu_probe(struct platform_device *pdev)
		}
	}

	if (!dev->dma_parms)
		dev->dma_parms = devm_kzalloc(dev,
				sizeof(*dev->dma_parms), GFP_KERNEL);

	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
	dma_set_seg_boundary(dev, DMA_BIT_MASK(64));

	iommu_set_fault_handler(sde_smmu->mmu_mapping->domain,
			sde_smmu_fault_handler, (void *)sde_smmu);