aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/dix-config.h.in3
-rw-r--r--xorg-server/include/hotplug.h39
-rw-r--r--xorg-server/include/misc.h4
-rw-r--r--xorg-server/include/screenint.h9
-rw-r--r--xorg-server/include/scrnintstr.h4
-rw-r--r--xorg-server/include/xorg-config.h.in3
-rw-r--r--xorg-server/include/xorg-server.h.in3
7 files changed, 65 insertions, 0 deletions
diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in
index 3c9bbafeb..77681a953 100644
--- a/xorg-server/include/dix-config.h.in
+++ b/xorg-server/include/dix-config.h.in
@@ -390,6 +390,9 @@
/* Use libudev for input hotplug */
#undef CONFIG_UDEV
+/* Use libudev for kms enumeration */
+#undef CONFIG_UDEV_KMS
+
/* Use udev_monitor_filter_add_match_tag() */
#undef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG
diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h
index f3eeea21d..96b078d48 100644
--- a/xorg-server/include/hotplug.h
+++ b/xorg-server/include/hotplug.h
@@ -26,8 +26,47 @@
#ifndef HOTPLUG_H
#define HOTPLUG_H
+#include "list.h"
+
extern _X_EXPORT void config_pre_init(void);
extern _X_EXPORT void config_init(void);
extern _X_EXPORT void config_fini(void);
+struct OdevAttribute {
+ struct xorg_list member;
+ int attrib_id;
+ char *attrib_name;
+};
+
+struct OdevAttributes {
+ struct xorg_list list;
+};
+
+struct OdevAttributes *
+config_odev_allocate_attribute_list(void);
+
+void
+config_odev_free_attribute_list(struct OdevAttributes *attribs);
+
+Bool
+config_odev_add_attribute(struct OdevAttributes *attribs, int attrib,
+ const char *attrib_name);
+
+void
+config_odev_free_attributes(struct OdevAttributes *attribs);
+
+/* path to kernel device node - Linux e.g. /dev/dri/card0 */
+#define ODEV_ATTRIB_PATH 1
+/* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */
+#define ODEV_ATTRIB_SYSPATH 2
+/* DRI-style bus id */
+#define ODEV_ATTRIB_BUSID 3
+
+typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs);
+void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
+
+#ifdef CONFIG_UDEV_KMS
+void NewGPUDeviceRequest(struct OdevAttributes *attribs);
+void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
+#endif
#endif /* HOTPLUG_H */
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h
index aa62f6a3a..6bea82f33 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/include/misc.h
@@ -83,10 +83,14 @@ OF THIS SOFTWARE.
#ifndef MAXSCREENS
#define MAXSCREENS 16
#endif
+#ifndef MAXGPUSCREENS
+#define MAXGPUSCREENS 16
+#endif
#define MAXCLIENTS 256
#define MAXEXTENSIONS 128
#define MAXFORMATS 8
#define MAXDEVICES 40 /* input devices */
+#define GPU_SCREEN_OFFSET 256
/* 128 event opcodes for core + extension events, excluding GE */
#define MAXEVENTS 128
diff --git a/xorg-server/include/screenint.h b/xorg-server/include/screenint.h
index 6b0cc70ee..8205f6363 100644
--- a/xorg-server/include/screenint.h
+++ b/xorg-server/include/screenint.h
@@ -62,6 +62,15 @@ extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
int /*argc */ ,
char ** /*argv */ );
+
+extern _X_EXPORT int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
+ int /*argc */ ,
+ char ** /*argv */
+ ),
+ int argc, char **argv);
+
+extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen);
+
typedef struct _ColormapRec *ColormapPtr;
#endif /* SCREENINT_H */
diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index 7af2bf53f..bcac47558 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/include/scrnintstr.h
@@ -477,6 +477,8 @@ typedef struct _Screen {
* malicious users to steal framebuffer's content if that would be the
* default */
Bool canDoBGNoneRoot;
+
+ Bool isGPU;
} ScreenRec;
static inline RegionPtr
@@ -494,6 +496,8 @@ typedef struct _ScreenInfo {
PixmapFormatRec formats[MAXFORMATS];
int numScreens;
ScreenPtr screens[MAXSCREENS];
+ int numGPUScreens;
+ ScreenPtr gpuscreens[MAXGPUSCREENS];
int x; /* origin */
int y; /* origin */
int width; /* total width of all screens together */
diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in
index 2cc416ae7..a71b25d72 100644
--- a/xorg-server/include/xorg-config.h.in
+++ b/xorg-server/include/xorg-config.h.in
@@ -136,4 +136,7 @@
/* Have getresuid */
#undef HAVE_GETRESUID
+/* Have X server platform bus support */
+#undef XSERVER_PLATFORM_BUS
+
#endif /* _XORG_CONFIG_H_ */
diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in
index 8086f32ae..c0761f78a 100644
--- a/xorg-server/include/xorg-server.h.in
+++ b/xorg-server/include/xorg-server.h.in
@@ -205,6 +205,9 @@
/* X Access Control Extension */
#undef XACE
+/* Have X server platform bus support */
+#undef XSERVER_PLATFORM_BUS
+
#ifdef _LP64
#define _XSERVER64 1
#endif