summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorAravind Venkateswaran <aravindh@codeaurora.org>2015-01-14 23:19:03 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:39:15 -0700
commit4a73f2adf8c7dfeac144bd3dbc81be7bed903ae3 (patch)
treea47efd4792cf851de77ac0d1b12868a0f0bc768b /drivers/video/fbdev
parentb088e80929ac47cf395dfa7e4d41264e3afd2ea9 (diff)
msm: mdss: fix potential crash when sending backlight DCS commands
If MDSS idle power collapse feature is enabled, MDSS GDSC can get toggled when exiting idle power collapse. This may require an explicit call to TZ to restore MDSS security configs prior to accessing any MDSS registers, which is typically done whenever IOMMU is attached. For panels where backlight is controlled using DCS commands, it is possible that a backlight update could be triggered when MDSS is power collapsed. This would result in enabling MDSS GDSC and restoring DSI registers prior to sending the DCS commands. For such use cases, ensure that IOMMU is attached prior to any register programming to avoid any crashes. Change-Id: I245d1180cfeedeb938e70b792fd6d627e86c5d14 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_host.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c
index a70375559fef..1c7d55cecd30 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_host.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_host.c
@@ -2023,7 +2023,6 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
ctrl->mdss_util->bus_scale_set_quota(MDSS_DSI_RT, SZ_1M, SZ_1M);
pr_debug("%s: from_mdp=%d pid=%d\n", __func__, from_mdp, current->pid);
- mdss_dsi_clk_ctrl(ctrl, DSI_ALL_CLKS, 1);
if (ctrl->mdss_util->iommu_ctrl) {
rc = ctrl->mdss_util->iommu_ctrl(1);
@@ -2034,6 +2033,8 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
}
}
+ mdss_dsi_clk_ctrl(ctrl, DSI_ALL_CLKS, 1);
+
if (req->flags & CMD_REQ_HS_MODE)
mdss_dsi_set_tx_power_mode(0, &ctrl->panel_data);