Skip to content

Commit 2b72e50

Browse files
robclarklumag
authored andcommitted
drm/msm/dpu: Ratelimit framedone timeout msgs
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>
1 parent eaa647c commit 2b72e50

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
#define DPU_ERROR_ENC(e, fmt, ...) DPU_ERROR("enc%d " fmt,\
4040
(e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
4141

42+
#define DPU_ERROR_ENC_RATELIMITED(e, fmt, ...) DPU_ERROR_RATELIMITED("enc%d " fmt,\
43+
(e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
44+
4245
/*
4346
* Two to anticipate panels that can do cmd/vid dynamic switching
4447
* plan is to create all possible physical encoder types, and switch between
@@ -2279,7 +2282,7 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t)
22792282
return;
22802283
}
22812284

2282-
DPU_ERROR_ENC(dpu_enc, "frame done timeout\n");
2285+
DPU_ERROR_ENC_RATELIMITED(dpu_enc, "frame done timeout\n");
22832286

22842287
if (atomic_inc_return(&dpu_enc->frame_done_timeout_cnt) == 1)
22852288
msm_disp_snapshot_state(drm_enc->dev);

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
} while (0)
5252

5353
#define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__)
54+
#define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)
5455

5556
/**
5657
* ktime_compare_safe - compare two ktime structures

0 commit comments

Comments
 (0)