Merge "msm: mdss: add mdss smmu fault handler for sdm660"
This commit is contained in:
commit
7e6011e45d
2 changed files with 25 additions and 20 deletions
|
@ -2292,6 +2292,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;
|
||||
}
|
||||
|
||||
|
@ -2734,9 +2737,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;
|
||||
|
||||
|
|
|
@ -600,24 +600,30 @@ 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;
|
||||
|
||||
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",
|
||||
iova, flags, fsynr1, mid);
|
||||
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",
|
||||
iova, flags, fsynr1, mid);
|
||||
|
||||
/* get domain id information */
|
||||
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
|
||||
if (mdss_smmu == mdss_smmu_get_cb(i))
|
||||
break;
|
||||
/* get domain id information */
|
||||
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
|
||||
if (mdss_smmu == mdss_smmu_get_cb(i))
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == MDSS_IOMMU_MAX_DOMAIN)
|
||||
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");
|
||||
}
|
||||
|
||||
if (i == MDSS_IOMMU_MAX_DOMAIN)
|
||||
goto end;
|
||||
|
||||
mdss_mdp_debug_mid(mid);
|
||||
end:
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -844,14 +850,13 @@ int mdss_smmu_probe(struct platform_device *pdev)
|
|||
|
||||
mdss_smmu->base.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");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue