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

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

msm: mdp3: Map splash addr before smmu attach



During bootup while continuous splash is enabled for video mode panel,
iommmu page fault seen for first iommu attach. As DMA transfer is
active during continuous splash, need to map the splash addr before
iommu is attached.

Change-Id: I7596a5bfb0fe36d037c63f9b7fff2dce7ab8998f
Signed-off-by: default avatarRaghavendra Ambadas <rambad@codeaurora.org>
parent 579d5fea
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2184,6 +2184,12 @@ void mdp3_release_splash_memory(struct msm_fb_data_type *mfd)
{
	/* Give back the reserved memory to the system */
	if (mdp3_res->splash_mem_addr) {
		if ((mfd->panel.type == MIPI_VIDEO_PANEL) &&
				(mdp3_res->cont_splash_en)) {
			mdss_smmu_unmap(MDSS_IOMMU_DOMAIN_UNSECURE,
				mdp3_res->splash_mem_addr,
				mdp3_res->splash_mem_size);
		}
		mdp3_free(mfd);
		pr_debug("mdp3_release_splash_memory\n");
		memblock_free(mdp3_res->splash_mem_addr,
+11 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <linux/dma-buf.h>
#include <linux/pm_runtime.h>
#include <linux/sw_sync.h>
#include <linux/iommu.h>

#include "mdp3_ctrl.h"
#include "mdp3.h"
@@ -1173,6 +1174,16 @@ int mdp3_ctrl_reset(struct msm_fb_data_type *mfd)
		mdp3_qos_remapper_setup(panel);
	}

	/*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_map(MDSS_IOMMU_DOMAIN_UNSECURE,
				mdp3_res->splash_mem_addr,
				mdp3_res->splash_mem_addr,
				mdp3_res->splash_mem_size,
				IOMMU_READ | IOMMU_NOEXEC);
	}

	rc = mdp3_iommu_enable(MDP3_CLIENT_DMA_P);
	if (rc) {
		pr_err("fail to attach dma iommu\n");