msm: mdss: handle continuous splash screen for dual DSI cases

In the current implementation, the continuous splash screen flag
is set based on whether there is handoff pending in MDP or not.
With the dual DSI use-case now in place, there is possibility that
the primary panel has continuous splash enabled whereas the other
panel doesn't have the feature enabled. Add change to take care of
this by checking if a particular interface is enabled in MDP_INTF_SEL
register to set the cont. splash screen flag. Remove the DT entries
for continuous splash screen since it is no longer needed after this
change.

Change-Id: I4d617386c8f5d166de76b79a10680d024320a889
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
[cip@codeaurora.org: Removed .dtsi changes]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
This commit is contained in:
Padmanabhan Komanduru 2015-07-07 20:57:52 +05:30 committed by David Keitel
parent 6ffee7b10f
commit b58ac1481a
14 changed files with 82 additions and 55 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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>;

View file

@ -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)

View file

@ -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);
};

View file

@ -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) {

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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,

View file

@ -880,16 +880,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
*

View file

@ -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
};