summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt5
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-edp.txt1
-rw-r--r--Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt1
-rw-r--r--drivers/video/fbdev/msm/mdp3.c23
-rw-r--r--drivers/video/fbdev/msm/mdss.h1
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi.c11
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi.h3
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_panel.c11
-rw-r--r--drivers/video/fbdev/msm/mdss_edp.c4
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c11
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c50
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_hwio.h5
-rw-r--r--drivers/video/fbdev/msm/mdss_panel.h10
-rw-r--r--drivers/video/fbdev/msm/mdss_util.c1
14 files changed, 82 insertions, 55 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
index 873df50b468d..b85b7a690546 100644
--- a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
@@ -79,11 +79,6 @@ then 3 options can be tried.
Optional properties:
- qcom,mdss-dsi-panel-name: A string used as a descriptive name of the panel
-- qcom,cont-splash-enabled: Boolean used to enable continuous splash mode.
- If this property is specified, it is required to
- to specify the memory reserved for the splash
- screen using the qcom,memblock-reserve binding
- for the framebuffer device attached to the panel.
- qcom,cmd-sync-wait-broadcast: Boolean used to broadcast dcs command to panels.
- qcom,mdss-dsi-fbc-enable: Boolean used to enable frame buffer compression mode.
- qcom,mdss-dsi-fbc-slice-height: Slice height(in lines) of compressed block.
diff --git a/Documentation/devicetree/bindings/fb/mdss-edp.txt b/Documentation/devicetree/bindings/fb/mdss-edp.txt
index 8b9940f3f6cf..882047a43fc9 100644
--- a/Documentation/devicetree/bindings/fb/mdss-edp.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-edp.txt
@@ -30,7 +30,6 @@ Optional properties
Optional properties:
-- qcom,cont-splash-enabled: Boolean used to enable continuous splash mode.
- qcom,mdss-brightness-max-level: Specifies the max brightness level supported.
255 = default value.
diff --git a/Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt b/Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt
index ae7a6c157e5a..779adccfd95c 100644
--- a/Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt
+++ b/Documentation/devicetree/bindings/fb/msm-hdmi-tx.txt
@@ -82,7 +82,6 @@ Example:
qcom,hdmi-tx-ddc-clk = <&msmgpio 32 0>;
qcom,hdmi-tx-ddc-data = <&msmgpio 33 0>;
qcom,hdmi-tx-hpd = <&msmgpio 34 0>;
- qcom,cont-splash-enabled;
qcom,hdmi-tx-mux-lpm = <&msmgpio 27 0>;
qcom,hdmi-tx-mux-en = <&msmgpio 83 0>;
diff --git a/drivers/video/fbdev/msm/mdp3.c b/drivers/video/fbdev/msm/mdp3.c
index 8bd80cd3d14d..5c4bd238791b 100644
--- a/drivers/video/fbdev/msm/mdp3.c
+++ b/drivers/video/fbdev/msm/mdp3.c
@@ -1402,6 +1402,28 @@ int mdp3_iommu_disable()
return rc;
}
+int mdp3_panel_get_intf_status(u32 disp_num, u32 intf_type)
+{
+ int rc = 0, status = 0;
+
+ if (intf_type != MDSS_PANEL_INTF_DSI)
+ return 0;
+
+ mdp3_clk_update(MDP3_CLK_AHB, 1);
+ mdp3_clk_update(MDP3_CLK_AXI, 1);
+ mdp3_clk_update(MDP3_CLK_MDP_CORE, 1);
+
+ status = (MDP3_REG_READ(MDP3_REG_DMA_P_CONFIG) & 0x180000);
+ /* DSI video mode or command mode */
+ rc = (status == 0x180000) || (status == 0x080000);
+
+ mdp3_clk_update(MDP3_CLK_AHB, 0);
+ mdp3_clk_update(MDP3_CLK_AXI, 0);
+ mdp3_clk_update(MDP3_CLK_MDP_CORE, 0);
+
+ return rc;
+}
+
int mdp3_iommu_ctrl(int enable)
{
int rc;
@@ -2026,6 +2048,7 @@ static int mdp3_probe(struct platform_device *pdev)
mdp3_res->mdss_util->iommu_ctrl = mdp3_iommu_ctrl;
mdp3_res->mdss_util->bus_scale_set_quota = mdp3_bus_scale_set_quota;
mdp3_res->mdss_util->panel_intf_type = mdp3_panel_intf_type;
+ mdp3_res->mdss_util->panel_intf_status = mdp3_panel_get_intf_status;
rc = mdp3_parse_dt(pdev);
if (rc)
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h
index a5fff43680db..9e77ce152b38 100644
--- a/drivers/video/fbdev/msm/mdss.h
+++ b/drivers/video/fbdev/msm/mdss.h
@@ -481,6 +481,7 @@ struct mdss_util_intf {
int (*iommu_ctrl)(int enable);
void (*bus_bandwidth_ctrl)(int enable);
int (*bus_scale_set_quota)(int client, u64 ab_quota, u64 ib_quota);
+ int (*panel_intf_status)(u32 disp_num, u32 intf_type);
struct mdss_panel_cfg* (*panel_intf_type)(int intf_val);
};
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c
index 9322151997ff..9a20d728eb51 100644
--- a/drivers/video/fbdev/msm/mdss_dsi.c
+++ b/drivers/video/fbdev/msm/mdss_dsi.c
@@ -2288,7 +2288,6 @@ static struct device_node *mdss_dsi_config_panel(struct platform_device *pdev)
struct mdss_dsi_ctrl_pdata *ctrl_pdata = platform_get_drvdata(pdev);
char panel_cfg[MDSS_MAX_PANEL_LEN];
struct device_node *dsi_pan_node = NULL;
- bool cmd_cfg_cont_splash = true;
int rc = 0;
if (!ctrl_pdata) {
@@ -2311,9 +2310,7 @@ static struct device_node *mdss_dsi_config_panel(struct platform_device *pdev)
return NULL;
}
- cmd_cfg_cont_splash = mdss_panel_get_boot_cfg() ? true : false;
-
- rc = mdss_dsi_panel_init(dsi_pan_node, ctrl_pdata, cmd_cfg_cont_splash);
+ rc = mdss_dsi_panel_init(dsi_pan_node, ctrl_pdata);
if (rc) {
pr_err("%s: dsi panel init failed\n", __func__);
of_node_put(dsi_pan_node);
@@ -3453,6 +3450,12 @@ int dsi_panel_device_register(struct platform_device *ctrl_pdev,
}
}
+ pinfo->cont_splash_enabled =
+ ctrl_pdata->mdss_util->panel_intf_status(pinfo->pdest,
+ MDSS_PANEL_INTF_DSI) ? true : false;
+
+ pr_info("%s: Continuous splash %s\n", __func__,
+ pinfo->cont_splash_enabled ? "enabled" : "disabled");
rc = mdss_register_panel(ctrl_pdev, &(ctrl_pdata->panel_data));
if (rc) {
diff --git a/drivers/video/fbdev/msm/mdss_dsi.h b/drivers/video/fbdev/msm/mdss_dsi.h
index 098b585f35af..0f372f17fbe2 100644
--- a/drivers/video/fbdev/msm/mdss_dsi.h
+++ b/drivers/video/fbdev/msm/mdss_dsi.h
@@ -598,8 +598,7 @@ void mdss_dsi_get_hw_revision(struct mdss_dsi_ctrl_pdata *ctrl);
u32 mdss_dsi_panel_cmd_read(struct mdss_dsi_ctrl_pdata *ctrl, char cmd0,
char cmd1, void (*fxn)(int), char *rbuf, int len);
int mdss_dsi_panel_init(struct device_node *node,
- struct mdss_dsi_ctrl_pdata *ctrl_pdata,
- bool cmd_cfg_cont_splash);
+ struct mdss_dsi_ctrl_pdata *ctrl_pdata);
int mdss_dsi_panel_timing_switch(struct mdss_dsi_ctrl_pdata *ctrl_pdata,
struct mdss_panel_timing *timing);
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c
index d22cf7404882..3c1815acb828 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_panel.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c
@@ -1817,9 +1817,6 @@ static int mdss_dsi_parse_panel_features(struct device_node *np,
pinfo = &ctrl->panel_data.panel_info;
- pinfo->cont_splash_enabled = of_property_read_bool(np,
- "qcom,cont-splash-enabled");
-
pinfo->partial_update_supported = of_property_read_bool(np,
"qcom,partial-update-enabled");
if (pinfo->mipi.mode == DSI_CMD_MODE) {
@@ -2530,8 +2527,7 @@ error:
}
int mdss_dsi_panel_init(struct device_node *node,
- struct mdss_dsi_ctrl_pdata *ctrl_pdata,
- bool cmd_cfg_cont_splash)
+ struct mdss_dsi_ctrl_pdata *ctrl_pdata)
{
int rc = 0;
static const char *panel_name;
@@ -2560,11 +2556,6 @@ int mdss_dsi_panel_init(struct device_node *node,
return rc;
}
- if (!cmd_cfg_cont_splash || pinfo->sim_panel_mode)
- pinfo->cont_splash_enabled = false;
- pr_info("%s: Continuous splash %s\n", __func__,
- pinfo->cont_splash_enabled ? "enabled" : "disabled");
-
pinfo->dynamic_switch_pending = false;
pinfo->is_lpm_mode = false;
pinfo->esd_rdy = false;
diff --git a/drivers/video/fbdev/msm/mdss_edp.c b/drivers/video/fbdev/msm/mdss_edp.c
index 97c862c5bb16..add757c34e50 100644
--- a/drivers/video/fbdev/msm/mdss_edp.c
+++ b/drivers/video/fbdev/msm/mdss_edp.c
@@ -1172,8 +1172,8 @@ static int mdss_edp_probe(struct platform_device *pdev)
mdss_edp_event_setup(edp_drv);
- edp_drv->cont_splash = of_property_read_bool(pdev->dev.of_node,
- "qcom,cont-splash-enabled");
+ edp_drv->cont_splash = edp_drv->mdss_util->panel_intf_status(DISPLAY_1,
+ MDSS_PANEL_INTF_EDP) ? true : false;
/* only need aux and ahb clock for aux channel */
mdss_edp_prepare_aux_clocks(edp_drv);
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index c6dced49ef04..859fd396ca14 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -4641,7 +4641,6 @@ static int hdmi_tx_get_dt_data(struct platform_device *pdev,
int i, rc = 0;
struct device_node *of_node = NULL;
struct hdmi_tx_ctrl *hdmi_ctrl = platform_get_drvdata(pdev);
- bool splash_en;
if (!pdev || !pdata) {
DEV_ERR("%s: invalid input\n", __func__);
@@ -4698,12 +4697,10 @@ static int hdmi_tx_get_dt_data(struct platform_device *pdev,
pdata->cond_power_on = of_property_read_bool(pdev->dev.of_node,
"qcom,conditional-power-on");
- splash_en = of_property_read_bool(pdev->dev.of_node,
- "qcom,cont-splash-enabled");
-
- /* cont splash screen is supported only for hdmi primary */
- pdata->cont_splash_enabled =
- hdmi_ctrl->pdata.primary ? splash_en : false;
+ if (!pdata->cont_splash_enabled)
+ pdata->cont_splash_enabled =
+ hdmi_ctrl->mdss_util->panel_intf_status(DISPLAY_2,
+ MDSS_PANEL_INTF_HDMI) ? true : false;
return rc;
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c
index aa3dc467b054..32b00171a5a4 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp.c
@@ -1664,6 +1664,42 @@ static int mdss_mdp_register_sysfs(struct mdss_data_type *mdata)
return rc;
}
+int mdss_panel_get_intf_status(u32 disp_num, u32 intf_type)
+{
+ int rc, intf_status = 0;
+ struct mdss_data_type *mdata = mdss_mdp_get_mdata();
+
+ if (!mdss_res || !mdss_res->pan_cfg.init_done)
+ return -EPROBE_DEFER;
+
+ if (mdss_res->handoff_pending) {
+ mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
+ intf_status = readl_relaxed(mdata->mdp_base +
+ MDSS_MDP_REG_DISP_INTF_SEL);
+ mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
+ if (intf_type == MDSS_PANEL_INTF_DSI) {
+ if (disp_num == DISPLAY_1)
+ rc = (intf_status & MDSS_MDP_INTF_DSI0_SEL);
+ else if (disp_num == DISPLAY_2)
+ rc = (intf_status & MDSS_MDP_INTF_DSI1_SEL);
+ else
+ rc = 0;
+ } else if (intf_type == MDSS_PANEL_INTF_EDP) {
+ intf_status &= MDSS_MDP_INTF_EDP_SEL;
+ rc = (intf_status == MDSS_MDP_INTF_EDP_SEL);
+ } else if (intf_type == MDSS_PANEL_INTF_HDMI) {
+ intf_status &= MDSS_MDP_INTF_HDMI_SEL;
+ rc = (intf_status == MDSS_MDP_INTF_HDMI_SEL);
+ } else {
+ rc = 0;
+ }
+ } else {
+ rc = 0;
+ }
+
+ return rc;
+}
+
static int mdss_mdp_probe(struct platform_device *pdev)
{
struct resource *res;
@@ -1708,6 +1744,7 @@ static int mdss_mdp_probe(struct platform_device *pdev)
mdss_res->mdss_util->bus_scale_set_quota = mdss_bus_scale_set_quota;
mdss_res->mdss_util->bus_bandwidth_ctrl = mdss_bus_bandwidth_ctrl;
mdss_res->mdss_util->panel_intf_type = mdss_panel_intf_type;
+ mdss_res->mdss_util->panel_intf_status = mdss_panel_get_intf_status;
rc = msm_dss_ioremap_byname(pdev, &mdata->mdss_io, "mdp_phys");
if (rc) {
@@ -3522,19 +3559,6 @@ struct irq_info *mdss_intr_line()
}
EXPORT_SYMBOL(mdss_intr_line);
-int mdss_panel_get_boot_cfg(void)
-{
- int rc;
-
- if (!mdss_res || !mdss_res->pan_cfg.init_done)
- return -EPROBE_DEFER;
- if (mdss_res->handoff_pending)
- rc = 1;
- else
- rc = 0;
- return rc;
-}
-
int mdss_mdp_wait_for_xin_halt(u32 xin_id, bool is_vbif_nrt)
{
void __iomem *vbif_base;
diff --git a/drivers/video/fbdev/msm/mdss_mdp_hwio.h b/drivers/video/fbdev/msm/mdss_mdp_hwio.h
index 7f3dbcaada2a..19f6030ae688 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_hwio.h
+++ b/drivers/video/fbdev/msm/mdss_mdp_hwio.h
@@ -290,6 +290,11 @@ enum mdss_mdp_sspp_chroma_samp_type {
#define MDSS_MDP_NUM_WB_MIXERS 2
#define MDSS_MDP_CTL_X_LAYER_5 0x24
+#define MDSS_MDP_INTF_EDP_SEL (BIT(3) | BIT(1))
+#define MDSS_MDP_INTF_HDMI_SEL (BIT(25) | BIT(24))
+#define MDSS_MDP_INTF_DSI0_SEL BIT(8)
+#define MDSS_MDP_INTF_DSI1_SEL BIT(16)
+
enum mdss_mdp_mixer_intf_index {
MDSS_MDP_INTF_LAYERMIXER0,
MDSS_MDP_INTF_LAYERMIXER1,
diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h
index 81277c14c3ef..b8aabf1f7880 100644
--- a/drivers/video/fbdev/msm/mdss_panel.h
+++ b/drivers/video/fbdev/msm/mdss_panel.h
@@ -881,16 +881,6 @@ static inline bool mdss_panel_is_power_on_ulp(int panel_power_state)
struct mdss_panel_cfg *mdss_panel_intf_type(int intf_val);
/**
- * mdss_panel_get_boot_cfg() - checks if bootloader config present
- *
- * Function returns true if bootloader has configured the parameters
- * for primary controller and panel config data.
- *
- * returns true if bootloader configured, else false
- */
-int mdss_panel_get_boot_cfg(void);
-
-/**
* mdss_is_ready() - checks if mdss is probed and ready
*
* Checks if mdss resources have been initialized
diff --git a/drivers/video/fbdev/msm/mdss_util.c b/drivers/video/fbdev/msm/mdss_util.c
index bde9add2c6dd..965be3bf09db 100644
--- a/drivers/video/fbdev/msm/mdss_util.c
+++ b/drivers/video/fbdev/msm/mdss_util.c
@@ -151,6 +151,7 @@ struct mdss_util_intf mdss_util = {
.bus_bandwidth_ctrl = NULL,
.bus_scale_set_quota = NULL,
.panel_intf_type = NULL,
+ .panel_intf_status = NULL,
.mdp_probe_done = false
};