From 8a16620dcd7a22fd9b38876ffc711629c4fbda0a Mon Sep 17 00:00:00 2001 From: Daniel Martin Date: Fri, 28 Nov 2014 11:20:48 +0100 Subject: [PATCH] modesetting: Create new EGL screen in drmmode_xf86crtc_resize If we don't glamor_egl_create_textured_screen_ext() in drmmode_xf86crtc_resize() we end up with a black screen and no client window(s) visible. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard --- .../drivers/modesetting/drmmode_display.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index ef9009e98..5561df4a9 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -49,6 +49,11 @@ #include "driver.h" +#ifdef GLAMOR +#define GLAMOR_FOR_XORG 1 +#include "glamor.h" +#endif + static struct dumb_bo * dumb_bo_create(int fd, const unsigned width, const unsigned height, const unsigned bpp) @@ -1243,6 +1248,20 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) pitch, drmmode->shadow_fb); } +#ifdef GLAMOR + if (drmmode->glamor) { + if (!glamor_egl_create_textured_screen_ext(screen, + drmmode->front_bo->handle, + scrn->displayWidth * + scrn->bitsPerPixel / 8, + NULL)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "glamor_egl_create_textured_screen_ext() failed\n"); + goto fail; + } + } +#endif + for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i];