]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/msm: Ratelimit invalid-fence message
authorRob Clark <robdclark@chromium.org>
Wed, 17 Mar 2021 16:40:38 +0000 (09:40 -0700)
committerRob Clark <robdclark@chromium.org>
Wed, 17 Mar 2021 21:19:19 +0000 (14:19 -0700)
We have seen a couple cases where low memory situations cause something
bad to happen, followed by a flood of these messages obscuring the root
cause.  Lets ratelimit the dmesg spam so that next time it happens we
don't lose the kernel traces leading up to this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
drivers/gpu/drm/msm/msm_fence.c

index ad2703698b052bc6132fb597a0f7120f1988b9fc..cd59a591803851655426b1670530b4ca114b4689 100644 (file)
@@ -45,7 +45,7 @@ int msm_wait_fence(struct msm_fence_context *fctx, uint32_t fence,
        int ret;
 
        if (fence > fctx->last_fence) {
-               DRM_ERROR("%s: waiting on invalid fence: %u (of %u)\n",
+               DRM_ERROR_RATELIMITED("%s: waiting on invalid fence: %u (of %u)\n",
                                fctx->name, fence, fctx->last_fence);
                return -EINVAL;
        }