Blame SOURCES/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch

70130e
From 201d8504ebaa1de7be149089281a7f40cd57bb38 Mon Sep 17 00:00:00 2001
70130e
From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
70130e
Date: Wed, 21 Aug 2013 23:02:58 -0700
70130e
Subject: [PATCH 12/39] xwayland: Add a HW_WAYLAND flag to let drivers
70130e
 explicitly opt-in
70130e
70130e
---
70130e
 hw/xfree86/common/xf86Init.c | 11 +++++++----
70130e
 hw/xfree86/common/xf86str.h  |  1 +
70130e
 2 files changed, 8 insertions(+), 4 deletions(-)
70130e
70130e
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
70130e
index 98adaab..2d3bb01 100644
70130e
--- a/hw/xfree86/common/xf86Init.c
70130e
+++ b/hw/xfree86/common/xf86Init.c
70130e
@@ -547,11 +547,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
70130e
             if (!(flags & HW_SKIP_CONSOLE))
70130e
                 xorgHWOpenConsole = TRUE;
70130e
 
70130e
-	    if (xorgWayland &&
70130e
-		(NEED_IO_ENABLED(flags) || !(flags & HW_SKIP_CONSOLE))) {
70130e
+	    if (xorgWayland) {
70130e
+                if (flags != HW_WAYLAND) {
70130e
+                    xf86DeleteDriver(i);
70130e
+                    continue;
70130e
+                }
70130e
 
70130e
-		xf86DeleteDriver(i);
70130e
-		continue;
70130e
+                want_hw_access = FALSE;
70130e
+                xorgHWOpenConsole = FALSE;
70130e
 	    }
70130e
         }
70130e
 
70130e
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
70130e
index 4c2d147..976fa30 100644
70130e
--- a/hw/xfree86/common/xf86str.h
70130e
+++ b/hw/xfree86/common/xf86str.h
70130e
@@ -288,6 +288,7 @@ typedef struct {
70130e
 #define HW_MMIO 2
70130e
 #define HW_SKIP_CONSOLE 4
70130e
 #define NEED_IO_ENABLED(x) (x & HW_IO)
70130e
+#define HW_WAYLAND 8
70130e
 
70130e
 typedef CARD32 xorgHWFlags;
70130e
 
70130e
-- 
70130e
1.8.3.1
70130e