diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2014-01-17 22:44:31 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:26:43 -0700 |
| commit | 9318b730bfa79f5bcb364dfe9f4e6956c6a0bb73 (patch) | |
| tree | 7a0f2c1366dd8a0d52ed53c395e16a0ba49a6265 /drivers | |
| parent | 18b81b9908bda53eb70da81a1e44ec63d9bf13ea (diff) | |
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: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index ba11b9edc3fb..697064db450d 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -273,25 +273,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]))) { - 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); + 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]; + } } 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, |
