From: Daniel Martin <consume.no...@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.no...@gmail.com>
Reviewed-by: Eric Anholt <e...@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenn...@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

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to