summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev')
-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;