diff options
-rw-r--r-- | src/drmmode_display.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 25fcabfa..4b5f9f45 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2260,6 +2260,14 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) if (scrn->virtualX == width && scrn->virtualY == height) return TRUE; + if (width > xf86_config->maxWidth || height > xf86_config->maxHeight) { + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "Xorg tried resizing screen to %dx%d, but maximum " + "supported is %dx%d\n", width, height, + xf86_config->maxWidth, xf86_config->maxHeight); + return FALSE; + } + if (info->allowColorTiling && !info->shadow_primary) { if (info->ChipFamily < CHIP_FAMILY_R600 || info->allowColorTiling2D) usage |= RADEON_CREATE_PIXMAP_TILING_MACRO; |