* [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated
@ 2022-04-12 4:28 Saurabh Sengar
2022-04-12 5:06 ` Dexuan Cui
0 siblings, 1 reply; 4+ messages in thread
From: Saurabh Sengar @ 2022-04-12 4:28 UTC (permalink / raw)
To: ssengar, drawat.floss, airlied, daniel, linux-hyperv, dri-devel,
linux-kernel, mikelley, decui
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated
2022-04-12 4:28 [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated Saurabh Sengar
@ 2022-04-12 5:06 ` Dexuan Cui
2022-05-03 14:50 ` Saurabh Singh Sengar
0 siblings, 1 reply; 4+ messages in thread
From: Dexuan Cui @ 2022-04-12 5:06 UTC (permalink / raw)
To: Saurabh Sengar, Saurabh Singh Sengar, drawat.floss@gmail.com,
airlied@linux.ie, daniel@ffwll.ch, linux-hyperv@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Michael Kelley (LINUX)
> From: Saurabh Sengar <ssengar@linux.microsoft.com>
> Sent: Monday, April 11, 2022 9:29 PM
> ...
> Add error message when the size of requested framebuffer is more than
> the allocated size by vmbus mmio region for framebuffer
The line lacks a period, but I guess the maintainer may help fix it for you :-)
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated
2022-04-12 5:06 ` Dexuan Cui
@ 2022-05-03 14:50 ` Saurabh Singh Sengar
2022-05-03 15:08 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Saurabh Singh Sengar @ 2022-05-03 14:50 UTC (permalink / raw)
To: Dexuan Cui
Cc: Saurabh Singh Sengar, drawat.floss@gmail.com, airlied@linux.ie,
daniel@ffwll.ch, linux-hyperv@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Michael Kelley (LINUX)
On Tue, Apr 12, 2022 at 05:06:07AM +0000, Dexuan Cui wrote:
> > From: Saurabh Sengar <ssengar@linux.microsoft.com>
> > Sent: Monday, April 11, 2022 9:29 PM
> > ...
> > Add error message when the size of requested framebuffer is more than
> > the allocated size by vmbus mmio region for framebuffer
>
> The line lacks a period, but I guess the maintainer may help fix it for you :-)
>
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
>
> Reviewed-by: Dexuan Cui <decui@microsoft.com>
Can this be queued for next ? please let me know in case any clarification required.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated
2022-05-03 14:50 ` Saurabh Singh Sengar
@ 2022-05-03 15:08 ` Wei Liu
0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2022-05-03 15:08 UTC (permalink / raw)
To: Saurabh Singh Sengar
Cc: Dexuan Cui, Saurabh Singh Sengar, drawat.floss@gmail.com,
airlied@linux.ie, daniel@ffwll.ch, linux-hyperv@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Michael Kelley (LINUX), Wei Liu
On Tue, May 03, 2022 at 07:50:16AM -0700, Saurabh Singh Sengar wrote:
> On Tue, Apr 12, 2022 at 05:06:07AM +0000, Dexuan Cui wrote:
> > > From: Saurabh Sengar <ssengar@linux.microsoft.com>
> > > Sent: Monday, April 11, 2022 9:29 PM
> > > ...
> > > Add error message when the size of requested framebuffer is more than
> > > the allocated size by vmbus mmio region for framebuffer
> >
> > The line lacks a period, but I guess the maintainer may help fix it for you :-)
> >
> > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> >
> > Reviewed-by: Dexuan Cui <decui@microsoft.com>
>
> Can this be queued for next ? please let me know in case any clarification required.
Applied to hyperv-next. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-03 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12 4:28 [PATCH v4] drm/hyperv: Add error message for fb size greater than allocated Saurabh Sengar
2022-04-12 5:06 ` Dexuan Cui
2022-05-03 14:50 ` Saurabh Singh Sengar
2022-05-03 15:08 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox