summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/msm
diff options
context:
space:
mode:
authorAjay Singh Parmar <aparmar@codeaurora.org>2014-03-13 23:42:29 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:28:40 -0700
commit43fe9104f7bdcf80f23ef31f9a6e6147221925ca (patch)
treecf06cc3a67ebceb2d930016f8bb074a3b0ee7765 /drivers/video/fbdev/msm
parent19d2cf48e3aa86847fda5ab0fe64ab6f67a924de (diff)
msm: mdss: hdmi: support for hdmi primary
Set HDMI as primary panel if module command line contains hdmi primary information. Module cmd line is of format: panel=<lk_cfg>:<pan_intf>:<pan_intf_cfg> For HDMI as primary, panel_intf would be "hdmi" Change-Id: I25e37bb019a51c747c6c2a003bcf8d4ccc3a9f91 Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm')
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi.c9
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c9
-rw-r--r--drivers/video/fbdev/msm/mdss_wb.c17
3 files changed, 34 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c
index 8bb5c87bdb9f..4da1530a38e7 100644
--- a/drivers/video/fbdev/msm/mdss_dsi.c
+++ b/drivers/video/fbdev/msm/mdss_dsi.c
@@ -1188,6 +1188,7 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
char panel_cfg[MDSS_MAX_PANEL_LEN];
const char *ctrl_name;
bool cmd_cfg_cont_splash = true;
+ struct mdss_panel_cfg *pan_cfg = NULL;
if (!mdss_is_ready()) {
pr_err("%s: MDP not probed yet!\n", __func__);
@@ -1199,6 +1200,14 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
return -ENOTSUPP;
}
+ pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
+ if (IS_ERR(pan_cfg)) {
+ return PTR_ERR(pan_cfg);
+ } else if (pan_cfg) {
+ pr_debug("%s: HDMI is primary\n", __func__);
+ return -ENODEV;
+ }
+
ctrl_pdata = platform_get_drvdata(pdev);
if (!ctrl_pdata) {
ctrl_pdata = devm_kzalloc(&pdev->dev,
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index 2da415ef82ed..9ba0288eca3e 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -3859,6 +3859,7 @@ static int hdmi_tx_probe(struct platform_device *pdev)
int rc = 0;
struct device_node *of_node = pdev->dev.of_node;
struct hdmi_tx_ctrl *hdmi_ctrl = NULL;
+ struct mdss_panel_cfg *pan_cfg = NULL;
if (!of_node) {
DEV_ERR("%s: FAILED: of_node not found\n", __func__);
@@ -3883,6 +3884,14 @@ static int hdmi_tx_probe(struct platform_device *pdev)
goto failed_dt_data;
}
+ pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
+ if (IS_ERR(pan_cfg)) {
+ return PTR_ERR(pan_cfg);
+ } else if (pan_cfg) {
+ DEV_DBG("%s: HDMI is primary\n", __func__);
+ hdmi_ctrl->pdata.primary = true;
+ }
+
rc = hdmi_tx_init_resource(hdmi_ctrl);
if (rc) {
DEV_ERR("%s: FAILED: resource init. rc=%d\n",
diff --git a/drivers/video/fbdev/msm/mdss_wb.c b/drivers/video/fbdev/msm/mdss_wb.c
index ac97a956127d..4eaecd67c1fe 100644
--- a/drivers/video/fbdev/msm/mdss_wb.c
+++ b/drivers/video/fbdev/msm/mdss_wb.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2014, 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
@@ -122,11 +122,26 @@ static int mdss_wb_probe(struct platform_device *pdev)
{
struct mdss_panel_data *pdata = NULL;
struct mdss_wb_ctrl *wb_ctrl = NULL;
+ struct mdss_panel_cfg *pan_cfg = NULL;
int rc = 0;
if (!pdev->dev.of_node)
return -ENODEV;
+ /*
+ * In case HDMI is configured as primary, do not configure
+ * WB. Currently there is no requirement for any other panel
+ * in case HDMI is primary. Will revisit if WB is needed with
+ * HDMI as primary.
+ */
+ pan_cfg = mdss_panel_intf_type(MDSS_PANEL_INTF_HDMI);
+ if (IS_ERR(pan_cfg)) {
+ return PTR_ERR(pan_cfg);
+ } else if (pan_cfg) {
+ pr_debug("%s: HDMI is primary\n", __func__);
+ return -ENODEV;
+ }
+
wb_ctrl = devm_kzalloc(&pdev->dev, sizeof(*wb_ctrl), GFP_KERNEL);
if (!wb_ctrl)
return -ENOMEM;