[PATCH 3/9] modesetting: Create new EGL screen in drmmode_xf86crtc_resize
Daniel Martin
daniel.martin at secunet.com
Mon Dec 8 03:03:02 PST 2014
From: Daniel Martin <consume.noise at gmail.com>
If we don't glamor_egl_create_textured_screen_ext() in
drmmode_xf86crtc_resize() we end up with a black screen and no client
windows visible.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth at whitecape.org>
---
hw/xfree86/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 ef9009e..5561df4 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];
--
2.1.3
More information about the xorg-devel
mailing list