فهرست منبع

disp: msm: sde: avoid mutex lock for crtc flush event thread

As per current design in crtc disable sequence event thread
can cause deadlock.This change avoids mutex lock for crtc
flush event thread to flush all event work.


Change-Id: Ia7156032bee9245fe84fd1621cf1994920b8e574
Signed-off-by: Narendra Muppalla <[email protected]>
Narendra Muppalla 4 سال پیش
والد
کامیت
47261ce97c
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      msm/sde/sde_crtc.c

+ 6 - 1
msm/sde/sde_crtc.c

@@ -4162,7 +4162,12 @@ static void sde_crtc_disable(struct drm_crtc *crtc)
 	msm_mode_object_event_notify(&crtc->base, crtc->dev, &event,
 			(u8 *)&power_on);
 
-	_sde_crtc_flush_event_thread(crtc);
+	if (atomic_read(&sde_crtc->frame_pending)) {
+		mutex_unlock(&sde_crtc->crtc_lock);
+		_sde_crtc_flush_event_thread(crtc);
+		mutex_lock(&sde_crtc->crtc_lock);
+	}
+
 	kthread_cancel_delayed_work_sync(&sde_crtc->static_cache_read_work);
 	kthread_cancel_delayed_work_sync(&sde_crtc->idle_notify_work);