mdss: share fb device's primary vs secondary selection info

FrameBuffer device clients assume that first FB device (fb0)
is primary and rest are secondary/external. This binds the
fb devices to fix probe order. For Example: Assumption breaks
when DSI probes first but selected as secondary interface and
HDMI probes later but selected as primary interface. Ideally,
MDSS driver should share each device's primary vs secondary
interface selection with client. This change fixes it.

Change-Id: I17ae8fef9604edf60ddbe22f8413d6764a5a1be4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2014-10-20 12:30:02 -07:00 committed by David Keitel
parent cf51473bac
commit b9a2fe27d1
5 changed files with 12 additions and 6 deletions

View file

@ -516,6 +516,7 @@ static int mdss_dsi_get_panel_cfg(char *panel_cfg,
pr_debug("%s:%d: cfg:[%s]\n", __func__, __LINE__,
pan_cfg->arg_cfg);
ctrl->panel_data.panel_info.is_prim_panel = true;
rc = strlcpy(panel_cfg, pan_cfg->arg_cfg,
sizeof(pan_cfg->arg_cfg));
return rc;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -1121,6 +1121,7 @@ static int mdss_edp_probe(struct platform_device *pdev)
pr_err("Failed to get mdss utility functions\n");
return -ENODEV;
}
edp_drv->panel_data.panel_info.is_prim_panel = true;
mdss_edp_hw.irq_info = mdss_intr_line();
if (mdss_edp_hw.irq_info == NULL) {

View file

@ -2,7 +2,7 @@
* Core MDSS framebuffer driver.
*
* Copyright (C) 2007 Google Incorporated
* Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@ -518,13 +518,14 @@ static ssize_t mdss_fb_get_panel_info(struct device *dev,
ret = scnprintf(buf, PAGE_SIZE,
"pu_en=%d\nxstart=%d\nwalign=%d\nystart=%d\nhalign=%d\n"
"min_w=%d\nmin_h=%d\nroi_merge=%d\ndyn_fps_en=%d\n"
"min_fps=%d\nmax_fps=%d\npanel_name=%s\n",
"min_fps=%d\nmax_fps=%d\npanel_name=%s\n"
"primary_panel=%d\n",
pinfo->partial_update_enabled, pinfo->xstart_pix_align,
pinfo->width_pix_align, pinfo->ystart_pix_align,
pinfo->height_pix_align, pinfo->min_width,
pinfo->min_height, pinfo->partial_update_roi_merge,
pinfo->dynamic_fps, pinfo->min_fps, pinfo->max_fps,
pinfo->panel_name);
pinfo->panel_name, pinfo->is_prim_panel);
return ret;
}

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -4200,6 +4200,7 @@ static int hdmi_tx_probe(struct platform_device *pdev)
hdmi_ctrl->pdata.primary = true;
hdmi_ctrl->vid_cfg.vic = vic;
hdmi_ctrl->panel_data.panel_info.is_prim_panel = true;
}
hdmi_ctrl->mdss_util = mdss_get_util_intf();

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -414,6 +414,8 @@ struct mdss_panel_info {
bool is_lpm_mode;
bool is_split_display;
bool is_prim_panel;
char panel_name[MDSS_MAX_PANEL_LEN];
struct mdss_mdp_pp_tear_check te;