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

Commit 2c54f4ad authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: attach iommu dynamically for video mode panel"

parents 4825f794 f047ce7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1315,6 +1315,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
		if (!mdp5_data->mdata->batfet)
			mdss_mdp_batfet_ctrl(mdp5_data->mdata, true);
		mdss_mdp_release_splash_pipe(mfd);
		mdss_mdp_splash_cleanup(mfd, true);
		return 0;
	} else if (mfd->panel_info->cont_splash_enabled) {
		mutex_lock(&mdp5_data->list_lock);
+18 −4
Original line number Diff line number Diff line
@@ -253,11 +253,24 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,
	if (!ctl)
		return -EINVAL;

	if (mfd->splash_info.iommu_dynamic_attached ||
			!mfd->panel_info->cont_splash_enabled)
	if (!mfd->panel_info->cont_splash_enabled ||
		(mfd->splash_info.iommu_dynamic_attached && !use_borderfill)) {
		if (mfd->splash_info.iommu_dynamic_attached &&
			use_borderfill) {
			mdss_mdp_splash_unmap_splash_mem(mfd);
			memblock_free(mdp5_data->splash_mem_addr,
					mdp5_data->splash_mem_size);
			mdss_free_bootmem(mdp5_data->splash_mem_addr,
					mdp5_data->splash_mem_size);
		}
		goto end;
	}

	/* 1-to-1 mapping */
	mdss_mdp_splash_iommu_attach(mfd);

	if (use_borderfill && mdp5_data->handoff) {
	if (use_borderfill && mdp5_data->handoff &&
		!mfd->splash_info.iommu_dynamic_attached) {
		/*
		 * Set up border-fill on the handed off pipes.
		 * This is needed to ensure that there are no memory
@@ -293,7 +306,8 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,

	mdss_mdp_ctl_splash_finish(ctl, mdp5_data->handoff);

	if (mdp5_data->splash_mem_addr) {
	if (mdp5_data->splash_mem_addr &&
		!mfd->splash_info.iommu_dynamic_attached) {
		/* Give back the reserved memory to the system */
		memblock_free(mdp5_data->splash_mem_addr,
					mdp5_data->splash_mem_size);