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

Commit 909fc37e authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: enable fb_split feature for dual-dsi panels



Currently fb_split feature is limited to dual-pipe but single
interface, i.e eDP 2560x1600, panels. Extend use of this feature
to dual-dsi panels as well and by default enable equal split to
support dual-dsi portrait panels, i.e 1600x2560. Default settings
will be over-ridden by split settings from device tree if available.

Change-Id: I38279e1af7dcd1278fa203f51b8b33f82d0848af
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 16103798
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
@@ -272,25 +272,33 @@ static ssize_t mdss_fb_get_type(struct device *dev,

static void mdss_fb_parse_dt(struct msm_fb_data_type *mfd)
{
	u32 data[2];
	u32 data[2] = {0};
	u32 panel_xres;
	struct platform_device *pdev = mfd->pdev;

	mfd->splash_logo_enabled = of_property_read_bool(pdev->dev.of_node,
				"qcom,mdss-fb-splash-logo-enabled");

	if (of_property_read_u32_array(pdev->dev.of_node, "qcom,mdss-fb-split",
				       data, 2))
		return;
	if (data[0] && data[1] &&
	    (mfd->panel_info->xres == (data[0] + data[1]))) {
	of_property_read_u32_array(pdev->dev.of_node,
		"qcom,mdss-fb-split", data, 2);

	panel_xres = mfd->panel_info->xres;
	if (data[0] && data[1]) {
		if (mfd->split_display)
			panel_xres *= 2;

		if (panel_xres == data[0] + data[1]) {
			mfd->split_fb_left = data[0];
			mfd->split_fb_right = data[1];
		pr_info("split framebuffer left=%d right=%d\n",
			mfd->split_fb_left, mfd->split_fb_right);
		}
	} else {
		mfd->split_fb_left = 0;
		mfd->split_fb_right = 0;
		if (mfd->split_display)
			mfd->split_fb_left = mfd->split_fb_right = panel_xres;
		else
			mfd->split_fb_left = mfd->split_fb_right = 0;
	}
	pr_info("split framebuffer left=%d right=%d\n",
		mfd->split_fb_left, mfd->split_fb_right);
}

static ssize_t mdss_fb_get_split(struct device *dev,