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

Commit 1b195927 authored by Sachin Bhayare's avatar Sachin Bhayare
Browse files

msm: mdss: Avoid splash buffer allocation from generic heap for MSM8909w



MDP3 driver was allocation the splash buffer from generic CMA heap,
resulting in modem boot failure. Removed mdp3_alloc call and use generic
mdss_alloc implementation to handle splash allocation.

Change-Id: I6850173d29c659c9152d38beac507a79706d1a9d
Signed-off-by: default avatarSachin Bhayare <sachin.bhayare@codeaurora.org>
parent ece627a6
Loading
Loading
Loading
Loading
+0 −43
Original line number Diff line number Diff line
@@ -1482,7 +1482,6 @@ void mdp3_batfet_ctrl(int enable)

void mdp3_enable_regulator(int enable)
{
	msm_mdp3_cx_ctrl(enable);
	mdp3_batfet_ctrl(enable);
}

@@ -2103,47 +2102,6 @@ error:
	return rc;
}

static int mdp3_alloc(struct msm_fb_data_type *mfd)
{
	int ret;
	int dom;
	void *virt;
	phys_addr_t phys;
	size_t size;

	mfd->fbi->screen_base = NULL;
	mfd->fbi->fix.smem_start = 0;
	mfd->fbi->fix.smem_len = 0;

	mdp3_parse_dt_splash(mfd);

	size = mfd->fbi->fix.smem_len;

	dom = mdp3_res->domains[MDP3_IOMMU_DOMAIN_UNSECURE].domain_idx;

	ret = mdss_smmu_dma_alloc_coherent(&mdp3_res->pdev->dev, size,
		&phys, &mfd->iova, &virt, GFP_KERNEL, dom);
	if (ret) {
		pr_err("unable to alloc fbmem size=%zx\n", size);
		return -ENOMEM;
	}

	if (MDSS_LPAE_CHECK(phys)) {
		pr_warn("fb mem phys %pa > 4GB is not supported.\n", &phys);
		mdss_smmu_dma_free_coherent(&mdp3_res->pdev->dev, size, &virt,
				phys, mfd->iova, dom);
		return -ERANGE;
	}

	pr_debug("alloc 0x%zxB @ (%pa phys) (0x%p virt) (%pa iova) for fb%d\n",
		 size, &phys, virt, &mfd->iova, mfd->index);

	mfd->fbi->fix.smem_start = phys;
	mfd->fbi->screen_base = virt;

	return 0;
}

void mdp3_free(struct msm_fb_data_type *mfd)
{
	size_t size = 0;
@@ -2707,7 +2665,6 @@ static int mdp3_probe(struct platform_device *pdev)
	.fb_mem_get_iommu_domain = mdp3_fb_mem_get_iommu_domain,
	.panel_register_done = mdp3_panel_register_done,
	.fb_stride = mdp3_fb_stride,
	.fb_mem_alloc_fnc = mdp3_alloc,
	.check_dsi_status = mdp3_check_dsi_ctrl_status,
	};