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

Commit aad8eacf authored by raghavendra ambadas's avatar raghavendra ambadas
Browse files

fbdev: mdp3: change iommu map sequence for cont splash



smmu fault occurs during boot up with continuous splash enabled
for video mode panels. Before smmu mapping set the attributes
with EARLY_MAP flag and then attach the iommu map.
This will ensure PA=VA mapping works fine.

Change-Id: I3c3d97997f67ac11c24e6079899b236e9217c4f3
Signed-off-by: default avatarRaghavendra Ambadas <rambad@codeaurora.org>
parent 24abacc7
Loading
Loading
Loading
Loading
+25 −7
Original line number Diff line number Diff line
@@ -1325,13 +1325,30 @@ int mdp3_ctrl_reset(struct msm_fb_data_type *mfd)
	/*Map the splash addr for VIDEO mode panel before smmu attach*/
	if ((mfd->panel.type == MIPI_VIDEO_PANEL) &&
				(mdp3_session->in_splash_screen)) {
		rc = mdss_smmu_set_attribute(MDSS_IOMMU_DOMAIN_UNSECURE,
							EARLY_MAP, 1);
		if (rc) {
			pr_err("mdp3 set attribute failed for early map\n");
			goto reset_error;
		}
		rc = mdp3_iommu_enable(MDP3_CLIENT_DMA_P);
		if (IS_ERR_VALUE((unsigned long)rc)) {
			pr_err("mdp3 iommu attach failed\n");
			goto reset_error;
		}
		rc = mdss_smmu_map(MDSS_IOMMU_DOMAIN_UNSECURE,
				mdp3_res->splash_mem_addr,
				mdp3_res->splash_mem_addr,
				mdp3_res->splash_mem_size,
				IOMMU_READ | IOMMU_NOEXEC);
	}
		if (rc)
			pr_err("iommu memory mapping failed ret=%d\n", rc);
		else
			pr_info("iommu map passed for PA=VA\n");

		rc = mdss_smmu_set_attribute(MDSS_IOMMU_DOMAIN_UNSECURE,
							EARLY_MAP, 0);
	} else {
		rc = mdp3_iommu_enable(MDP3_CLIENT_DMA_P);
		if (rc) {
			pr_err("fail to attach dma iommu\n");
@@ -1339,6 +1356,7 @@ int mdp3_ctrl_reset(struct msm_fb_data_type *mfd)
				mdp3_clk_enable(0, 0);
			goto reset_error;
		}
	}

	vsync_client = mdp3_dma->vsync_client;