瀏覽代碼

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 <[email protected]>
Signed-off-by: Sankeerth Billakanti <[email protected]>
Xiaowen Wu 5 年之前
父節點
當前提交
c60d3d5989
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      msm/dp/dp_display.c

+ 6 - 0
msm/dp/dp_display.c

@@ -1257,6 +1257,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);