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_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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2734,9 +2737,6 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe,
|
||||||
goto update_nobuf;
|
goto update_nobuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
MDSS_XLOG(pipe->num, pipe->multirect.num, pipe->mixer_left->num,
|
|
||||||
pipe->play_cnt, 0x222);
|
|
||||||
|
|
||||||
if (params_changed) {
|
if (params_changed) {
|
||||||
pipe->params_changed = 0;
|
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;
|
(struct mdss_smmu_client *)user_data;
|
||||||
u32 fsynr1, mid, i;
|
u32 fsynr1, mid, i;
|
||||||
|
|
||||||
if (!mdss_smmu || !mdss_smmu->mmu_base)
|
if (!mdss_smmu)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
fsynr1 = readl_relaxed(mdss_smmu->mmu_base + SMMU_CBN_FSYNR1);
|
if (mdss_smmu->mmu_base) {
|
||||||
mid = fsynr1 & 0xff;
|
fsynr1 = readl_relaxed(mdss_smmu->mmu_base + SMMU_CBN_FSYNR1);
|
||||||
pr_err("mdss_smmu: iova:0x%lx flags:0x%x fsynr1: 0x%x mid: 0x%x\n",
|
mid = fsynr1 & 0xff;
|
||||||
iova, flags, fsynr1, mid);
|
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 */
|
/* get domain id information */
|
||||||
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
|
for (i = 0; i < MDSS_IOMMU_MAX_DOMAIN; i++) {
|
||||||
if (mdss_smmu == mdss_smmu_get_cb(i))
|
if (mdss_smmu == mdss_smmu_get_cb(i))
|
||||||
break;
|
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:
|
end:
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
@ -844,14 +850,13 @@ int mdss_smmu_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
mdss_smmu->base.dev = dev;
|
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);
|
address = of_get_address_by_name(pdev->dev.of_node, "mmu_cb", 0, 0);
|
||||||
if (address) {
|
if (address) {
|
||||||
size = address + 1;
|
size = address + 1;
|
||||||
mdss_smmu->mmu_base = ioremap(be32_to_cpu(*address),
|
mdss_smmu->mmu_base = ioremap(be32_to_cpu(*address),
|
||||||
be32_to_cpu(*size));
|
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 {
|
} else {
|
||||||
pr_debug("unable to map context bank base\n");
|
pr_debug("unable to map context bank base\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue