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

Commit a21513d6 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: enable fb_split feature for dual-dsi panels"

parents 9018c53c 909fc37e
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,