summaryrefslogtreecommitdiff
path: root/msm/dp/dp_display.c
diff options
context:
space:
mode:
authorXiaowen Wu <wxiaowen@codeaurora.org>2020-07-27 22:18:59 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2020-09-10 20:47:09 -0700
commita6679cf917d70a83e391b65bde563c51a3e76224 (patch)
treea72dd6d38eb34fc043b3f78ed2d2ca1bdaed96b8 /msm/dp/dp_display.c
parent3c3bfb63cb2a56e1fd5f277a3e6ee76042736ac3 (diff)
downloaddisplay-drivers-a6679cf917d70a83e391b65bde563c51a3e76224.tar.gz
disp: msm: dp: fix dp-mst stream double disabled issue
There is a corner case when dp-mst stream is disabled twice: 1. stream 1 is enabled 2. cable plugged out, stream 1 is disabled by kernel 3. cable plugged in, enable stream 0 first 4. disable stream 1 Stream 1 is double disabled and will cause hw crash. This change will add the check and skip stream_off if already disabled. Change-Id: Icd1e815a1ed14cd4e784924f3db19b98eb06d571 Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org> Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Diffstat (limited to 'msm/dp/dp_display.c')
-rw-r--r--msm/dp/dp_display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c
index 4823fe2e..56f2723f 100644
--- a/msm/dp/dp_display.c
+++ b/msm/dp/dp_display.c
@@ -1167,6 +1167,12 @@ static void dp_display_stream_disable(struct dp_display_private *dp,
return;
}
+ if (dp_panel->stream_id == DP_STREAM_MAX ||
+ !dp->active_panels[dp_panel->stream_id]) {
+ DP_ERR("panel is already disabled\n");
+ return;
+ }
+
DP_DEBUG("stream_id=%d, active_stream_cnt=%d\n",
dp_panel->stream_id, dp->active_stream_cnt);