aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaurabh Sengar <[email protected]>2022-09-09 08:09:53 -0700
committerWei Liu <[email protected]>2022-09-29 16:28:28 +0000
commit4c3386f64a432b3697fede579d06f9c1058043ad (patch)
treeae97dcf6fac58e902c9d5d7859621a0590b5b0e7
parentd5ebde1e2b46154d7e03efb1ae3039a304e5386d (diff)
drm/hyperv: Add ratelimit on error message
Due to a full ring buffer, the driver may be unable to send updates to the Hyper-V host. But outputing the error message can make the problem worse because console output is also typically written to the frame buffer. Rate limiting the error message, also output the error code for additional diagnosability. Signed-off-by: Saurabh Sengar <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
-rw-r--r--drivers/gpu/drm/hyperv/hyperv_drm_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
index 76a182a9a765..013a7829182d 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
@@ -208,7 +208,7 @@ static inline int hyperv_sendpacket(struct hv_device *hdev, struct synthvid_msg
VM_PKT_DATA_INBAND, 0);
if (ret)
- drm_err(&hv->dev, "Unable to send packet via vmbus\n");
+ drm_err_ratelimited(&hv->dev, "Unable to send packet via vmbus; error %d\n", ret);
return ret;
}