浏览代码

Revert "disp: msm: sde: fix race between disable commit and vblank work"

This is a partial revert of commit:
	31dd25c623babc9b53d70e028c6499ed4673d227.

The enc->crtc link cannot be relied upon outside of the display
thread context since the DRM legacy modeset API will detach and
re-attach this connection on every commit.

The logic to flush the event thread in all cases during the CRTC
disable is kept from the original patch.

Change-Id: I2cd4ae47589bb397c72de0e9deba9b0c710d379a
Signed-off-by: Steve Cohen <[email protected]>
Steve Cohen 4 年之前
父节点
当前提交
f6cfe46a3c
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 4 8
      msm/sde/sde_crtc.c

+ 4 - 8
msm/sde/sde_crtc.c

@@ -3850,10 +3850,8 @@ static int _sde_crtc_vblank_enable_no_lock(
 		if (ret < 0)
 			return ret;
 
-		drm_for_each_encoder(enc, crtc->dev) {
-			if (enc->crtc != crtc)
-				continue;
-
+		drm_for_each_encoder_mask(enc, crtc->dev,
+				crtc->state->encoder_mask) {
 			SDE_EVT32(DRMID(&sde_crtc->base), DRMID(enc), enable,
 					sde_crtc->enabled);
 
@@ -3861,10 +3859,8 @@ static int _sde_crtc_vblank_enable_no_lock(
 					sde_crtc_vblank_cb, (void *)crtc);
 		}
 	} else {
-		drm_for_each_encoder(enc, crtc->dev) {
-			if (enc->crtc != crtc)
-				continue;
-
+		drm_for_each_encoder_mask(enc, crtc->dev,
+				crtc->state->encoder_mask) {
 			SDE_EVT32(DRMID(&sde_crtc->base), DRMID(enc), enable,
 					sde_crtc->enabled);