xserver: Branch 'master' - 7 commits
Peter Hutterer
whot at kemper.freedesktop.org
Tue Sep 15 18:49:35 PDT 2009
dix/dixfonts.c | 27 ++++++++
hw/dmx/dmxgcops.c | 2
hw/dmx/dmxinit.c | 2
hw/xfree86/common/xf86Bus.c | 19 ------
hw/xfree86/common/xf86Config.c | 16 -----
hw/xfree86/common/xf86VGAarbiter.c | 107 ++++++++++++++++++++---------------
hw/xfree86/common/xf86VGAarbiter.h | 2
hw/xfree86/doc/man/xorg.conf.man.pre | 6 -
test/xi2/protocol-common.c | 2
test/xi2/protocol-eventconvert.c | 2
test/xi2/protocol-xiselectevents.c | 3
11 files changed, 102 insertions(+), 86 deletions(-)
New commits:
commit 159e03204093991ccd4133133c50c0cae88c828f
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Sep 15 11:39:09 2009 +1000
dmx: don't include panoramiXsrv.h if building w/o Xinerama
Reported-by: Marvin Schmidt
Tested-by: Marvin Schmidt
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c
index eaabf16..267a306 100644
--- a/hw/dmx/dmxgcops.c
+++ b/hw/dmx/dmxgcops.c
@@ -50,7 +50,9 @@
#include "pixmapstr.h"
#include "dixfontstr.h"
+#ifdef PANORAMIX
#include "panoramiXsrv.h"
+#endif
#define DMX_GCOPS_SET_DRAWABLE(_pDraw, _draw) \
do { \
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 6a0c259..e5598e3 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -59,7 +59,9 @@
#include <X11/Xos.h> /* For gettimeofday */
#include "dixstruct.h"
+#ifdef PANORAMIX
#include "panoramiXsrv.h"
+#endif
#include <signal.h> /* For SIGQUIT */
commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52
Author: Rémi Cardona <remi at gentoo.org>
Date: Mon Sep 14 17:09:59 2009 +0200
dix: append "built-ins" to the font path in SetDefaultFontPath
49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on
a "fixed" font go away but only Xorg could use the built-ins fonts by
default.
With this commit, all DDXs get "built-ins" appended to their FontPath, not
just Xorg.
Tested with Xorg, Xvfb and Xnest.
Signed-off-by: Rémi Cardona <remi at gentoo.org>
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Tested-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 7d7ae71..d0a46c7 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1810,6 +1810,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error)
int
SetDefaultFontPath(char *path)
{
+ char *temp_path,
+ *start,
+ *end;
unsigned char *cp,
*pp,
*nump,
@@ -1820,12 +1823,31 @@ SetDefaultFontPath(char *path)
size = 0,
bad;
+ /* ensure temp_path contains "built-ins" */
+ start = path;
+ while (1) {
+ start = strstr(start, "built-ins");
+ if (start == NULL)
+ break;
+ end = start + strlen("built-ins");
+ if ((start == path || start[-1] == ',') && (!*end || *end == ','))
+ break;
+ start = end;
+ }
+ if (!start) {
+ temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
+ } else {
+ temp_path = Xstrdup(path);
+ }
+ if (!temp_path)
+ return BadAlloc;
+
/* get enough for string, plus values -- use up commas */
- len = strlen(path) + 1;
+ len = strlen(temp_path) + 1;
nump = cp = newpath = xalloc(len);
if (!newpath)
return BadAlloc;
- pp = (unsigned char *) path;
+ pp = (unsigned char *) temp_path;
cp++;
while (*pp) {
if (*pp == ',') {
@@ -1844,6 +1866,7 @@ SetDefaultFontPath(char *path)
err = SetFontPathElements(num, newpath, &bad, TRUE);
xfree(newpath);
+ xfree(temp_path);
return err;
}
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index e81eb0f..82c3993 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -614,22 +614,6 @@ configFiles(XF86ConfFilesPtr fileconf)
pathFrom = X_DEFAULT;
temp_path = defaultFontPath ? defaultFontPath : "";
- /* ensure defaultFontPath contains "built-ins" */
- start = strstr(temp_path, "built-ins");
- end = start + strlen("built-ins");
- if (start == NULL ||
- !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) {
- defaultFontPath = Xprintf("%s%sbuilt-ins",
- temp_path, *temp_path ? "," : "");
- if (must_copy == TRUE) {
- if (defaultFontPath != NULL) {
- must_copy = FALSE;
- }
- } else {
- /* already made a copy of the font path */
- xfree(temp_path);
- }
- }
/* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath;
defaultFontPath = xf86ValidateFontPath(temp_path);
commit 139368f7ae192b592e24d013e8ca5ce4175effe1
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Sep 15 17:53:50 2009 -0700
Fix num_masks/length overflow test for XiSelectEvents
Have to set windowid to a valid value first, since that check
appears earlier in the code than the masks/length check.
Also have to have data[] set large enough so that reading mask
data for 0xFFFF masks doesn't overflow past the end of the array
into uninitialized data.
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index f314462..fe1c26d 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -60,7 +60,7 @@
#include "protocol-common.h"
#include <glib.h>
-static unsigned char *data[4096 * 16]; /* the request data buffer */
+static unsigned char *data[4096 * 20]; /* the request data buffer */
int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask)
{
@@ -284,6 +284,7 @@ static void test_XISelectEvents(void)
request_XISelectEvent(req, BadWindow);
g_test_message("Triggering num_masks/length overflow");
+ req->win = ROOT_WINDOW_ID;
/* Integer overflow - req->length can't hold that much */
req->num_masks = 0xFFFF;
request_XISelectEvent(req, BadLength);
commit 13decf5efe76e735a003227c951e58a41e36a8b5
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Sep 15 13:54:51 2009 -0700
test_convert_XIRawEvent: Don't write more data than the struct holds
sizeof(in.valuators.mask) * 8 == 40, but the valuators arrays only
holds 36 entries, so the test was smashing the stack when 36 < i < 40
(leading to core dumps on Solaris x86, since the return address was
overwritten with an invalid pointer).
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index f723f74..65ddec5 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -247,7 +247,7 @@ static void test_convert_XIRawEvent(void)
XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
commit 38a61e9a7cf616e26a79dba815bf67737317d1eb
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Sep 15 13:54:50 2009 -0700
Remove stray semi-colon in protocol-common.c
Caused Sun compilers to issue warning:
"protocol-common.c", line 141: warning: syntax error: empty declaration
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
index 2d0bc36..2dff1ad 100644
--- a/test/xi2/protocol-common.c
+++ b/test/xi2/protocol-common.c
@@ -138,7 +138,7 @@ void init_window(WindowPtr window, WindowPtr parent, int id)
/* Needed for the screen setup, otherwise we crash during sprite initialization */
static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; }
-static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; };
+static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; }
void init_simple(void)
{
screenInfo.arraySize = MAXSCREENS;
commit e320736c457ea7b2f19a4c7c2dfc0c461d0dd405
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Mon Sep 14 19:51:22 2009 -0700
Fix module path in xorg.conf man page
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index d714b2a..35f3687 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -714,12 +714,12 @@ multimedia subdirectories of each of those directories.
In addition to this, operating system specific subdirectories of all
the above are searched first if they exist.
.PP
-To see what extension modules are available, check the contents
-of the following directory:
+To see what extension modules are available, check the extensions
+subdirectory under:
.PP
.RS 4
.nf
-__projectroot__/lib/modules/extensions
+__modulepath__
.fi
.RE
.PP
commit 49b98d092ec3d032e657eeff62c22fce243b1e8b
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date: Thu Sep 10 17:52:33 2009 +0300
xfree86: vgaarb: rework wrapping function
No semantical changes.
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index f0a0723..9d243c1 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -521,30 +521,15 @@ xf86PostProbe(void)
void
xf86PostScreenInit(void)
{
-#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
- int vga_count;
-#endif
if (doFramebufferMode) {
SetSIGIOForState(OPERATING);
return;
}
- /*
- * we need to wrap the arbiter if we have more than
- * one VGA card - hotplug cries.
- */
-#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
- pci_device_vgaarb_get_info(NULL, &vga_count, NULL);
- if (vga_count > 1 && xf86Screens) {
- int i;
- xf86Msg(X_INFO,"Number of VGA devices: %d: arbiter wrapping enabled\n", vga_count);
- for (i = 0; i < xf86NumScreens; i++)
- xf86VGAarbiterWrapFunctions(xf86Screens[i]->pScreen);
- }
-#endif
+ xf86VGAarbiterWrapFunctions();
+
DebugF("PostScreenInit generation: %i\n",serverGeneration);
xf86EnterServerState(OPERATING);
-
}
/*
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index c389739..9b72331 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -35,6 +35,7 @@
#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
#include "xf86VGAarbiterPriv.h"
#include "xf86Bus.h"
+#include "xf86Priv.h"
#include "pciaccess.h"
#ifdef DEBUG
@@ -153,59 +154,77 @@ xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn)
}
Bool
-xf86VGAarbiterWrapFunctions(ScreenPtr pScreen)
+xf86VGAarbiterWrapFunctions(void)
{
ScrnInfoPtr pScrn;
VGAarbiterScreenPtr pScreenPriv;
miPointerScreenPtr PointPriv;
#ifdef RENDER
- PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+ PictureScreenPtr ps;
#endif
+ ScreenPtr pScreen;
+ int vga_count, i;
if (vga_no_arb)
- return FALSE;
-
- pScrn = xf86Screens[pScreen->myNum];
- PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
-
- DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum);
-
- if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec)))
- return FALSE;
-
- if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec))))
- return FALSE;
-
- dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv);
-
- WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
- WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
- WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
- WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
- WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
- WRAP_SCREEN(GetImage, VGAarbiterGetImage);
- WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
- WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate);
- WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow);
- WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground);
- WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap);
- WRAP_SCREEN(StoreColors, VGAarbiterStoreColors);
- WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor);
- WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor);
- WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor);
- WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor);
- WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition);
+ return FALSE;
+
+ /*
+ * we need to wrap the arbiter if we have more than
+ * one VGA card - hotplug cries.
+ */
+ pci_device_vgaarb_get_info(NULL, &vga_count, NULL);
+ if (vga_count < 2 || !xf86Screens)
+ return FALSE;
+
+ xf86Msg(X_INFO,"Found %d VGA devices: arbiter wrapping enabled\n",
+ vga_count);
+
+ for (i = 0; i < xf86NumScreens; i++) {
+ pScreen = xf86Screens[i]->pScreen;
+ ps = GetPictureScreenIfSet(pScreen);
+ pScrn = xf86Screens[pScreen->myNum];
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
+
+ DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum);
+
+ if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec)))
+ return FALSE;
+
+ if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec))))
+ return FALSE;
+
+ dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv);
+
+ WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
+ WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
+ WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
+ WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
+ WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
+ WRAP_SCREEN(GetImage, VGAarbiterGetImage);
+ WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
+ WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate);
+ WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow);
+ WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground);
+ WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap);
+ WRAP_SCREEN(StoreColors, VGAarbiterStoreColors);
+ WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor);
+ WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor);
+ WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor);
+ WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor);
+ WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition);
#ifdef RENDER
- WRAP_PICT(Composite,VGAarbiterComposite);
- WRAP_PICT(Glyphs,VGAarbiterGlyphs);
- WRAP_PICT(CompositeRects,VGAarbiterCompositeRects);
+ WRAP_PICT(Composite,VGAarbiterComposite);
+ WRAP_PICT(Glyphs,VGAarbiterGlyphs);
+ WRAP_PICT(CompositeRects,VGAarbiterCompositeRects);
#endif
- WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame);
- WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode);
- WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT);
- WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT);
- WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen);
- WRAP_SPRITE;
+ WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame);
+ WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode);
+ WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT);
+ WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT);
+ WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen);
+ WRAP_SPRITE;
+ }
+
return TRUE;
}
@@ -1152,6 +1171,6 @@ void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {}
Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; }
void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {}
void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) {}
-Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) { return FALSE; }
+Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; }
#endif
diff --git a/hw/xfree86/common/xf86VGAarbiter.h b/hw/xfree86/common/xf86VGAarbiter.h
index 145d31c..904b6b0 100644
--- a/hw/xfree86/common/xf86VGAarbiter.h
+++ b/hw/xfree86/common/xf86VGAarbiter.h
@@ -34,7 +34,7 @@
extern void xf86VGAarbiterInit(void);
extern void xf86VGAarbiterFini(void);
void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
-extern Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen);
+extern Bool xf86VGAarbiterWrapFunctions(void);
extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
More information about the xorg-commit
mailing list