diff options
author | Saurabh Sengar <ssengar@linux.microsoft.com> | 2022-04-11 21:28:59 -0700 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2022-05-03 15:08:39 +0000 |
commit | 6733dd4af7818559114e2a4771363dd6239297f6 (patch) | |
tree | 8ba0f4c5f63f2efe80322c99dad3e7f60ec2d89f /drivers/gpu/drm/hyperv | |
parent | 23e118a48acf7be223e57d98e98da8ac5a4071ac (diff) | |
download | linux-6733dd4af7818559114e2a4771363dd6239297f6.tar.gz |
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@linux.microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Link: https://lore.kernel.org/r/1649737739-10113-1-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/hyperv')
-rw-r--r-- | drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c index e82b815f83a6..27f4fcb058f9 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; } |