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

Commit 5baed0b2 authored by Raviteja Tamatam's avatar Raviteja Tamatam Committed by Abhijith Desai
Browse files

msm: mdss: add mdss smmu fault handler for sdm660



Add support to register smmu fault handler for MDSS
context banks to dump necessary debug information.

Change-Id: I955b4a33dbce0e66adee199e0a1272b25aa4392d
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent 93a20642
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2291,6 +2291,9 @@ static int mdss_mdp_src_addr_setup(struct mdss_mdp_pipe *pipe,
		mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SSPP_SRC3_ADDR, addr[2]);
	}

	MDSS_XLOG(pipe->num, pipe->multirect.num, pipe->mixer_left->num,
		pipe->play_cnt, addr[0], addr[1], addr[2], addr[3]);

	return 0;
}

@@ -2678,9 +2681,6 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe,
		goto update_nobuf;
	}

	MDSS_XLOG(pipe->num, pipe->multirect.num, pipe->mixer_left->num,
						pipe->play_cnt, 0x222);

	if (params_changed) {
		pipe->params_changed = 0;

+21 −16
Original line number Diff line number Diff line
@@ -495,9 +495,10 @@ int mdss_smmu_fault_handler(struct iommu_domain *domain, struct device *dev,
		(struct mdss_smmu_client *)user_data;
	u32 fsynr1, mid, i;

	if (!mdss_smmu || !mdss_smmu->mmu_base)
	if (!mdss_smmu)
		goto end;

	if (mdss_smmu->mmu_base) {
		fsynr1 = readl_relaxed(mdss_smmu->mmu_base + SMMU_CBN_FSYNR1);
		mid = fsynr1 & 0xff;
		pr_err("mdss_smmu: iova:0x%lx flags:0x%x fsynr1: 0x%x mid: 0x%x\n",
@@ -513,6 +514,11 @@ int mdss_smmu_fault_handler(struct iommu_domain *domain, struct device *dev,
			goto end;

		mdss_mdp_debug_mid(mid);
	} else {
		pr_err("mdss_smmu: iova:0x%lx flags:0x%x\n",
			iova, flags);
		MDSS_XLOG_TOUT_HANDLER("mdp");
	}
end:
	return -ENODEV;
}
@@ -861,14 +867,13 @@ int mdss_smmu_probe(struct platform_device *pdev)

	mdss_smmu->dev = dev;

	iommu_set_fault_handler(mdss_smmu->mmu_mapping->domain,
			mdss_smmu_fault_handler, mdss_smmu);
	address = of_get_address_by_name(pdev->dev.of_node, "mmu_cb", 0, 0);
	if (address) {
		size = address + 1;
		mdss_smmu->mmu_base = ioremap(be32_to_cpu(*address),
			be32_to_cpu(*size));
		if (mdss_smmu->mmu_base)
			iommu_set_fault_handler(mdss_smmu->mmu_mapping->domain,
				mdss_smmu_fault_handler, mdss_smmu);
	} else {
		pr_debug("unable to map context bank base\n");
	}