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

Commit 10f5c604 authored by Narendra Muppalla's avatar Narendra Muppalla
Browse files

msm: sde: add property to select rotator smmu mapping based on hw version



This change adds device tree property to select the display sde rotator
smmu mapping range based on the HW revision. If property present,
sde rotator will select the full range 4GB, whereas if property
not present, mapping will be limited to the upper 2GB space only.

Change-Id: I511f3c6e46f216dc09facb9d2375f506ced92f9f
Signed-off-by: default avatarNarendra Muppalla <NarendraM@codeaurora.org>
parent a949307d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -527,6 +527,7 @@ int sde_smmu_probe(struct platform_device *pdev)
	char name[MAX_CLIENT_NAME_LEN];
	int mdphtw_llc_enable = 1;
	u32 sid = 0;
	bool smmu_rot_full_map;

	if (!mdata) {
		SDEROT_INFO(
@@ -611,6 +612,13 @@ int sde_smmu_probe(struct platform_device *pdev)
		goto bus_client_destroy;
	}

	smmu_rot_full_map = of_property_read_bool(dev->of_node,
					 "qcom,fullsize-va-map");
	if (smmu_rot_full_map) {
		smmu_domain.start = SZ_128K;
		smmu_domain.size = SZ_4G - SZ_128K;
	}

	sde_smmu->mmu_mapping = arm_iommu_create_mapping(
		&platform_bus_type, smmu_domain.start, smmu_domain.size);
	if (IS_ERR(sde_smmu->mmu_mapping)) {