xorg-x11-server/0012-xwayland-Add-a-HW_WAYLAND-flag-to-let-drivers-explic.patch
2013-09-23 11:10:24 -07:00

50 lines
1.5 KiB
Diff

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