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

Commit 7752d708 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: adsprpc: decrease length of IOVA mask for SDSP devices



Two bits are sufficient to append all valid stream IDs for SDSP
fastrpc context banks for sm8150 as a software workaround. This
will eliminate the possibility of invalid IOVA generation.

Change-Id: I66a23d291a40331c0693a8dd31013b8a1ea545c7
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 4b243459
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2990,16 +2990,24 @@ static int fastrpc_cb_probe(struct device *dev)
	if (err)
		goto bail;
	sess = &chan->session[chan->sesscount];
	sess->smmu.cb = iommuspec.args[0] & 0xf;
	sess->used = 0;
	sess->smmu.coherent = of_property_read_bool(dev->of_node,
						"dma-coherent");
	sess->smmu.secure = of_property_read_bool(dev->of_node,
						"qcom,secure-context-bank");

	/* Software workaround for SMMU interconnect HW bug */
	if (cid == SDSP_DOMAIN_ID) {
		sess->smmu.cb = iommuspec.args[0] & 0x3;
		VERIFY(err, sess->smmu.cb);
		if (err)
			goto bail;
		start += ((uint64_t)sess->smmu.cb << 32);
		dma_set_mask(dev, DMA_BIT_MASK(36));
		dma_set_mask(dev, DMA_BIT_MASK(34));
	} else {
		sess->smmu.cb = iommuspec.args[0] & 0xf;
	}

	if (sess->smmu.secure)
		start = 0x60000000;
	VERIFY(err, !IS_ERR_OR_NULL(sess->smmu.mapping =