]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/dpu: Ratelimit framedone timeout msgs
authorRob Clark <robdclark@chromium.org>
Mon, 11 Dec 2023 18:19:55 +0000 (10:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:54:48 +0000 (08:54 +0100)
[ Upstream commit 2b72e50c62de60ad2d6bcd86aa38d4ccbdd633f2 ]

When we start getting these, we get a *lot*.  So ratelimit it to not
flood dmesg.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/571584/
Link: https://lore.kernel.org/r/20231211182000.218088-1-robdclark@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h

index 03bddd904d1a14151e52335e2124782eeac3e224..3d5e3b77bbbe9cbe6bd846f5ef0c28aeee34c2d9 100644 (file)
@@ -46,6 +46,9 @@
                (p) ? ((p)->hw_pp ? (p)->hw_pp->idx - PINGPONG_0 : -1) : -1, \
                ##__VA_ARGS__)
 
+#define DPU_ERROR_ENC_RATELIMITED(e, fmt, ...) DPU_ERROR_RATELIMITED("enc%d " fmt,\
+               (e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
+
 /*
  * Two to anticipate panels that can do cmd/vid dynamic switching
  * plan is to create all possible physical encoder types, and switch between
@@ -2126,7 +2129,7 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t)
                return;
        }
 
-       DPU_ERROR_ENC(dpu_enc, "frame done timeout\n");
+       DPU_ERROR_ENC_RATELIMITED(dpu_enc, "frame done timeout\n");
 
        event = DPU_ENCODER_FRAME_EVENT_ERROR;
        trace_dpu_enc_frame_done_timeout(DRMID(drm_enc), event);
index 323a6bce9e646b8e9b38765c86dcc668a7bf49b6..170b3e9dd4b00f1be6ff59e1a3fea31296526c98 100644 (file)
@@ -52,6 +52,7 @@
        } while (0)
 
 #define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__)
+#define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)
 
 /**
  * ktime_compare_safe - compare two ktime structures