board: 8064: Make HDMI as primary by default for MPQ
For MPQ CDP and HRD boards, HDMI needs to be the primary display
by default without having to specify it using boot parameters.
This change adds this feature with the added flexibility to
specify any other panel as primary using fastboot parameters.
Change-Id: Ie9c4755acb56dada760e50b804dfe1c3a58a0171
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8064-display.c b/arch/arm/mach-msm/board-8064-display.c
index e17990e..ee1a2ae 100644
--- a/arch/arm/mach-msm/board-8064-display.c
+++ b/arch/arm/mach-msm/board-8064-display.c
@@ -117,7 +117,8 @@
strnlen(MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
PANEL_NAME_MAX_LEN)))
return 0;
- } else if (machine_is_apq8064_cdp()) {
+ } else if (machine_is_apq8064_cdp() ||
+ machine_is_mpq8064_dtv()) {
if (!strncmp(name, LVDS_CHIMEI_PANEL_NAME,
strnlen(LVDS_CHIMEI_PANEL_NAME,
PANEL_NAME_MAX_LEN)))
@@ -977,6 +978,18 @@
void __init apq8064_set_display_params(char *prim_panel, char *ext_panel)
{
+ /*
+ * For certain MPQ boards, HDMI should be set as primary display
+ * by default, with the flexibility to specify any other panel
+ * as a primary panel through boot parameters.
+ */
+ if (machine_is_mpq8064_hrd() || machine_is_mpq8064_cdp()) {
+ pr_debug("HDMI is the primary display by default for MPQ\n");
+ if (!strnlen(prim_panel, PANEL_NAME_MAX_LEN))
+ strlcpy(msm_fb_pdata.prim_panel_name, HDMI_PANEL_NAME,
+ PANEL_NAME_MAX_LEN);
+ }
+
if (strnlen(prim_panel, PANEL_NAME_MAX_LEN)) {
strlcpy(msm_fb_pdata.prim_panel_name, prim_panel,
PANEL_NAME_MAX_LEN);