提交 6733dd4a 编写于 作者: S Saurabh Sengar 提交者: Wei Liu

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: NSaurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: NDexuan Cui <decui@microsoft.com>
Link: https://lore.kernel.org/r/1649737739-10113-1-git-send-email-ssengar@linux.microsoft.comSigned-off-by: NWei Liu <wei.liu@kernel.org>
上级 23e118a4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册