浏览代码

disp: msm: dp: return early if all streams are disabled

Return early if the active streams are not present. Clean function
doesn't take into account the count of active stream which is being
changed during disable and link clk is turned off before that.
Adding active stream check in pre_off will ensures atleast one
stream is on and link clk is not turned off.

Change-Id: I6abf4b14ae4f99161eed3d5300b1961a1983977d
Signed-off-by: Rajat Gupta <[email protected]>
Rajat Gupta 4 年之前
父节点
当前提交
1afa803170
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      msm/dp/dp_display.c

+ 7 - 1
msm/dp/dp_display.c

@@ -1238,6 +1238,12 @@ end:
 static int dp_display_stream_pre_disable(struct dp_display_private *dp,
 			struct dp_panel *dp_panel)
 {
+	if (!dp->active_stream_cnt) {
+		DP_WARN("streams already disabled cnt=%d\n",
+				dp->active_stream_cnt);
+		return 0;
+	}
+
 	dp->ctrl->stream_pre_off(dp->ctrl, dp_panel);
 
 	return 0;
@@ -1247,7 +1253,7 @@ static void dp_display_stream_disable(struct dp_display_private *dp,
 			struct dp_panel *dp_panel)
 {
 	if (!dp->active_stream_cnt) {
-		DP_ERR("invalid active_stream_cnt (%d)\n",
+		DP_WARN("streams already disabled cnt=%d\n",
 				dp->active_stream_cnt);
 		return;
 	}