aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2019-02-13 21:48:53 -0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-03-22 21:31:53 -0700
commitbf2d3733f1c4b23219982add8f708992f89eba97 (patch)
tree87c22123653831b8c1f47421eeafdfc2c2ece627
parentda9088aa5cc318dbd95adead8a58df7d62437fa0 (diff)
downloadkernel-tracking-qcomlt-iommu.tar.gz
HACK: iommu: arm-smmu: Disable MDP INTF 1tracking-qcomlt-iommu
The boot splash or EFI framebuffer is driven to the screen by MDP INTF 1, but initializing the SMMU will cause the MDP to loose access to the framebuffer and crash the device. Stopping the MDP interface before initializing the SMMU prevents this issue. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r--drivers/iommu/arm-smmu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 41abc34acd5a..740439cd7030 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -2309,6 +2309,22 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
struct arm_smmu_device *smmu;
struct device *dev = &pdev->dev;
int num_irqs, i, err;
+ void __iomem *mdp_intf;
+
+ /*
+ * HACK: Booting the SDM845 with splash screen means that the MDP is
+ * pulling data from the framebuffer, which is remapped in the SMMU.
+ * Initializing the SMMU will remove this mapping and cause a sudden
+ * restart. The dependencies to start the display clocks are not yet in
+ * place. This hack just stops the MDP before initializing the SMMU,
+ * allowing us to rely on the bootloader to initialize the necessary
+ * clocks.
+ */
+ if (of_device_is_compatible(dev->of_node, "qcom,sdm845-smmu-500")) {
+ mdp_intf = ioremap(0xae6b800, 0x300);
+ writel(0, mdp_intf + 0);
+ iounmap(mdp_intf);
+ }
smmu = devm_kzalloc(dev, sizeof(*smmu), GFP_KERNEL);
if (!smmu) {