[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1649737739-10113-1-git-send-email-ssengar@linux.microsoft.com>
Date: Mon, 11 Apr 2022 21:28:59 -0700
From: Saurabh Sengar <ssengar@...ux.microsoft.com>
To: ssengar@...rosoft.com, drawat.floss@...il.com, airlied@...ux.ie,
daniel@...ll.ch, linux-hyperv@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
mikelley@...rosoft.com, decui@...rosoft.com
Subject: [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated
Add 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@...ux.microsoft.com>
---
v3 -> v4 :
* Shorter error message
* Alignment match for open parenthesis
* Added -> Add (typo fix in commit message)
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..27f4fcb 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, "fb size requested by %s for %dX%d (pitch %d) greater than %ld\n",
+ current->comm, fb->width, fb->height, fb->pitches[0], hv->fb_size);
return -EINVAL;
+ }
return 0;
}
--
1.8.3.1
Powered by blists - more mailing lists