From e21655632e3fd40b7f6a5cc3c7f3c379d54557c4 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 30 Aug 2014 13:41:12 +0200 Subject: xserver libxtrans libxcb xcb-proto libX11 mesa git update 30 Aug 2014 xserver commit 3a51418b2db353519a1779cf3cebbcc9afba2520 libxcb commit b0e6c2de09c7474868dd7185674fa113a5c2e0aa libxcb/xcb-proto commit dc0c544fe044ddeb4917bba0c2fed66c70e6db43 libX11 commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68 libxtrans commit 17491de45c352c833442cccf17a9bd65909889db mesa commit 932b0ef1ceecf873213447a8778e5cbe1b3b6be7 --- xorg-server/hw/xfree86/common/xf86Bus.c | 3 +++ xorg-server/hw/xfree86/common/xf86Xinput.h | 5 +++-- xorg-server/hw/xfree86/common/xf86platformBus.c | 22 ++++++++++++++++++---- xorg-server/hw/xfree86/common/xf86platformBus.h | 1 + 4 files changed, 25 insertions(+), 6 deletions(-) (limited to 'xorg-server/hw/xfree86/common') diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index b3b3f8cc5..bd3e4e37b 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -210,6 +210,9 @@ xf86BusProbe(void) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) xf86SbusProbe(); #endif +#ifdef XSERVER_PLATFORM_BUS + xf86platformPrimary(); +#endif } /* diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 9fe8c87b6..66a64fb48 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -51,6 +51,7 @@ #ifndef _xf86Xinput_h #define _xf86Xinput_h +#include "xf86.h" #include "xf86str.h" #include "inputstr.h" #include @@ -85,7 +86,7 @@ typedef struct _InputDriverRec { /* This is to input devices what the ScrnInfoRec is to screens. */ -typedef struct _InputInfoRec { +struct _InputInfoRec { struct _InputInfoRec *next; char *name; char *driver; @@ -110,7 +111,7 @@ typedef struct _InputInfoRec { void *module; XF86OptionPtr options; InputAttributes *attrs; -} *InputInfoPtr; +}; /* xf86Globals.c */ extern InputInfoPtr xf86InputDevs; diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c index 946039940..5ad9b7080 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.c +++ b/xorg-server/hw/xfree86/common/xf86platformBus.c @@ -435,10 +435,9 @@ xf86platformProbeDev(DriverPtr drvp) /* for non-seat0 servers assume first device is the master */ if (ServerIsNotSeat0()) break; - if (xf86_platform_devices[j].pdev) { - if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) - break; - } + + if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) + break; } } @@ -594,4 +593,19 @@ void xf86platformVTProbe(void) xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs); } } + +void xf86platformPrimary(void) +{ + /* use the first platform device as a fallback */ + if (primaryBus.type == BUS_NONE) { + xf86Msg(X_INFO, "no primary bus or device found\n"); + + if (xf86_num_platform_devices > 0) { + primaryBus.id.plat = &xf86_platform_devices[0]; + primaryBus.type = BUS_PLATFORM; + + xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath); + } + } +} #endif diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.h b/xorg-server/hw/xfree86/common/xf86platformBus.h index 317dd24d5..a7335b9da 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.h +++ b/xorg-server/hw/xfree86/common/xf86platformBus.h @@ -155,6 +155,7 @@ extern _X_EXPORT int xf86PlatformMatchDriver(char *matches[], int nmatches); extern void xf86platformVTProbe(void); +extern void xf86platformPrimary(void); #endif #endif -- cgit v1.2.3