dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] drm/hyperv: Added error message for fb size greater than allocated
@ 2022-04-11  4:13 Saurabh Sengar
  2022-04-11  6:40 ` Dexuan Cui
  0 siblings, 1 reply; 5+ messages in thread
From: Saurabh Sengar @ 2022-04-11  4:13 UTC (permalink / raw)
  To: ssengar, drawat.floss, airlied, daniel, linux-hyperv, dri-devel,
	linux-kernel, mikelley, decui

Added error message when the size of requested framebuffer is more than
the allocated size by vmbus mmio region for framebuffer

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
---
v2 -> v3 : then -> than (typo fix)

 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
index e82b815..6634818 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
@@ -123,8 +123,11 @@ static int hyperv_pipe_check(struct drm_simple_display_pipe *pipe,
 	if (fb->format->format != DRM_FORMAT_XRGB8888)
 		return -EINVAL;
 
-	if (fb->pitches[0] * fb->height > hv->fb_size)
+	if (fb->pitches[0] * fb->height > hv->fb_size) {
+		drm_err(&hv->dev, "hv->hdev, fb size requested by process %s for %d X %d (pitch %d) is greater than allocated size %ld\n",
+		current->comm, fb->width, fb->height, fb->pitches[0], hv->fb_size);
 		return -EINVAL;
+	}
 
 	return 0;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-12  4:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  4:13 [PATCH v3] drm/hyperv: Added error message for fb size greater than allocated Saurabh Sengar
2022-04-11  6:40 ` Dexuan Cui
2022-04-11  7:55   ` Saurabh Singh Sengar
2022-04-11 19:02     ` Dexuan Cui
2022-04-12  4:07       ` Saurabh Singh Sengar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).