[PATCH v2] ephyr: Fail if glamor is requested but not usable

Olivier Fourdan ofourdan at redhat.com
Mon Feb 2 01:41:06 PST 2015


Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 v2: Missing closing parenthesis

 hw/kdrive/ephyr/hostx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index f64861b..6c4d61c 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -1407,9 +1407,12 @@ ephyr_glamor_init(ScreenPtr screen)
     ephyr_glamor_set_window_size(scrpriv->glamor,
                                  scrpriv->win_width, scrpriv->win_height);
 
-    glamor_init(screen,
-                GLAMOR_USE_SCREEN |
-                GLAMOR_USE_PICTURE_SCREEN);
+    if (!glamor_init(screen,
+                     GLAMOR_USE_SCREEN |
+                     GLAMOR_USE_PICTURE_SCREEN)) {
+        FatalError("Failed to initialize glamor\n");
+        return FALSE;
+    }
 
     return TRUE;
 }
-- 
2.1.0



More information about the xorg-devel mailing list