Przeglądaj źródła

disp: msm: sde: Fix LTM hist off notification issue

When LTM is turning off, user space will turn off LTM histogram and
then wait for LTM hist off event from driver to change the state
from offpending to off. But if device enters IPC during this time,
driver will not notify user space with LTM hist off event and LTM
will stuck in offpending state. This change remove the check
before LTM hist off event notification to avoid LTM state stuck issue.

Change-Id: I073adabf72c6454acb8ab4d333c0547723523781
Signed-off-by: Ping Li <[email protected]>
Ping Li 5 lat temu
rodzic
commit
7536e8e0ef
1 zmienionych plików z 4 dodań i 9 usunięć
  1. 4 9
      msm/sde/sde_color_processing.c

+ 4 - 9
msm/sde/sde_color_processing.c

@@ -3678,12 +3678,10 @@ static void _sde_cp_crtc_disable_ltm_hist(struct sde_crtc *sde_crtc,
 {
 	unsigned long irq_flags;
 	u32 i = 0;
-	bool notify = false;
 	u8 hist_off = 1;
 	struct drm_event event;
 
 	spin_lock_irqsave(&sde_crtc->ltm_lock, irq_flags);
-	notify = sde_crtc->ltm_hist_en;
 	sde_crtc->ltm_hist_en = false;
 	INIT_LIST_HEAD(&sde_crtc->ltm_buf_free);
 	INIT_LIST_HEAD(&sde_crtc->ltm_buf_busy);
@@ -3695,13 +3693,10 @@ static void _sde_cp_crtc_disable_ltm_hist(struct sde_crtc *sde_crtc,
 	spin_unlock_irqrestore(&sde_crtc->ltm_lock, irq_flags);
 	event.type = DRM_EVENT_LTM_OFF;
 	event.length = sizeof(hist_off);
-	if (notify) {
-		SDE_EVT32(SDE_EVTLOG_FUNC_ENTRY);
-		msm_mode_object_event_notify(&sde_crtc->base.base,
-				sde_crtc->base.dev, &event,
-				(u8 *)&hist_off);
-	}
-
+	SDE_EVT32(SDE_EVTLOG_FUNC_ENTRY);
+	msm_mode_object_event_notify(&sde_crtc->base.base,
+			sde_crtc->base.dev, &event,
+			(u8 *)&hist_off);
 }
 
 static void sde_cp_ltm_hist_interrupt_cb(void *arg, int irq_idx)