diff options
| -rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 7740dd26f007..a0d6e894d97c 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
| @@ -559,9 +559,13 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var, | |||
| 559 | return -EINVAL; | 559 | return -EINVAL; |
| 560 | 560 | ||
| 561 | /* Need to resize the fb object !!! */ | 561 | /* Need to resize the fb object !!! */ |
| 562 | if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width || var->yres > fb->height) { | 562 | if (var->bits_per_pixel > fb->bits_per_pixel || |
| 563 | var->xres > fb->width || var->yres > fb->height || | ||
| 564 | var->xres_virtual > fb->width || var->yres_virtual > fb->height) { | ||
| 563 | DRM_DEBUG("fb userspace requested width/height/bpp is greater than current fb " | 565 | DRM_DEBUG("fb userspace requested width/height/bpp is greater than current fb " |
| 564 | "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, var->bits_per_pixel, | 566 | "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n", |
| 567 | var->xres, var->yres, var->bits_per_pixel, | ||
| 568 | var->xres_virtual, var->yres_virtual, | ||
| 565 | fb->width, fb->height, fb->bits_per_pixel); | 569 | fb->width, fb->height, fb->bits_per_pixel); |
| 566 | return -EINVAL; | 570 | return -EINVAL; |
| 567 | } | 571 | } |
