aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-04 09:07:26 +0200
committermarha <marha@users.sourceforge.net>2013-06-04 09:07:26 +0200
commit150771e7aabf4c864b0b970c5b8d773634793abe (patch)
tree3d544cc0d8d06dd70e843d6ca7e4b0ef421d2758 /xorg-server/hw
parentfbe681216618af573ce29ca03b382b39b5919a52 (diff)
downloadvcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.tar.gz
vcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.tar.bz2
vcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.zip
xwininfo fontconfig libX11 libXau libXdmcp libXext mesa libXinerama libxcb libxcb/xcb-proto libfontenc pixman xkbcomp mkfontscale xkeyboard-config git update 4 Jun 2013
xserver commit c21344add2fc589df83b29be5831c36a372201bd libxcb commit 9ae84ad187e2ba440c40f44b8eb21c82c2fdbf12 libxcb/xcb-proto commit bdfedfa57a13ff805580cfacafc70f9cc55df363 xkeyboard-config commit dad9ade4e83d1ef5a517fcc4cc9ad3a79b47acce libX11 commit 8496122eb00ce6cd5d2308ee54f64b68c378e455 libXdmcp commit 0b443c1b769b9c9a3b45b4252afe07e18b709ff4 libXext commit d8366afbb0d2e4fbb1e419b1187f490522270bea libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff libXau commit 899790011304c4029e15abf410e49ce7cec17e0a xkbcomp commit ed582f4fccd4e23abcfba8b3b03649fea6414f44 pixman commit 2acfac5f8e097ee2ae225d986f981b55d65dd152 mkfontscale commit 19e2cb7c6a3ec2c5b1bc0d24866fa685eef0ee13 xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13 fontconfig commit cd9b1033a68816a7acfbba1718ba0aa5888f6ec7 mesa commit 7bafd88c153e395274b632e7eae4bc9fc3aec1d2
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/dmx/config/dmxcompat.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/man/Xephyr.man6
-rw-r--r--xorg-server/hw/kdrive/fbdev/fbdev.c157
-rw-r--r--xorg-server/hw/kdrive/fbdev/fbdev.h2
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c3
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h26
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c17
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.c30
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.h4
-rw-r--r--xorg-server/hw/xfree86/common/xf86sbusBus.c6
-rw-r--r--xorg-server/hw/xfree86/ddc/xf86DDC.h2
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/Makefile.am2
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbdevhw.c1
-rw-r--r--xorg-server/hw/xfree86/modes/Makefile.am4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c39
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.h3
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c1
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Modes.h6
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c3
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.h3
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rename.h94
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Sbus.c8
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_platform.c62
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/posix_tty.c3
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_init.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSproc.h3
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86Cursor.c28
-rw-r--r--xorg-server/hw/xfree86/utils/cvt/Makefile.am1
-rw-r--r--xorg-server/hw/xfree86/utils/cvt/cvt.c1
-rw-r--r--xorg-server/hw/xfree86/vbe/Makefile.am1
-rw-r--r--xorg-server/hw/xfree86/vbe/vbe.c1
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c5
-rw-r--r--xorg-server/hw/xwin/windialogs.c12
-rw-r--r--xorg-server/hw/xwin/winkeybd.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c5
-rw-r--r--xorg-server/hw/xwin/winpfbdd.c13
-rw-r--r--xorg-server/hw/xwin/winscrinit.c4
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswindow.c4
-rw-r--r--xorg-server/hw/xwin/winwindow.c4
-rw-r--r--xorg-server/hw/xwin/winwindowswm.c15
-rw-r--r--xorg-server/hw/xwin/winwndproc.c2
45 files changed, 325 insertions, 273 deletions
diff --git a/xorg-server/hw/dmx/config/dmxcompat.c b/xorg-server/hw/dmx/config/dmxcompat.c
index bd9f12738..107991a96 100644
--- a/xorg-server/hw/dmx/config/dmxcompat.c
+++ b/xorg-server/hw/dmx/config/dmxcompat.c
@@ -228,5 +228,9 @@ dmxVDLRead(const char *filename)
break;
}
}
+
+ if (str != stdin)
+ fclose(str);
+
return entry;
}
diff --git a/xorg-server/hw/kdrive/ephyr/man/Xephyr.man b/xorg-server/hw/kdrive/ephyr/man/Xephyr.man
index ca88ab240..f14f6c864 100644
--- a/xorg-server/hw/kdrive/ephyr/man/Xephyr.man
+++ b/xorg-server/hw/kdrive/ephyr/man/Xephyr.man
@@ -46,7 +46,7 @@ and the following additional options:
sets the screen size.
.TP 8
.BI -parent " id"
-uses exiting window
+uses existing window
.I id .
If a
.BI -screen
@@ -59,6 +59,10 @@ set 'cursor acceleration':
The host's cursor is reused. This is only really there to aid
debugging by avoiding server paints for the cursor. Performance
improvement is negligible.
+.TP 8
+.B -resizeable
+Allow the Xephyr window to be resized, even if not embedded into a parent
+window. By default, the Xephyr window has a fixed size.
.SH "SIGNALS"
Send a SIGUSR1 to the server (e.g. pkill -USR1 Xephyr) to
toggle the debugging mode.
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.c b/xorg-server/hw/kdrive/fbdev/fbdev.c
index d6fcf1a5f..95f64cbef 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.c
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.c
@@ -30,7 +30,7 @@
extern int KdTsPhyScreen;
-char *fbdevDevicePath = NULL;
+const char *fbdevDevicePath = NULL;
static Bool
fbdevInitialize(KdCardInfo * card, FbdevPriv * priv)
@@ -206,13 +206,23 @@ fbdevScreenInitialize(KdScreenInfo * screen, FbdevScrPriv * scrpriv)
depth = priv->var.bits_per_pixel;
gray = priv->var.grayscale;
+ /* Calculate fix.line_length if it's zero */
+ if (!priv->fix.line_length)
+ priv->fix.line_length = (priv->var.xres_virtual * depth + 7) / 8;
+
switch (priv->fix.visual) {
+ case FB_VISUAL_MONO01:
+ case FB_VISUAL_MONO10:
+ screen->fb.visuals = (1 << StaticGray);
+ break;
case FB_VISUAL_PSEUDOCOLOR:
- if (gray) {
- screen->fb.visuals = (1 << StaticGray);
+ screen->fb.visuals = (1 << StaticGray);
+ if (priv->var.bits_per_pixel == 1) {
+ /* Override to monochrome, to have preallocated black/white */
+ priv->fix.visual = FB_VISUAL_MONO01;
+ } else if (gray) {
/* could also support GrayScale, but what's the point? */
- }
- else {
+ } else {
screen->fb.visuals = ((1 << StaticGray) |
(1 << GrayScale) |
(1 << StaticColor) |
@@ -309,6 +319,21 @@ fbdevWindowLinear(ScreenPtr pScreen,
return (CARD8 *) priv->fb + row * priv->fix.line_length + offset;
}
+static void *
+fbdevWindowAfb(ScreenPtr pScreen,
+ CARD32 row,
+ CARD32 offset, int mode, CARD32 *size, void *closure)
+{
+ KdScreenPriv(pScreen);
+ FbdevPriv *priv = pScreenPriv->card->driver;
+
+ if (!pScreenPriv->enabled)
+ return 0;
+ /* offset to next plane */
+ *size = priv->var.yres_virtual * priv->fix.line_length;
+ return (CARD8 *) priv->fb + row * priv->fix.line_length + offset;
+}
+
Bool
fbdevMapFramebuffer(KdScreenInfo * screen)
{
@@ -316,7 +341,8 @@ fbdevMapFramebuffer(KdScreenInfo * screen)
KdPointerMatrix m;
FbdevPriv *priv = screen->card->driver;
- if (scrpriv->randr != RR_Rotate_0)
+ if (scrpriv->randr != RR_Rotate_0 ||
+ priv->fix.type != FB_TYPE_PACKED_PIXELS)
scrpriv->shadow = TRUE;
else
scrpriv->shadow = FALSE;
@@ -392,33 +418,88 @@ fbdevSetShadow(ScreenPtr pScreen)
window = fbdevWindowLinear;
update = 0;
- if (scrpriv->randr)
- if (priv->var.bits_per_pixel == 16) {
- switch (scrpriv->randr) {
- case RR_Rotate_90:
- if (useYX)
- update = shadowUpdateRotate16_90YX;
- else
- update = shadowUpdateRotate16_90;
- break;
- case RR_Rotate_180:
- update = shadowUpdateRotate16_180;
+ switch (priv->fix.type) {
+ case FB_TYPE_PACKED_PIXELS:
+ if (scrpriv->randr)
+ if (priv->var.bits_per_pixel == 16) {
+ switch (scrpriv->randr) {
+ case RR_Rotate_90:
+ if (useYX)
+ update = shadowUpdateRotate16_90YX;
+ else
+ update = shadowUpdateRotate16_90;
+ break;
+ case RR_Rotate_180:
+ update = shadowUpdateRotate16_180;
+ break;
+ case RR_Rotate_270:
+ if (useYX)
+ update = shadowUpdateRotate16_270YX;
+ else
+ update = shadowUpdateRotate16_270;
+ break;
+ default:
+ update = shadowUpdateRotate16;
+ break;
+ }
+ }
+ else
+ update = shadowUpdateRotatePacked;
+ else
+ update = shadowUpdatePacked;
+ break;
+
+ case FB_TYPE_PLANES:
+ window = fbdevWindowAfb;
+ switch (priv->var.bits_per_pixel) {
+ case 4:
+ update = shadowUpdateAfb4;
+ break;
+
+ case 8:
+ update = shadowUpdateAfb8;
+ break;
+
+ default:
+ FatalError("Bitplanes with bpp %u are not yet supported\n",
+ priv->var.bits_per_pixel);
+ }
+ break;
+
+ case FB_TYPE_INTERLEAVED_PLANES:
+ if (priv->fix.type_aux == 2) {
+ switch (priv->var.bits_per_pixel) {
+ case 4:
+ update = shadowUpdateIplan2p4;
break;
- case RR_Rotate_270:
- if (useYX)
- update = shadowUpdateRotate16_270YX;
- else
- update = shadowUpdateRotate16_270;
+
+ case 8:
+ update = shadowUpdateIplan2p8;
break;
+
default:
- update = shadowUpdateRotate16;
- break;
+ FatalError("Atari interleaved bitplanes with bpp %u are not yet supported\n",
+ priv->var.bits_per_pixel);
}
+ } else {
+ FatalError("Interleaved bitplanes with interleave %u are not yet supported\n",
+ priv->fix.type_aux);
}
- else
- update = shadowUpdateRotatePacked;
- else
- update = shadowUpdatePacked;
+ break;
+
+ case FB_TYPE_TEXT:
+ FatalError("Text frame buffers are not yet supported\n");
+ break;
+
+ case FB_TYPE_VGA_PLANES:
+ FatalError("VGA planes are not yet supported\n");
+ break;
+
+ default:
+ FatalError("Unsupported frame buffer type %u\n", priv->fix.type);
+ break;
+ }
+
return KdShadowSet(pScreen, scrpriv->randr, update, window);
}
@@ -573,6 +654,26 @@ fbdevCreateColormap(ColormapPtr pmap)
xColorItem *pdefs;
switch (priv->fix.visual) {
+ case FB_VISUAL_MONO01:
+ pScreen->whitePixel = 0;
+ pScreen->blackPixel = 1;
+ pmap->red[0].co.local.red = 65535;
+ pmap->red[0].co.local.green = 65535;
+ pmap->red[0].co.local.blue = 65535;
+ pmap->red[1].co.local.red = 0;
+ pmap->red[1].co.local.green = 0;
+ pmap->red[1].co.local.blue = 0;
+ return TRUE;
+ case FB_VISUAL_MONO10:
+ pScreen->blackPixel = 0;
+ pScreen->whitePixel = 1;
+ pmap->red[0].co.local.red = 0;
+ pmap->red[0].co.local.green = 0;
+ pmap->red[0].co.local.blue = 0;
+ pmap->red[1].co.local.red = 65535;
+ pmap->red[1].co.local.green = 65535;
+ pmap->red[1].co.local.blue = 65535;
+ return TRUE;
case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries;
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.h b/xorg-server/hw/kdrive/fbdev/fbdev.h
index 0706f4e11..f3f7aeceb 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.h
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.h
@@ -49,7 +49,7 @@ typedef struct _fbdevScrPriv {
} FbdevScrPriv;
extern KdCardFuncs fbdevFuncs;
-extern char *fbdevDevicePath;
+extern const char *fbdevDevicePath;
Bool
fbdevCardInit(KdCardInfo * card);
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index 7d9bf9ddd..1899a27a9 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -943,7 +943,8 @@ KdInitScreen(ScreenInfo * pScreenInfo,
{
KdCardInfo *card = screen->card;
- (*card->cfuncs->scrinit) (screen);
+ if (!(*card->cfuncs->scrinit) (screen))
+ FatalError("Screen initialization failed!\n");
if (!card->cfuncs->initAccel)
screen->dumb = TRUE;
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index 1514c2603..eada01cf9 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -198,11 +198,6 @@ extern _X_EXPORT void *xf86GetPointerScreenFuncs(void);
extern _X_EXPORT void xf86InitOrigins(void);
extern _X_EXPORT void xf86ReconfigureLayout(void);
-/* xf86cvt.c */
-extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay,
- float VRefresh, Bool Reduced,
- Bool Interlaced);
-
/* xf86DPMS.c */
extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set,
@@ -243,6 +238,7 @@ extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
extern _X_EXPORT void xf86PrintBacktrace(void);
+extern _X_EXPORT Bool xf86VTOwner(void);
/* xf86Helper.c */
@@ -413,26 +409,6 @@ extern _X_EXPORT void
xf86PrintModes(ScrnInfoPtr scrp);
extern _X_EXPORT void
xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
-extern _X_EXPORT double
-xf86ModeHSync(const DisplayModeRec * mode);
-extern _X_EXPORT double
-xf86ModeVRefresh(const DisplayModeRec * mode);
-extern _X_EXPORT void
-xf86SetModeDefaultName(DisplayModePtr mode);
-extern _X_EXPORT void
-xf86SetModeCrtc(DisplayModePtr p, int adjustFlags);
-extern _X_EXPORT DisplayModePtr
-xf86DuplicateMode(const DisplayModeRec * pMode);
-extern _X_EXPORT void
-xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec * pMode);
-extern _X_EXPORT DisplayModePtr
-xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList);
-extern _X_EXPORT Bool
-xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2);
-extern _X_EXPORT void
-xf86PrintModeline(int scrnIndex, DisplayModePtr mode);
-extern _X_EXPORT DisplayModePtr
-xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
/* xf86Option.c */
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 486752b07..74d5ed3b7 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -52,6 +52,7 @@
#endif
#include "xf86.h"
+#include "xf86Modes.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
#include "xf86Config.h"
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 055223310..7a949fd74 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -84,6 +84,7 @@
#include "dpmsproc.h"
#endif
+#include "xf86platformBus.h"
/*
* This is a toggling variable:
* FALSE = No VT switching keys have been pressed last time around
@@ -427,7 +428,7 @@ xf86VTSwitch(void)
* Since all screens are currently all in the same state it is sufficient
* check the first. This might change in future.
*/
- if (xf86Screens[0]->vtSema) {
+ if (xf86VTOwner()) {
DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
@@ -560,6 +561,11 @@ xf86VTSwitch(void)
for (ih = InputHandlers; ih; ih = ih->next)
xf86EnableInputHandler(ih);
+#ifdef XSERVER_PLATFORM_BUS
+ /* check for any new output devices */
+ xf86platformVTProbe();
+#endif
+
OsReleaseSIGIO();
}
}
@@ -768,3 +774,12 @@ DDXRingBell(int volume, int pitch, int duration)
{
xf86OSRingBell(volume, pitch, duration);
}
+
+Bool
+xf86VTOwner(void)
+{
+ /* at system startup xf86Screens[0] won't be set - but we will own the VT */
+ if (xf86NumScreens == 0)
+ return TRUE;
+ return xf86Screens[0]->vtSema;
+}
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 1695dbf74..91ec4c8bb 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -819,7 +819,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
if (serverGeneration != 1) {
xf86Resetting = TRUE;
/* All screens are in the same state, so just check the first */
- if (!xf86Screens[0]->vtSema) {
+ if (!xf86VTOwner()) {
#ifdef HAS_USL_VTS
ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ);
#endif
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index bee407bf9..26c03c6c3 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -870,7 +870,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
}
/* Enable it if it's properly initialised and we're currently in the VT */
- if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) {
+ if (enable && dev->inited && dev->startup && xf86VTOwner()) {
OsBlockSignals();
EnableDevice(dev, TRUE);
if (!dev->enabled) {
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c
index 58663336a..e368deeb8 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.c
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.c
@@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
+#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@@ -113,6 +114,11 @@ xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_
return NULL;
}
+Bool
+xf86_get_platform_device_unowned(int index)
+{
+ return xf86_platform_devices[index].attribs->unowned;
+}
/*
* xf86IsPrimaryPlatform() -- return TRUE if primary device
@@ -449,6 +455,14 @@ xf86platformAddDevice(int index)
CreateScratchPixmapsForScreen(xf86GPUScreens[i]->pScreen);
+ if (xf86GPUScreens[i]->pScreen->CreateScreenResources &&
+ !(*xf86GPUScreens[i]->pScreen->CreateScreenResources) (xf86GPUScreens[i]->pScreen)) {
+ RemoveGPUScreen(xf86GPUScreens[i]->pScreen);
+ xf86DeleteScreen(xf86GPUScreens[i]);
+ xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
+ xf86NumGPUScreens = old_screens;
+ return -1;
+ }
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
@@ -494,8 +508,22 @@ xf86platformRemoveDevice(int index)
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86_remove_platform_device(index);
-
+ RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}
+
+/* called on return from VT switch to find any new devices */
+void xf86platformVTProbe(void)
+{
+ int i;
+
+ for (i = 0; i < xf86_num_platform_devices; i++) {
+ if (xf86_platform_devices[i].attribs->unowned == FALSE)
+ continue;
+
+ xf86_platform_devices[i].attribs->unowned = FALSE;
+ xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs);
+ }
+}
#endif
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.h b/xorg-server/hw/xfree86/common/xf86platformBus.h
index 49afc247b..4e1757854 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.h
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.h
@@ -46,6 +46,8 @@ extern int
xf86_remove_platform_device(int dev_index);
extern Bool
xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str);
+extern Bool
+xf86_get_platform_device_unowned(int index);
extern int
xf86platformAddDevice(int index);
@@ -59,6 +61,8 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
extern _X_EXPORT int
xf86PlatformMatchDriver(char *matches[], int nmatches);
+
+extern void xf86platformVTProbe(void);
#endif
#endif
diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c
index b6a6b94b3..07eb71ed8 100644
--- a/xorg-server/hw/xfree86/common/xf86sbusBus.c
+++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c
@@ -641,14 +641,16 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
int i, index;
sbusCmapPtr cmap;
struct fbcmap fbcmap;
- unsigned char *data = malloc(numColors * 3);
+ unsigned char *data;
cmap = SBUSCMAPPTR(pScrn->pScreen);
if (!cmap)
return;
fbcmap.count = 0;
fbcmap.index = indices[0];
- fbcmap.red = data;
+ fbcmap.red = data = malloc(numColors * 3);
+ if (!data)
+ return;
fbcmap.green = data + numColors;
fbcmap.blue = fbcmap.green + numColors;
for (i = 0; i < numColors; i++) {
diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.h b/xorg-server/hw/xfree86/ddc/xf86DDC.h
index c63da8bff..bdc7648a9 100644
--- a/xorg-server/hw/xfree86/ddc/xf86DDC.h
+++ b/xorg-server/hw/xfree86/ddc/xf86DDC.h
@@ -45,8 +45,6 @@ extern _X_EXPORT void
extern _X_EXPORT Bool xf86SetDDCproperties(ScrnInfoPtr pScreen, xf86MonPtr DDC);
-extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
-
extern _X_EXPORT Bool
xf86MonitorIsHDMI(xf86MonPtr mon);
diff --git a/xorg-server/hw/xfree86/fbdevhw/Makefile.am b/xorg-server/hw/xfree86/fbdevhw/Makefile.am
index 1fa9321cb..ee5577a86 100644
--- a/xorg-server/hw/xfree86/fbdevhw/Makefile.am
+++ b/xorg-server/hw/xfree86/fbdevhw/Makefile.am
@@ -10,7 +10,7 @@ else
libfbdevhw_la_SOURCES = fbdevhwstub.c
endif
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c -I$(srcdir)/../modes -I$(srcdir)/../ddc -I$(srcdir)/../parser
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
index d4b5558a7..cbb40930b 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
@@ -6,6 +6,7 @@
#include <string.h>
#include "xf86.h"
+#include "xf86Modes.h"
#include "xf86_OSproc.h"
/* pci stuff */
diff --git a/xorg-server/hw/xfree86/modes/Makefile.am b/xorg-server/hw/xfree86/modes/Makefile.am
index 9236426bf..7e33ebb17 100644
--- a/xorg-server/hw/xfree86/modes/Makefile.am
+++ b/xorg-server/hw/xfree86/modes/Makefile.am
@@ -16,7 +16,6 @@ libxf86modes_la_SOURCES = \
xf86Modes.h \
xf86RandR12.c \
xf86RandR12.h \
- xf86Rename.h \
xf86Rotate.c \
$(DGA_SRCS)
@@ -29,7 +28,6 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
sdk_HEADERS = \
xf86Crtc.h \
xf86Modes.h \
- xf86RandR12.h \
- xf86Rename.h
+ xf86RandR12.h
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index e4b393cb1..35845e875 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -1997,6 +1997,14 @@ xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
Bool any_enabled = FALSE;
int o;
+ /*
+ * Don't bother enabling outputs on GPU screens: a client needs to attach
+ * it to a source provider before setting a mode that scans out a shared
+ * pixmap.
+ */
+ if (scrn->is_gpu)
+ return FALSE;
+
for (o = 0; o < config->num_output; o++)
any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE);
@@ -2449,11 +2457,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
config->debug_modes = xf86ReturnOptValBool(config->options,
OPTION_MODEDEBUG, FALSE);
- if (scrn->display->virtualX)
+ if (scrn->display->virtualX && !scrn->is_gpu)
width = scrn->display->virtualX;
else
width = config->maxWidth;
- if (scrn->display->virtualY)
+ if (scrn->display->virtualY && !scrn->is_gpu)
height = scrn->display->virtualY;
else
height = config->maxHeight;
@@ -2466,9 +2474,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
ret = xf86CollectEnabledOutputs(scrn, config, enabled);
if (ret == FALSE && canGrow) {
- xf86DrvMsg(i, X_WARNING,
- "Unable to find connected outputs - setting %dx%d initial framebuffer\n",
- NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
+ if (!scrn->is_gpu)
+ xf86DrvMsg(i, X_WARNING,
+ "Unable to find connected outputs - setting %dx%d "
+ "initial framebuffer\n",
+ NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
have_outputs = FALSE;
}
else {
@@ -2517,8 +2527,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
/* XXX override xf86 common frame computation code */
- scrn->display->frameX0 = 0;
- scrn->display->frameY0 = 0;
+ if (!scrn->is_gpu) {
+ scrn->display->frameX0 = 0;
+ scrn->display->frameY0 = 0;
+ }
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
@@ -2566,7 +2578,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
}
}
- if (scrn->display->virtualX == 0) {
+ if (scrn->display->virtualX == 0 || scrn->is_gpu) {
/*
* Expand virtual size to cover the current config and potential mode
* switches, if the driver can't enlarge the screen later.
@@ -2581,8 +2593,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
}
}
- scrn->display->virtualX = width;
- scrn->display->virtualY = height;
+ if (!scrn->is_gpu) {
+ scrn->display->virtualX = width;
+ scrn->display->virtualY = height;
+ }
}
if (width > scrn->virtualX)
@@ -2687,8 +2701,8 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CrtcPtr crtc = config->crtc[0];
+ int enabled = 0, failed = 0;
int c;
- int enabled = 0;
/* A driver with this hook will take care of this */
if (!crtc->funcs->set_mode_major) {
@@ -2748,11 +2762,12 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
if (config->output[o]->crtc == crtc)
config->output[o]->crtc = NULL;
crtc->enabled = FALSE;
+ ++failed;
}
}
xf86DisableUnusedFunctions(scrn);
- return enabled != 0;
+ return enabled != 0 || failed == 0;
}
/**
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h
index 802303f74..c127d78af 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.h
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h
@@ -25,9 +25,6 @@
#include <edid.h>
#include "randrstr.h"
-#if XF86_MODES_RENAME
-#include "xf86Rename.h"
-#endif
#include "xf86Modes.h"
#include "xf86Cursor.h"
#include "xf86i2c.h"
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 634ee3fe0..2b0db3492 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -481,7 +481,7 @@ xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- ++cursor->refcnt;
+ cursor = RefCursor(cursor);
if (xf86_config->cursor)
FreeCursor(xf86_config->cursor, None);
xf86_config->cursor = cursor;
@@ -500,7 +500,7 @@ xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- ++cursor->refcnt;
+ cursor = RefCursor(cursor);
if (xf86_config->cursor)
FreeCursor(xf86_config->cursor, None);
xf86_config->cursor = cursor;
diff --git a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
index bead1265a..c2e771894 100644
--- a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
+++ b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c
@@ -25,6 +25,7 @@
#include "xorg-config.h"
#include "xf86.h"
+#include "xf86Modes.h"
#include "xf86str.h"
#include "edid.h"
#include "xf86DDC.h"
diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.h b/xorg-server/hw/xfree86/modes/xf86Modes.h
index aec7688c4..545891884 100644
--- a/xorg-server/hw/xfree86/modes/xf86Modes.h
+++ b/xorg-server/hw/xfree86/modes/xf86Modes.h
@@ -36,9 +36,6 @@
#include "xorgVersion.h"
#include "edid.h"
#include "xf86Parser.h"
-#if XF86_MODES_RENAME
-#include "xf86Rename.h"
-#endif
extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec * mode);
extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec * mode);
@@ -112,6 +109,9 @@ xf86GetMonitorModes(ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor);
extern _X_EXPORT DisplayModePtr xf86GetDefaultModes(void);
extern _X_EXPORT void
+xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode);
+
+extern _X_EXPORT void
xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC);
#endif /* _XF86MODES_H_ */
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index 01fc9c5e3..2817aaa1f 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -31,6 +31,7 @@
#include "xf86.h"
#include "os.h"
#include "globals.h"
+#include "xf86Modes.h"
#include "xf86Priv.h"
#include "xf86DDC.h"
#include "mipointer.h"
@@ -1895,10 +1896,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
if (config->randr_provider->offload_sink) {
DetachOffloadGPU(screen);
config->randr_provider->offload_sink = NULL;
+ RRSetChanged(screen);
}
else if (config->randr_provider->output_source) {
DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
+ RRSetChanged(screen);
}
else if (screen->current_master)
DetachUnboundGPU(screen);
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.h b/xorg-server/hw/xfree86/modes/xf86RandR12.h
index 9ad695cec..e603799be 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.h
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.h
@@ -24,9 +24,6 @@
#define _XF86_RANDR_H_
#include <randrstr.h>
#include <X11/extensions/render.h>
-#if XF86_MODES_RENAME
-#include "xf86Rename.h"
-#endif
extern _X_EXPORT Bool xf86RandR12CreateScreenResources(ScreenPtr pScreen);
extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen);
diff --git a/xorg-server/hw/xfree86/modes/xf86Rename.h b/xorg-server/hw/xfree86/modes/xf86Rename.h
deleted file mode 100644
index 46690a8f6..000000000
--- a/xorg-server/hw/xfree86/modes/xf86Rename.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifndef _XF86RENAME_H_
-#define _XF86RENAME_H_
-
-#include "local_xf86Rename.h"
-
-#define xf86_cursors_fini XF86NAME(xf86_cursors_fini)
-#define xf86_cursors_init XF86NAME(xf86_cursors_init)
-#define xf86_hide_cursors XF86NAME(xf86_hide_cursors)
-#define xf86_reload_cursors XF86NAME(xf86_reload_cursors)
-#define xf86_show_cursors XF86NAME(xf86_show_cursors)
-#define xf86ConnectorGetName XF86NAME(xf86ConnectorGetName)
-#define xf86CrtcConfigInit XF86NAME(xf86CrtcConfigInit)
-#define xf86CrtcConfigPrivateIndex XF86NAME(xf86CrtcConfigPrivateIndex)
-#define xf86CrtcCreate XF86NAME(xf86CrtcCreate)
-#define xf86CrtcDestroy XF86NAME(xf86CrtcDestroy)
-#define xf86CrtcInUse XF86NAME(xf86CrtcInUse)
-#define xf86CrtcRotate XF86NAME(xf86CrtcRotate)
-#define xf86CrtcScreenInit XF86NAME(xf86CrtcScreenInit)
-#define xf86CrtcSetModeTransform XF86NAME(xf86CrtcSetModeTransform)
-#define xf86CrtcSetMode XF86NAME(xf86CrtcSetMode)
-#define xf86CrtcSetSizeRange XF86NAME(xf86CrtcSetSizeRange)
-#define xf86CVTMode XF86NAME(xf86CVTMode)
-#define xf86DDCMonitorSet XF86NAME(xf86DDCMonitorSet)
-#define xf86DisableUnusedFunctions XF86NAME(xf86DisableUnusedFunctions)
-#define xf86DPMSSet XF86NAME(xf86DPMSSet)
-#define xf86DuplicateMode XF86NAME(xf86DuplicateMode)
-#define xf86DuplicateModes XF86NAME(xf86DuplicateModes)
-#define xf86GetDefaultModes XF86NAME(xf86GetDefaultModes)
-#define xf86GetMonitorModes XF86NAME(xf86GetMonitorModes)
-#define xf86InitialConfiguration XF86NAME(xf86InitialConfiguration)
-#define xf86ModeHSync XF86NAME(xf86ModeHSync)
-#define xf86ModesAdd XF86NAME(xf86ModesAdd)
-#define xf86ModesEqual XF86NAME(xf86ModesEqual)
-#define xf86ModeVRefresh XF86NAME(xf86ModeVRefresh)
-#define xf86OutputCreate XF86NAME(xf86OutputCreate)
-#define xf86OutputDestroy XF86NAME(xf86OutputDestroy)
-#define xf86OutputGetEDID XF86NAME(xf86OutputGetEDID)
-#define xf86OutputGetEDIDModes XF86NAME(xf86OutputGetEDIDModes)
-#define xf86OutputRename XF86NAME(xf86OutputRename)
-#define xf86OutputSetEDID XF86NAME(xf86OutputSetEDID)
-#define xf86OutputUseScreenMonitor XF86NAME(xf86OutputUseScreenMonitor)
-#define xf86PrintModeline XF86NAME(xf86PrintModeline)
-#define xf86ProbeOutputModes XF86NAME(xf86ProbeOutputModes)
-#define xf86PruneInvalidModes XF86NAME(xf86PruneInvalidModes)
-#define xf86RotateCloseScreen XF86NAME(xf86RotateCloseScreen)
-#define xf86SetModeCrtc XF86NAME(xf86SetModeCrtc)
-#define xf86SetModeDefaultName XF86NAME(xf86SetModeDefaultName)
-#define xf86SetScrnInfoModes XF86NAME(xf86SetScrnInfoModes)
-#define xf86ValidateModesClocks XF86NAME(xf86ValidateModesClocks)
-#define xf86ValidateModesFlags XF86NAME(xf86ValidateModesFlags)
-#define xf86ValidateModesSize XF86NAME(xf86ValidateModesSize)
-#define xf86ValidateModesSync XF86NAME(xf86ValidateModesSync)
-#define xf86ValidateModesUserConfig XF86NAME(xf86ValidateModesUserConfig)
-#define xf86DiDGAInit XF86NAME(xf86DiDGAInit)
-#define xf86DiDGAReInit XF86NAME(xf86DiDGAReInit)
-#define xf86DDCGetModes XF86NAME(xf86DDCGetModes)
-#define xf86RandR12CreateScreenResources XF86NAME(xf86RandR12CreateScreenResources)
-#define xf86RandR12GetOriginalVirtualSize XF86NAME(xf86RandR12GetOriginalVirtualSize)
-#define xf86RandR12GetRotation XF86NAME(xf86RandR12GetRotation)
-#define xf86RandR12Init XF86NAME(xf86RandR12Init)
-#define xf86RandR12PreInit XF86NAME(xf86RandR12PreInit)
-#define xf86RandR12SetConfig XF86NAME(xf86RandR12SetConfig)
-#define xf86RandR12SetRotations XF86NAME(xf86RandR12SetRotations)
-#define xf86SaveScreen XF86NAME(xf86SaveScreen)
-#define xf86CrtcSetScreenSubpixelOrder XF86NAME(xf86CrtcSetScreenSubpixelOrder)
-#define xf86ModeWidth XF86NAME(xf86ModeWidth)
-#define xf86ModeHeight XF86NAME(xf86ModeHeight)
-#define xf86OutputFindClosestMode XF86NAME(xf86OutputFindClosestMode)
-#define xf86SetSingleMode XF86NAME(xf86SetSingleMode)
-#define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes)
-
-#endif /* _XF86RENAME_H_ */
diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
index 826000712..14e6d4bfd 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
@@ -617,8 +617,10 @@ sparcPromPathname2Node(const char *pathName)
return 0;
strcpy(name, pathName);
name[i + 1] = 0;
- if (name[0] != '/')
+ if (name[0] != '/') {
+ free(name);
return 0;
+ }
p = strchr(name + 1, '/');
if (p)
*p = 0;
@@ -629,8 +631,10 @@ sparcPromPathname2Node(const char *pathName)
*regstr++ = 0;
else
regstr = p;
- if (name + 1 == regstr)
+ if (name + 1 == regstr) {
+ free(name);
return 0;
+ }
promGetSibling(0);
i = promWalkPathname2Node(name + 1, regstr, promRootNode, 0);
free(name);
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
index 76f5583dd..1865b31b9 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
@@ -7,6 +7,8 @@
#include <xf86drm.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
+#include <string.h>
/* Linux platform device support */
#include "xf86_OSproc.h"
@@ -18,11 +20,12 @@
#include "hotplug.h"
static Bool
-get_drm_info(struct OdevAttributes *attribs, char *path)
+get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
{
drmSetVersion sv;
char *buf;
int fd;
+ int err = 0;
fd = open(path, O_RDWR, O_CLOEXEC);
if (fd == -1)
@@ -32,19 +35,26 @@ get_drm_info(struct OdevAttributes *attribs, char *path)
sv.drm_di_minor = 4;
sv.drm_dd_major = -1; /* Don't care */
sv.drm_dd_minor = -1; /* Don't care */
- if (drmSetInterfaceVersion(fd, &sv)) {
- ErrorF("setversion 1.4 failed\n");
- return FALSE;
+
+ err = drmSetInterfaceVersion(fd, &sv);
+ if (err) {
+ ErrorF("setversion 1.4 failed: %s\n", strerror(-err));
+ goto out;
}
- xf86_add_platform_device(attribs);
+ /* for a delayed probe we've already added the device */
+ if (delayed_index == -1) {
+ xf86_add_platform_device(attribs);
+ delayed_index = xf86_num_platform_devices - 1;
+ }
buf = drmGetBusid(fd);
- xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
+ xf86_add_platform_device_attrib(delayed_index,
ODEV_ATTRIB_BUSID, buf);
drmFreeBusid(buf);
+out:
close(fd);
- return TRUE;
+ return (err == 0);
}
Bool
@@ -89,6 +99,23 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
}
void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs)
+{
+ Bool ret;
+ char *dpath;
+ dpath = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH);
+
+ ret = get_drm_info(attribs, dpath, index);
+ if (ret == FALSE) {
+ xf86_remove_platform_device(index);
+ return;
+ }
+ ret = xf86platformAddDevice(index);
+ if (ret == -1)
+ xf86_remove_platform_device(index);
+}
+
+void
xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
{
struct OdevAttribute *attrib;
@@ -116,10 +143,17 @@ xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
if (i != xf86_num_platform_devices)
goto out_free;
- LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n",
- path);
+ LogMessage(X_INFO, "xfree86: Adding drm device (%s)\n", path);
- ret = get_drm_info(attribs, path);
+ if (!xf86VTOwner()) {
+ /* if we don't currently own the VT then don't probe the device,
+ just mark it as unowned for later use */
+ attribs->unowned = TRUE;
+ xf86_add_platform_device(attribs);
+ return;
+ }
+
+ ret = get_drm_info(attribs, path, -1);
if (ret == FALSE)
goto out_free;
@@ -138,6 +172,9 @@ void NewGPUDeviceRequest(struct OdevAttributes *attribs)
if (old_num == xf86_num_platform_devices)
return;
+ if (xf86_get_platform_device_unowned(xf86_num_platform_devices - 1) == TRUE)
+ return;
+
ret = xf86platformAddDevice(xf86_num_platform_devices-1);
if (ret == -1)
xf86_remove_platform_device(xf86_num_platform_devices-1);
@@ -171,7 +208,10 @@ void DeleteGPUDeviceRequest(struct OdevAttributes *attribs)
ErrorF("xf86: remove device %d %s\n", index, syspath);
- xf86platformRemoveDevice(index);
+ if (xf86_get_platform_device_unowned(index) == TRUE)
+ xf86_remove_platform_device(index);
+ else
+ xf86platformRemoveDevice(index);
out:
config_odev_free_attribute_list(attribs);
}
diff --git a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
index ab3757a2a..4d08c1e85 100644
--- a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
+++ b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
{
fd_set fds;
struct timeval timeout;
- char c[4];
+ /* this needs to be big enough to flush an evdev event. */
+ char c[256];
DebugF("FlushingSerial\n");
if (tcflush(fd, TCIFLUSH) == 0)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
index 4b75a98ac..68527a577 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
@@ -274,7 +274,7 @@ xf86OpenConsole(void)
* this is to make sure we don't continue until the activate
* signal is received.
*/
- if (!xf86Screens[0]->vtSema)
+ if (!xf86VTOwner())
sleep(5);
}
#endif /* HAS_USL_VTS */
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
index ea2b16e46..6be594651 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
@@ -223,6 +223,9 @@ extern _X_EXPORT void xf86InitVidMem(void);
#include "hotplug.h"
void
xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
+
+void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
#endif
_XFUNCPROTOEND
diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
index d32aac1cf..860704e1c 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
@@ -271,7 +271,7 @@ xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
(xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
xf86CursorScreenKey);
- if (pCurs->refcnt <= 1)
+ if (CursorRefCount(pCurs) <= 1)
dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen,
NULL);
@@ -285,7 +285,7 @@ xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
(xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
xf86CursorScreenKey);
- if (pCurs->refcnt <= 1) {
+ if (CursorRefCount(pCurs) <= 1) {
free(dixLookupScreenPrivate
(&pCurs->devPrivates, CursorScreenKey, pScreen));
dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen,
@@ -322,37 +322,37 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
/* only update for VCP, otherwise we get cursor jumps when removing a
sprite. The second cursor is never HW rendered anyway. */
if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer) {
- pCurs->refcnt++;
+ CursorPtr cursor = RefCursor(pCurs);
if (ScreenPriv->CurrentCursor)
FreeCursor(ScreenPriv->CurrentCursor, None);
- ScreenPriv->CurrentCursor = pCurs;
+ ScreenPriv->CurrentCursor = cursor;
ScreenPriv->x = x;
ScreenPriv->y = y;
ScreenPriv->CursorToRestore = NULL;
- ScreenPriv->HotX = pCurs->bits->xhot;
- ScreenPriv->HotY = pCurs->bits->yhot;
+ ScreenPriv->HotX = cursor->bits->xhot;
+ ScreenPriv->HotY = cursor->bits->yhot;
if (!infoPtr->pScrn->vtSema)
- ScreenPriv->SavedCursor = pCurs;
+ ScreenPriv->SavedCursor = cursor;
if (infoPtr->pScrn->vtSema && xorg_list_is_empty(&pScreen->pixmap_dirty_list) &&
(ScreenPriv->ForceHWCursorCount ||
((
#ifdef ARGB_CURSOR
- pCurs->bits->argb &&
+ cursor->bits->argb &&
infoPtr->UseHWCursorARGB &&
- (*infoPtr->UseHWCursorARGB)(pScreen, pCurs)) ||
- (pCurs->bits->argb == 0 &&
+ (*infoPtr->UseHWCursorARGB)(pScreen, cursor)) ||
+ (cursor->bits->argb == 0 &&
#endif
- (pCurs->bits->height <= infoPtr->MaxHeight) &&
- (pCurs->bits->width <= infoPtr->MaxWidth) &&
- (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor) (pScreen, pCurs)))))) {
+ (cursor->bits->height <= infoPtr->MaxHeight) &&
+ (cursor->bits->width <= infoPtr->MaxWidth) &&
+ (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor) (pScreen, cursor)))))) {
if (ScreenPriv->SWCursor) /* remove the SW cursor */
(*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen,
NullCursor, x, y);
- xf86SetCursor(pScreen, pCurs, x, y);
+ xf86SetCursor(pScreen, cursor, x, y);
ScreenPriv->SWCursor = FALSE;
ScreenPriv->isUp = TRUE;
diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.am b/xorg-server/hw/xfree86/utils/cvt/Makefile.am
index 4ebcedf39..754606e8e 100644
--- a/xorg-server/hw/xfree86/utils/cvt/Makefile.am
+++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.am
@@ -24,6 +24,7 @@ bin_PROGRAMS = cvt
INCLUDES = $(XORG_INCS) \
-I$(top_srcdir)/hw/xfree86/ddc \
+ -I$(top_srcdir)/hw/xfree86/modes \
-I$(top_srcdir)/hw/xfree86/parser
# gah
diff --git a/xorg-server/hw/xfree86/utils/cvt/cvt.c b/xorg-server/hw/xfree86/utils/cvt/cvt.c
index 9483964e0..5e2888e94 100644
--- a/xorg-server/hw/xfree86/utils/cvt/cvt.c
+++ b/xorg-server/hw/xfree86/utils/cvt/cvt.c
@@ -24,6 +24,7 @@
/* Standalone VESA CVT standard timing modelines generator. */
#include "xf86.h"
+#include "xf86Modes.h"
/* FatalError implementation used by the server code we built in */
void
diff --git a/xorg-server/hw/xfree86/vbe/Makefile.am b/xorg-server/hw/xfree86/vbe/Makefile.am
index 0b24faf1f..1720eb93b 100644
--- a/xorg-server/hw/xfree86/vbe/Makefile.am
+++ b/xorg-server/hw/xfree86/vbe/Makefile.am
@@ -10,4 +10,5 @@ sdk_HEADERS = vbe.h vbeModes.h
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
+ -I$(srcdir)/../modes -I$(srcdir)/../parser \
-I$(srcdir)/../int10
diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c
index 97a9bcf60..f0344af9c 100644
--- a/xorg-server/hw/xfree86/vbe/vbe.c
+++ b/xorg-server/hw/xfree86/vbe/vbe.c
@@ -16,6 +16,7 @@
#include <string.h>
#include "xf86.h"
+#include "xf86Modes.h"
#include "vbe.h"
#include <X11/extensions/dpmsconst.h>
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index c8508a9b8..6da9f3b72 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -83,7 +83,7 @@ static int
void *
winClipboardProc(void *pvNotUsed)
{
- Atom atomClipboard, atomClipboardManager;
+ Atom atomClipboard;
int iReturn;
HWND hwnd = NULL;
int iConnectionNumber = 0;
@@ -206,9 +206,8 @@ winClipboardProc(void *pvNotUsed)
iMaxDescriptor = iConnectionNumber + 1;
#endif
- /* Create atoms */
+ /* Create atom */
atomClipboard = XInternAtom(pDisplay, "CLIPBOARD", False);
- atomClipboardManager = XInternAtom(pDisplay, "CLIPBOARD_MANAGER", False);
/* Create a messaging window */
iWindow = XCreateSimpleWindow(pDisplay,
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index a02146e95..86f332aad 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -431,7 +431,6 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
{
static winPrivScreenPtr s_pScreenPriv = NULL;
static winScreenInfo *s_pScreenInfo = NULL;
- static ScreenPtr s_pScreen = NULL;
#if CYGDEBUG
winDebug("winChangeDepthDlgProc\n");
@@ -447,12 +446,11 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
/* Store pointers to private structures for future use */
s_pScreenPriv = (winPrivScreenPtr) lParam;
s_pScreenInfo = s_pScreenPriv->pScreenInfo;
- s_pScreen = s_pScreenInfo->pScreen;
#if CYGDEBUG
winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %08x, "
- "s_pScreenInfo: %08x, s_pScreen: %08x\n",
- s_pScreenPriv, s_pScreenInfo, s_pScreen);
+ "s_pScreenInfo: %08x\n",
+ s_pScreenPriv, s_pScreenInfo);
#endif
#if CYGDEBUG
@@ -562,8 +560,6 @@ static wBOOL CALLBACK
winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
{
static winPrivScreenPtr s_pScreenPriv = NULL;
- static winScreenInfo *s_pScreenInfo = NULL;
- static ScreenPtr s_pScreen = NULL;
#if CYGDEBUG
winDebug("winAboutDlgProc\n");
@@ -576,10 +572,8 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
winDebug("winAboutDlgProc - WM_INITDIALOG\n");
#endif
- /* Store pointers to private structures for future use */
+ /* Store pointer to private structure for future use */
s_pScreenPriv = (winPrivScreenPtr) lParam;
- s_pScreenInfo = s_pScreenPriv->pScreenInfo;
- s_pScreen = s_pScreenInfo->pScreen;
winInitDialog(hwndDialog);
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index 27c114c99..e412f2355 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -328,7 +328,6 @@ winIsFakeCtrl_L(UINT message, WPARAM wParam, LPARAM lParam)
Bool fReturn;
static Bool lastWasControlL = FALSE;
- static UINT lastMessage;
static LONG lastTime;
/*
@@ -352,7 +351,6 @@ winIsFakeCtrl_L(UINT message, WPARAM wParam, LPARAM lParam)
if (!fReturn) {
lastWasControlL = TRUE;
- lastMessage = message;
lastTime = lTime;
}
else {
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index c0c7db2b7..09481560c 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -808,7 +808,6 @@ winMinimizeWindow(Window id)
HWND hWnd;
ScreenPtr pScreen = NULL;
winPrivScreenPtr pScreenPriv = NULL;
- winScreenInfo *pScreenInfo = NULL;
#if CYGWINDOWING_DEBUG
ErrorF("winMinimizeWindow\n");
@@ -824,11 +823,9 @@ winMinimizeWindow(Window id)
pScreen = pWin->drawable.pScreen;
if (pScreen)
pScreenPriv = winGetScreenPriv(pScreen);
- if (pScreenPriv)
- pScreenInfo = pScreenPriv->pScreenInfo;
#ifdef XWIN_MULTIWINDOWEXTWM
- if (pScreenPriv && pScreenInfo->fInternalWM) {
+ if (pScreenPriv && pScreenPriv->pScreenInfo->fInternalWM) {
pRLWinPriv =
(win32RootlessWindowPtr) RootlessFrameForWindow(pWin, FALSE);
hWnd = pRLWinPriv->hWnd;
diff --git a/xorg-server/hw/xwin/winpfbdd.c b/xorg-server/hw/xwin/winpfbdd.c
index ee6ea7290..f87000726 100644
--- a/xorg-server/hw/xwin/winpfbdd.c
+++ b/xorg-server/hw/xwin/winpfbdd.c
@@ -514,8 +514,6 @@ static Bool
winHotKeyAltTabPrimaryDD(ScreenPtr pScreen)
{
winScreenPriv(pScreen);
- winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- RECT rcClient, rcSrc;
HRESULT ddrval = DD_OK;
ErrorF("\nwinHotKeyAltTabPrimaryDD\n\n");
@@ -527,11 +525,6 @@ winHotKeyAltTabPrimaryDD(ScreenPtr pScreen)
if (pScreenPriv->pddsPrimary == NULL || pScreenPriv->pddsOffscreen == NULL)
return FALSE;
- /* Get client area in screen coords */
- GetClientRect(pScreenPriv->hwndScreen, &rcClient);
- MapWindowPoints(pScreenPriv->hwndScreen,
- HWND_DESKTOP, (LPPOINT) &rcClient, 2);
-
/* Did we loose the primary surface? */
ddrval = IDirectDrawSurface2_IsLost(pScreenPriv->pddsPrimary);
if (ddrval == DD_OK) {
@@ -541,12 +534,6 @@ winHotKeyAltTabPrimaryDD(ScreenPtr pScreen)
"surface\n");
}
- /* Setup a source rectangle */
- rcSrc.left = 0;
- rcSrc.top = 0;
- rcSrc.right = pScreenInfo->dwWidth;
- rcSrc.bottom = pScreenInfo->dwHeight;
-
/* Blit the primary surface to the offscreen surface */
ddrval = IDirectDrawSurface2_Blt(pScreenPriv->pddsOffscreen, NULL, /* should be rcDest */
pScreenPriv->pddsPrimary,
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index e776bdba6..5623b8881 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -259,7 +259,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
VisualPtr pVisual = NULL;
- char *pbits = NULL;
#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
int iReturn;
@@ -293,9 +292,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
}
- /* Setup a local variable to point to the framebuffer */
- pbits = pScreenInfo->pfb;
-
/* Apparently we need this for the render extension */
miSetPixmapDepths();
diff --git a/xorg-server/hw/xwin/winwin32rootlesswindow.c b/xorg-server/hw/xwin/winwin32rootlesswindow.c
index f2d68cb46..ce615e692 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswindow.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswindow.c
@@ -186,7 +186,6 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
{
Bool fDecorate = FALSE;
DWORD dwExStyle = 0;
- DWORD dwStyle = 0;
WINDOWPLACEMENT wndPlace;
UINT showCmd = 0;
@@ -217,9 +216,8 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
winDebug("winMWExtWMUpdateWindowDecoration %08x %s\n",
(int) pRLWinPriv, fDecorate ? "Decorate" : "Bare");
- /* Get the standard and extended window style information */
+ /* Get the extended window style information */
dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
- dwStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_STYLE);
if (fDecorate) {
RECT rcNew;
diff --git a/xorg-server/hw/xwin/winwindow.c b/xorg-server/hw/xwin/winwindow.c
index ab6d8dec2..029bd855d 100644
--- a/xorg-server/hw/xwin/winwindow.c
+++ b/xorg-server/hw/xwin/winwindow.c
@@ -128,7 +128,6 @@ winCopyWindowNativeGDI(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
BoxPtr pBox;
int dx, dy;
int i, nbox;
- WindowPtr pwinRoot;
BoxPtr pBoxDst;
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -138,9 +137,6 @@ winCopyWindowNativeGDI(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
ErrorF("winCopyWindow\n");
#endif
- /* Get a pointer to the root window */
- pwinRoot = pWin->drawable.pScreen->root;
-
/* Create a region for the destination */
prgnDst = RegionCreate(NULL, 1);
diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c
index fbd41aaa8..6e9d63c53 100644
--- a/xorg-server/hw/xwin/winwindowswm.c
+++ b/xorg-server/hw/xwin/winwindowswm.c
@@ -66,18 +66,6 @@ typedef struct _WMEvent {
unsigned int mask;
} WMEventRec;
-static inline BoxRec
-make_box(int x, int y, int w, int h)
-{
- BoxRec r;
-
- r.x1 = x;
- r.y1 = y;
- r.x2 = x + w;
- r.y2 = y + h;
- return r;
-}
-
static int
ProcWindowsWMQueryVersion(ClientPtr client)
{
@@ -319,7 +307,6 @@ static int
ProcWindowsWMFrameGetRect(ClientPtr client)
{
xWindowsWMFrameGetRectReply rep;
- BoxRec ir;
RECT rcNew;
REQUEST(xWindowsWMFrameGetRectReq);
@@ -334,8 +321,6 @@ ProcWindowsWMFrameGetRect(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
- ir = make_box(stuff->ix, stuff->iy, stuff->iw, stuff->ih);
-
if (stuff->frame_rect != 0) {
ErrorF("ProcWindowsWMFrameGetRect - stuff->frame_rect != 0\n");
return BadValue;
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 7ba028042..c7509ea19 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -62,7 +62,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static winScreenInfo *s_pScreenInfo = NULL;
static ScreenPtr s_pScreen = NULL;
static HWND s_hwndLastPrivates = NULL;
- static HINSTANCE s_hInstance;
static Bool s_fTracking = FALSE;
static unsigned long s_ulServerGeneration = 0;
static UINT s_uTaskbarRestart = 0;
@@ -117,7 +116,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
* areas of our display window.
*/
s_pScreenPriv = ((LPCREATESTRUCT) lParam)->lpCreateParams;
- s_hInstance = ((LPCREATESTRUCT) lParam)->hInstance;
s_pScreenInfo = s_pScreenPriv->pScreenInfo;
s_pScreen = s_pScreenInfo->pScreen;
s_hwndLastPrivates = hwnd;