xserver: Branch 'master' - 6 commits

Adam Jackson ajax at kemper.freedesktop.org
Fri Nov 2 09:06:58 PDT 2007


 hw/xfree86/common/xf86Cursor.c          |    8 ++++++++
 hw/xfree86/fbdevhw/fbdevhw.c            |    2 +-
 hw/xfree86/os-support/linux/lnx_mouse.c |   32 ++++++++++++++++++++++++--------
 hw/xfree86/parser/Flags.c               |    2 +-
 hw/xfree86/parser/Monitor.c             |    2 --
 hw/xfree86/parser/scan.c                |    2 +-
 hw/xfree86/vbe/vbeModes.c               |   28 ----------------------------
 7 files changed, 35 insertions(+), 41 deletions(-)

New commits:
commit 7a0555e9bb59d02816803a1100f807d2d29f31d4
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Fix crash in xf86InitOrigins()
    
    In a multihead setup, if only the first screen can be
    initialized, but the second screen is mentioned first in the
    ServerLayout section, the xf86InitOrigins() function will crash
    because the screen referred to in the e.g. "RightOf" part is
    non-existent.

diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 9e6e622..3ea1b4d 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -558,6 +558,14 @@ xf86InitOrigins(void)
 
 	    screen = &xf86ConfigLayout.screens[i];
 
+	    if (screen->refscreen != NULL &&
+		screen->refscreen->screennum >= xf86NumScreens) {
+		screensLeft &= ~(1 << i);
+	        xf86Msg(X_WARNING, "Not including screen \"%s\" in origins calculation.\n",
+			screen->screen->id);
+	        continue;
+	    }
+
 	    switch(screen->where) {
 	    case PosObsolete:
 		OldStyleConfig = TRUE;
commit 5b41d4e60be35cfb96bedec0931fd5922823b4b9
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Don't filter modes away during VBE mode list construction.
    
    Pass all VBE modes back up to the driver, on the assumption that it
    knows how to filter modes intelligently.

diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/vbe/vbeModes.c
index ef2c728..061d7b6 100644
--- a/hw/xfree86/vbe/vbeModes.c
+++ b/hw/xfree86/vbe/vbeModes.c
@@ -152,34 +152,6 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
 	xf86ErrorFVerb(DEBUG_VERB, "*");
     }
 
