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

Commit 622a5430 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

adsprpc: optimize number of SGL entries during map create



Set proper DMA segment size and boundary during mem map creation
to reduce number of SGL entries to 1.

Change-Id: I92392e62766c83ab49a4ec217e5762d5601af425
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 5f228f0a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3004,8 +3004,15 @@ static int fastrpc_cb_probe(struct device *dev)
	VERIFY(err, !arm_iommu_attach_device(dev, sess->smmu.mapping));
	if (err)
		goto bail;

	sess->smmu.dev = dev;
	sess->smmu.enabled = 1;
	if (!sess->smmu.dev->dma_parms)
		sess->smmu.dev->dma_parms = devm_kzalloc(sess->smmu.dev,
			sizeof(*sess->smmu.dev->dma_parms), GFP_KERNEL);
	dma_set_max_seg_size(sess->smmu.dev, DMA_BIT_MASK(32));
	dma_set_seg_boundary(sess->smmu.dev, DMA_BIT_MASK(64));

	chan->sesscount++;
	debugfs_global_file = debugfs_create_file("global", 0644, debugfs_root,
							NULL, &debugfs_fops);