From 7536e8e0ef24e23b871d37eb1b6f3d8f5abbc99c Mon Sep 17 00:00:00 2001 From: Ping Li Date: Fri, 17 Jul 2020 10:08:49 -0700 Subject: [PATCH] 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 --- msm/sde/sde_color_processing.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/msm/sde/sde_color_processing.c b/msm/sde/sde_color_processing.c index c628b450..441f0494 100644 --- a/msm/sde/sde_color_processing.c +++ b/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)