-    /*
-     * Check if there's a valid monitor mode that this one can be matched
-     * up with.  The actual matching is done later.
-     */
-    if (modeOK) {
-	Bool sizeMatch = FALSE;
-	modeOK = FALSE;
-	for (p = pScrn->monitor->Modes; p != NULL; p = p->next) {
-	    if ((p->HDisplay != mode->XResolution) ||
-		(p->VDisplay != mode->YResolution) ||
-		(p->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2)))
-		continue;
-	    sizeMatch = TRUE;
-	    /* XXX could support the various V_ flags */
-	    status = xf86CheckModeForMonitor(p, pScrn->monitor);
-	    if (status == MODE_OK) {
-		modeOK = TRUE;
-		break;
-	    }
-	}
-	if (sizeMatch && !modeOK) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-		       "Not using built-in mode \"%dx%d\" (%s)\n",
-		        mode->XResolution, mode->YResolution,
-		        xf86ModeStatusToString(status));
-	}
-    }
-
     xf86ErrorFVerb(DEBUG_VERB,
 	    "Mode: %x (%dx%d)\n", id, mode->XResolution, mode->YResolution);
     xf86ErrorFVerb(DEBUG_VERB,
commit c095da04fe7c73b6503ef5b93549b13796c51b22
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Fix magic number in fbdevhw
    
    The transformation between fbdev and xfree86 mode timings needs to be
    invertible, otherwise Xen and other framebuffers that don't have real
    pixel clocks won't initialize.

diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 837d2b1..13be785 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -258,7 +258,7 @@ fbdev_modes_equal(struct fb_var_screeninfo *set, struct fb_var_screeninfo *req)
 static void
 fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
 {
-	mode->Clock = var->pixclock ? 1000000000/var->pixclock : 28000000;
+	mode->Clock = var->pixclock ? 1000000000/var->pixclock : 0;
 	mode->HDisplay = var->xres;
 	mode->HSyncStart = mode->HDisplay+var->right_margin;
 	mode->HSyncEnd = mode->HSyncStart+var->hsync_len;
commit f4fe66f6767d1941317dc0280ac359421a152587
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Disable explicit commenting in Monitor section.

diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index 4bff4b2..9d53312 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -688,8 +688,6 @@ xf86printMonitorSection (FILE * cf, XF86ConfMonitorPtr ptr)
 			fprintf (cf, "\tDisplaySize  %d\t%d\n",
 					 ptr->mon_width,
 					 ptr->mon_height);
-		if ( ptr->mon_n_hsync || ptr->mon_n_vrefresh )
-		    fprintf(cf," ### Comment all HorizSync and VertRefresh values to use DDC:\n");
 		for (i = 0; i < ptr->mon_n_hsync; i++)
 		{
 			fprintf (cf, "\tHorizSync    %2.1f - %2.1f\n",
commit 22f0e3a8b04e574047a51c8f928a007787303294
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Avoid PS/2 protocol probing for /dev/input/mice
    
    The kernel will always upconvert to ExplorerPS/2 for all readers of
    /dev/input/mice, so don't waste time on startup trying to figure
    that out.

diff --git a/hw/xfree86/os-support/linux/lnx_mouse.c b/hw/xfree86/os-support/linux/lnx_mouse.c
index 150547e..d282215 100644
--- a/hw/xfree86/os-support/linux/lnx_mouse.c
+++ b/hw/xfree86/os-support/linux/lnx_mouse.c
@@ -45,7 +45,8 @@ typedef enum {
 	MOUSE_PROTO_SERIAL,
 	MOUSE_PROTO_PS2,
 	MOUSE_PROTO_MSC,
-	MOUSE_PROTO_GPM
+	MOUSE_PROTO_GPM,
+	MOUSE_PROTO_EXPPS2,
 } protocolTypes;
 
 static struct {
@@ -55,7 +56,8 @@ static struct {
 	{ MOUSE_PROTO_UNKNOWN,	NULL },
 	{ MOUSE_PROTO_PS2,	"PS/2" },
 	{ MOUSE_PROTO_MSC,	"MouseSystems" },
-	{ MOUSE_PROTO_GPM,	"GPM" }
+	{ MOUSE_PROTO_GPM,	"GPM" },
+	{ MOUSE_PROTO_EXPPS2,   "ExplorerPS/2" },
 };
 
 static const char *
@@ -87,7 +89,7 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
 }
 
 static const char *
-GuessProtocol(InputInfoPtr pInfo, int flags)
+lnxMouseMagic(InputInfoPtr pInfo)
 {
     int fd = -1;
     const char *dev;
@@ -137,8 +139,10 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
 	}
     }
 
-    if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
-	proto = MOUSE_PROTO_PS2;
+    if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0)
+	proto = MOUSE_PROTO_EXPPS2;
+    else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
+	proto = MOUSE_PROTO_EXPPS2;
     else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
 	proto = MOUSE_PROTO_MSC;
     else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
@@ -171,15 +175,14 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
 	close(fd);
     }
     if (proto == MOUSE_PROTO_UNKNOWN) {
-	xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
+	xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n",
 		pInfo->name);
 	return NULL;
     } else {
 	for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
 	    if (devproto[i].proto == proto) {
 		xf86Msg(X_INFO,
-			"%s: GuessProtocol: "
-			"setting mouse protocol to \"%s\"\n", 
+			"%s: Setting mouse protocol to \"%s\"\n",
 			pInfo->name, devproto[i].name);
 		return devproto[i].name;
 	    }
@@ -188,6 +191,18 @@ GuessProtocol(InputInfoPtr pInfo, int flags)
     return NULL;
 }
 
+static const char *
+GuessProtocol(InputInfoPtr pInfo, int flags)
+{
+    return lnxMouseMagic(pInfo);
+}
+
+static const char *
+SetupAuto(InputInfoPtr pInfo, int *protoPara)
+{
+    return lnxMouseMagic(pInfo);
+}
+
 _X_EXPORT OSMouseInfoPtr
 xf86OSMouseInit(int flags)
 {
@@ -200,6 +215,7 @@ xf86OSMouseInit(int flags)
     p->DefaultProtocol = DefaultProtocol;
     p->FindDevice = FindDevice;
     p->GuessProtocol = GuessProtocol;
+    p->SetupAuto = SetupAuto;
     return p;
 }
 
commit b97518666dc32710fe69eee33ee56881dcff1bbc
Author: Adam Jackson <ajax at redhat.com>
Date:   Sun Oct 28 09:37:52 2007 +0100

    Fix accidental ABI usage in RANDR 1.2 drivers.
    
    Due to RANDR 1.2, xf86findOptionValue and xf86nameCompare are now ABI.
    Make sure they're exported from the server.

diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 5b60a51..730ea0c 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -330,7 +330,7 @@ xf86findOption (XF86OptionPtr list, const char *name)
  * returned.  If the option is not found, a NULL is returned.
  */
 
-char *
+__attribute__((visibility("default"))) char *
 xf86findOptionValue (XF86OptionPtr list, const char *name)
 {
 	XF86OptionPtr p = xf86findOption (list, name);
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 55c7eb5..e7989d1 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -948,7 +948,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab)
  * Compare two names.  The characters '_', ' ', and '\t' are ignored
  * in the comparison.
  */
-int
+__attribute__((visibility("default"))) int
 xf86nameCompare (const char *s1, const char *s2)
 {
 	char c1, c2;


More information about the xorg-commit mailing list