Skip to content

Commit

Permalink
drm/msm/dpu: Ratelimit framedone timeout msgs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
robclark authored and lumag committed Dec 14, 2023
1 parent eaa647c commit 2b72e50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#define DPU_ERROR_ENC(e, fmt, ...) DPU_ERROR("enc%d " fmt,\
(e) ? (e)->base.base.id : -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
Expand Down Expand Up @@ -2279,7 +2282,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");

if (atomic_inc_return(&dpu_enc->frame_done_timeout_cnt) == 1)
msm_disp_snapshot_state(drm_enc->dev);
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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
Expand Down

0 comments on commit 2b72e50

Please sign in to comment.