From 68d3217032bd0c80f321a8742fa427cc527fa1cb Mon Sep 17 00:00:00 2001 From: Nilaan Gunabalachandran Date: Wed, 1 Mar 2023 16:13:38 -0500 Subject: [PATCH] disp: msm: sde: use rate limited print for crtc event thread When the vblank event overflow error log occurs due to an inability to handle incoming vblanks, it is posisble to continuously flood with error print logs. This could cause the CPU to become further blocked and creates a cycle of failed callbacks and error logging. This change changes the overflow log in the crtc event thread to rate limited. Change-Id: Ie2d77689c8fa989cf3a294f973851b7dacef098b Signed-off-by: Nilaan Gunabalachandran --- msm/sde/sde_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msm/sde/sde_crtc.c b/msm/sde/sde_crtc.c index 3a10cd4e08..f45531156a 100644 --- a/msm/sde/sde_crtc.c +++ b/msm/sde/sde_crtc.c @@ -2825,7 +2825,7 @@ static void sde_crtc_frame_event_cb(void *data, u32 event, ktime_t ts) spin_unlock_irqrestore(&sde_crtc->event_spin_lock, flags); if (!fevent) { - SDE_ERROR("crtc%d event %d overflow\n", DRMID(crtc), event); + pr_err_ratelimited("crtc%d event %d overflow\n", DRMID(crtc), event); SDE_EVT32(DRMID(crtc), event); return; } @@ -3079,7 +3079,7 @@ static void sde_crtc_vblank_cb(void *data, ktime_t ts) priv = sde_kms->dev->dev_private; if (!vevent) { - SDE_ERROR("crtc%d vblank event overflow\n", DRMID(crtc)); + pr_err_ratelimited("crtc%d vblank event overflow\n", DRMID(crtc)); SDE_EVT32(DRMID(crtc), SDE_EVTLOG_ERROR); return; }