xf86-video-amdgpu: Branch 'master'
Michel Dänzer
daenzer at kemper.freedesktop.org
Tue Jun 19 16:40:20 UTC 2018
src/drmmode_display.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 940c8b39f79789d4d5ddb8ab8d25a8ae05932756
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Tue Jun 12 18:45:08 2018 +0200
Check dimensions passed to drmmode_xf86crtc_resize
When enabling a secondary GPU output, Xorg can try resizing the screen
beyond the limit advertised by the driver, leading to drmModeAddFB
failing and primary GPU outputs turning off. Check for this and bail
instead.
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8a1a201..c55b4b7 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2191,6 +2191,14 @@ static Bool 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->shadow_primary)
hint = AMDGPU_CREATE_PIXMAP_LINEAR | AMDGPU_CREATE_PIXMAP_GTT;
else if (!info->use_glamor)
More information about the xorg-commit
mailing list