Commit 3ce8bdca authored by Jessica Zhang's avatar Jessica Zhang Committed by Dmitry Baryshkov

drm/msm/dpu: Clean up CRC debug logs

Currently, dpu_hw_lm_collect_misr returns EINVAL if CRC is disabled.
This causes a lot of spam in the DRM debug logs as it's called for every
vblank.

Instead of returning EINVAL when CRC is disabled in
dpu_hw_lm_collect_misr, let's return ENODATA and add an extra ENODATA check
before the debug log in dpu_crtc_get_crc.

Changes since V1:
- Added reported-by and suggested-by tags
Reported-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Suggested-by: default avatarRob Clark <robdclark@chromium.org>
Signed-off-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # RB5  (qrb5165)
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/484274/
Link: https://lore.kernel.org/r/20220430005210.339-1-quic_jesszhan@quicinc.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent e791bc29
...@@ -204,6 +204,7 @@ static int dpu_crtc_get_crc(struct drm_crtc *crtc) ...@@ -204,6 +204,7 @@ static int dpu_crtc_get_crc(struct drm_crtc *crtc)
rc = m->hw_lm->ops.collect_misr(m->hw_lm, &crcs[i]); rc = m->hw_lm->ops.collect_misr(m->hw_lm, &crcs[i]);
if (rc) { if (rc) {
if (rc != -ENODATA)
DRM_DEBUG_DRIVER("MISR read failed\n"); DRM_DEBUG_DRIVER("MISR read failed\n");
return rc; return rc;
} }
......
...@@ -138,7 +138,7 @@ static int dpu_hw_lm_collect_misr(struct dpu_hw_mixer *ctx, u32 *misr_value) ...@@ -138,7 +138,7 @@ static int dpu_hw_lm_collect_misr(struct dpu_hw_mixer *ctx, u32 *misr_value)
ctrl = DPU_REG_READ(c, LM_MISR_CTRL); ctrl = DPU_REG_READ(c, LM_MISR_CTRL);
if (!(ctrl & LM_MISR_CTRL_ENABLE)) if (!(ctrl & LM_MISR_CTRL_ENABLE))
return -EINVAL; return -ENODATA;
if (!(ctrl & LM_MISR_CTRL_STATUS)) if (!(ctrl & LM_MISR_CTRL_STATUS))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment