[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-savage: Changes to 'debian-unstable'



 ChangeLog                                                      |   46 ++++
 debian/changelog                                               |    7 
 debian/patches/01_savage_driver_disable_randr_on_rotation.diff |   58 ------
 debian/patches/02_savage_check_ShadowVirtual.diff              |   23 --
 debian/patches/series                                          |    2 
 man/savage.man                                                 |   17 +
 src/savage_driver.c                                            |   96 ++++++++--
 7 files changed, 144 insertions(+), 105 deletions(-)

New commits:
commit b8c9e078445bb8d1339111b889e465fb0910a14c
Author: Brice Goglin <Brice.Goglin@ens-lyon.org>
Date:   Thu Jul 12 10:13:27 2007 +0200

    Pull more upstream fixes, up to b706ffe07fc61281d2dea406f828418f42e3da85
    
    + Fix segfault in SavageDoAdjustFrame() on server 1.3, closes: #423485.
    + Fix console corruption due to invalid shadow status, closes: #428089.
    + Drop 01_savage_driver_disable_randr_on_rotation.diff and
      02_savage_check_ShadowVirtual.diff, both integrated uptream.

diff --git a/ChangeLog b/ChangeLog
index 265740d..3237e30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,49 @@
+commit b706ffe07fc61281d2dea406f828418f42e3da85
+Author: Alex Deucher <alex@botch2.com>
+Date:   Thu Jul 12 00:03:13 2007 -0400
+
+    Unmap mem before freeing driverPrivate
+
+commit fab88bce3b9f19918bbf1a2b0f57d34113c8381f
+Author: Alex Deucher <alex@botch2.com>
+Date:   Wed Jul 11 23:40:51 2007 -0400
+
+    Add panel native mode automatically.
+    
+    Based on Henry Zhao's code from nv
+
+commit b126b204d3465700e8c6a1fcc4770f322c8bb7db
+Author: Tormod Volden <bugzi06.fdo.tormod@xoxy.net>
+Date:   Wed Jul 11 21:25:30 2007 -0400
+
+    Add "DRI" option to enable/disable DRI support
+    
+    fixes bug 10746
+
+commit 90692b3a123861ca02100f86b4c80f070fd4196d
+Author: Alex Deucher <alex@botch2.com>
+Date:   Wed Jul 11 21:07:47 2007 -0400
+
+    fix segfault in SavageDoAdjustFrame() on server 1.3
+    
+    tracked down by Tormod Volden, fixes bug 10934
+
+commit 7832dcd82046238d5accb55468c65241f0edc6d0
+Author: Alex Deucher <alex@botch2.com>
+Date:   Wed Jul 11 21:01:03 2007 -0400
+
+    fix console corruption due to invalid shadow status
+    
+    tracked down by Tormod Volden, fixes bug 11237
+
+commit 8dd310538df11cc5ff4e8e84920218b819bbae47
+Author: David Nusinow <dnusinow@debian.org>
+Date:   Wed Jul 11 20:00:25 2007 -0400
+
+    disable randr when savage rotation is enabled
+    
+    fixes bug 7899
+
 commit 4b2a0ad8f15e7b11f7c8251fb032b9df4f07ce96
 Author: Nate Bargmann <n0nb@networksplus.net>
 Date:   Sat May 5 13:35:02 2007 +0200
diff --git a/debian/changelog b/debian/changelog
index cba288c..be7f564 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,10 @@
 xserver-xorg-video-savage (1:2.1.2-6) UNRELEASED; urgency=low
 
-  * Add 02_savage_check_ShadowVirtual.diff, thanks Tormod Volden
-    (closes: #428089).
+  * Pull more upstream fixes, up to b706ffe07fc61281d2dea406f828418f42e3da85
+    + Fix segfault in SavageDoAdjustFrame() on server 1.3, closes: #423485.
+    + Fix console corruption due to invalid shadow status, closes: #428089.
+    + Drop 01_savage_driver_disable_randr_on_rotation.diff, integrated
+      uptream.
 
  -- Brice Goglin <Brice.Goglin@ens-lyon.org>  Wed, 11 Jul 2007 19:04:31 +0200
 
diff --git a/debian/patches/01_savage_driver_disable_randr_on_rotation.diff b/debian/patches/01_savage_driver_disable_randr_on_rotation.diff
deleted file mode 100644
index 4094df6..0000000
--- a/debian/patches/01_savage_driver_disable_randr_on_rotation.diff
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: xf86-video-savage-X11R7.0-2.0.2.3/man/savage.man
-===================================================================
---- xf86-video-savage-X11R7.0-2.0.2.3.orig/man/savage.man	2006-01-12 22:55:15.000000000 -0500
-+++ xf86-video-savage-X11R7.0-2.0.2.3/man/savage.man	2006-02-26 18:44:31.000000000 -0500
-@@ -84,13 +84,18 @@
- .BI "Option \*qRotate\*q \*qCW\*q"
- .TP
- .BI "Option \*qRotate\*q \*qCCW\*q"
--Rotate the desktop 90 degrees clockwise or counterclockwise.  This option 
--forces the ShadowFB option on, and disables acceleration.
-+Rotate the desktop 90 degrees clockwise or counterclockwise.
-+This option forces the ShadowFB option on, and disables acceleration and
-+the RandR extension.
- Default: no rotation.
- .TP
- .BI "Option \*qShadowFB\*q \*q" boolean \*q
--Enable or disable use of the shadow framebuffer layer.  This option
--disables acceleration.  Default: off.
-+Enable or disable use of the shadow framebuffer layer.
-+.\" See
-+.\" .BR shadowfb (__drivermansuffix__)
-+.\" for further information.
-+This option disables acceleration.
-+Default: off.
- .TP
- .BI "Option \*qLCDClock\*q \*q" frequency \*q
- Override the maximum dot clock.  Some LCD panels produce incorrect results if
-Index: xf86-video-savage-X11R7.0-2.0.2.3/src/savage_driver.c
-===================================================================
---- xf86-video-savage-X11R7.0-2.0.2.3.orig/src/savage_driver.c	2006-01-12 22:55:15.000000000 -0500
-+++ xf86-video-savage-X11R7.0-2.0.2.3/src/savage_driver.c	2006-02-26 18:51:20.000000000 -0500
-@@ -1127,15 +1127,23 @@
-     if ((s = xf86GetOptValString(psav->Options, OPTION_ROTATE))) {
- 	if(!xf86NameCmp(s, "CW")) {
- 	    /* accel is disabled below for shadowFB */
-+             /* RandR is disabled when the Rotate option is used (does
-+              * not work well together and scrambles the screen) */
-+
- 	    psav->shadowFB = TRUE;
- 	    psav->rotate = 1;
-+            xf86DisableRandR();
- 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, 
--		       "Rotating screen clockwise - acceleration disabled\n");
-+		       "Rotating screen clockwise"
-+                       "- acceleration and RandR disabled\n");
- 	} else if(!xf86NameCmp(s, "CCW")) {
- 	    psav->shadowFB = TRUE;
- 	    psav->rotate = -1;
--	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,  "Rotating screen"
--		       "counter clockwise - acceleration disabled\n");
-+            xf86DisableRandR();
-+            xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
-+                   "Rotating screen counter clockwise"
-+                   " - acceleration and RandR disabled\n");
-+
- 	} else {
- 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "\"%s\" is not a valid"
- 		       "value for Option \"Rotate\"\n", s);
diff --git a/debian/patches/02_savage_check_ShadowVirtual.diff b/debian/patches/02_savage_check_ShadowVirtual.diff
deleted file mode 100644
index 7c5ee49..0000000
--- a/debian/patches/02_savage_check_ShadowVirtual.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-Fixes #428089
-
-https://bugs.freedesktop.org/show_bug.cgi?id=11237
-
-This is a workaround, that keeps the server from crashing and borking the
-consoles. It returns from ShadowWait if there is no ShadowVirtual pointer. 
-But I think ShadowWait should not have been called in the first place.
-
-Index: xserver-xorg-video-savage-2.1.2/src/savage_driver.c
-===================================================================
---- xserver-xorg-video-savage-2.1.2.orig/src/savage_driver.c	2007-07-07 11:22:06.000000000 +0200
-+++ xserver-xorg-video-savage-2.1.2/src/savage_driver.c	2007-07-07 11:28:35.000000000 +0200
-@@ -549,6 +549,10 @@
-     if( !psav->NoPCIRetry )
- 	return 0;
- 
-+    /* in case we should not have been here */
-+    if( !psav->ShadowVirtual )
-+	return 0;
-+
-     psav->ShadowCounter = (psav->ShadowCounter + 1) & 0xffff;
-     if (psav->ShadowCounter == 0)
- 	psav->ShadowCounter++; /* 0 is reserved for the BIOS
diff --git a/debian/patches/series b/debian/patches/series
index edbcf00..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +0,0 @@
-01_savage_driver_disable_randr_on_rotation.diff
-02_savage_check_ShadowVirtual.diff

commit b706ffe07fc61281d2dea406f828418f42e3da85
Author: Alex Deucher <alex@botch2.com>
Date:   Thu Jul 12 00:03:13 2007 -0400

    Unmap mem before freeing driverPrivate

diff --git a/src/savage_driver.c b/src/savage_driver.c
index 84b9fcd..c56edf1 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -766,9 +766,9 @@ static void SavageFreeRec(ScrnInfoPtr pScrn)
     TRACE(( "SavageFreeRec(%x)\n", pScrn->driverPrivate ));
     if (!pScrn->driverPrivate)
 	return;
+    SavageUnmapMem(pScrn, 1);
     xfree(pScrn->driverPrivate);
     pScrn->driverPrivate = NULL;
-    SavageUnmapMem(pScrn, 1);
 }
 
 

commit fab88bce3b9f19918bbf1a2b0f57d34113c8381f
Author: Alex Deucher <alex@botch2.com>
Date:   Wed Jul 11 23:40:51 2007 -0400

    Add panel native mode automatically.
    
    Based on Henry Zhao's code from nv

diff --git a/src/savage_driver.c b/src/savage_driver.c
index 98ea08e..84b9fcd 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -936,6 +936,63 @@ static void SavageDoDDC(ScrnInfoPtr pScrn)
     }
 }
 
+/* Copied from ddc/Property.c via nv */
+static DisplayModePtr
+SavageModesAdd(DisplayModePtr Modes, DisplayModePtr Additions)
+{
+    if (!Modes) {
+        if (Additions)
+            return Additions;
+        else
+            return NULL;
+    }
+
+    if (Additions) {
+        DisplayModePtr Mode = Modes;
+
+        while (Mode->next)
+            Mode = Mode->next;
+        
+        Mode->next = Additions;
+        Additions->prev = Mode;
+    }
+
+    return Modes;
+}
+
+/* borrowed from nv */
+static void
+SavageAddPanelMode(ScrnInfoPtr pScrn)
+{
+    SavagePtr psav= SAVPTR(pScrn);
+    DisplayModePtr  Mode  = NULL;
+
+    Mode = xf86CVTMode(psav->PanelX, psav->PanelY, 60.00, TRUE, FALSE);
+    Mode->type = M_T_DRIVER | M_T_PREFERRED;
+    pScrn->monitor->Modes = SavageModesAdd(pScrn->monitor->Modes, Mode);
+
+    if ((pScrn->monitor->nHsync == 0) && 
+        (pScrn->monitor->nVrefresh == 0)) {
+	if (!Mode->HSync)
+	    Mode->HSync = ((float) Mode->Clock ) / ((float) Mode->HTotal);
+	if (!Mode->VRefresh)
+	    Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) /
+		((float) (Mode->HTotal * Mode->VTotal));
+
+	if (Mode->HSync < pScrn->monitor->hsync[0].lo)
+	    pScrn->monitor->hsync[0].lo = Mode->HSync;
+	if (Mode->HSync > pScrn->monitor->hsync[0].hi)
+	    pScrn->monitor->hsync[0].hi = Mode->HSync;
+	if (Mode->VRefresh < pScrn->monitor->vrefresh[0].lo)
+	    pScrn->monitor->vrefresh[0].lo = Mode->VRefresh;
+	if (Mode->VRefresh > pScrn->monitor->vrefresh[0].hi)
+	    pScrn->monitor->vrefresh[0].hi = Mode->VRefresh;
+
+	pScrn->monitor->nHsync = 1;
+	pScrn->monitor->nVrefresh = 1;
+    }
+}
+
 static void SavageGetPanelInfo(ScrnInfoPtr pScrn)
 {
     SavagePtr psav= SAVPTR(pScrn);
@@ -1952,6 +2009,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
     if(psav->DisplayType == MT_LCD)
     {
 	SavageGetPanelInfo(pScrn);
+	SavageAddPanelMode(pScrn);
     }
   
 #if 0

commit b126b204d3465700e8c6a1fcc4770f322c8bb7db
Author: Tormod Volden <bugzi06.fdo.tormod@xoxy.net>
Date:   Wed Jul 11 21:25:30 2007 -0400

    Add "DRI" option to enable/disable DRI support
    
    fixes bug 10746

diff --git a/man/savage.man b/man/savage.man
index 9e8dd27..e5d3d27 100644
--- a/man/savage.man
+++ b/man/savage.man
@@ -221,6 +221,10 @@ on an AGP card the AGP bus speed is not set and no AGP aperture is
 allocated. This implies
 .BI DmaType
 \*qPCI\*q.
+.TP
+.BI "Option \*qDRI\*q \*q" boolean \*q
+Enable DRI support.  This option allows you to enable or disable the DRI.
+Default: \*qon\*q (enable DRI).
 .SH FILES
 savage_drv.o
 .SH "SEE ALSO"
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 1ed7782..98ea08e 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -245,6 +245,7 @@ typedef enum {
     ,OPTION_DMA_MODE
     ,OPTION_AGP_MODE
     ,OPTION_AGP_SIZE
+    ,OPTION_DRI
 } SavageOpts;
 
 
@@ -277,6 +278,7 @@ static const OptionInfoRec SavageOptions[] =
     { OPTION_DMA_MODE,  "DmaMode",	OPTV_ANYSTR,  {0}, FALSE },
     { OPTION_AGP_MODE,	"AGPMode",	OPTV_INTEGER, {0}, FALSE },
     { OPTION_AGP_SIZE,	"AGPSize",	OPTV_INTEGER, {0}, FALSE },
+    { OPTION_DRI,       "DRI",          OPTV_BOOLEAN, {0}, TRUE },
 #endif
     { -1,		NULL,		OPTV_NONE,    {0}, FALSE }
 };
@@ -3120,8 +3122,12 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen,
     vgaHWBlankScreen(pScrn, TRUE);
 
 #ifdef XF86DRI
-    if (psav->IsSecondary) {
-	    psav->directRenderingEnabled = FALSE;
+    if (!xf86ReturnOptValBool(psav->Options, OPTION_DRI, TRUE)) {
+	psav->directRenderingEnabled = FALSE;
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "Direct rendering forced off\n");
+    } else if (psav->IsSecondary) {
+	psav->directRenderingEnabled = FALSE;
     } else if (xf86IsEntityShared(psav->pEnt->index)) {
 	    /* Xinerama has sync problem with DRI, disable it for now */
 	    psav->directRenderingEnabled = FALSE;

commit 90692b3a123861ca02100f86b4c80f070fd4196d
Author: Alex Deucher <alex@botch2.com>
Date:   Wed Jul 11 21:07:47 2007 -0400

    fix segfault in SavageDoAdjustFrame() on server 1.3
    
    tracked down by Tormod Volden, fixes bug 10934

diff --git a/src/savage_driver.c b/src/savage_driver.c
index 27cf8ad..1ed7782 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -3911,7 +3911,6 @@ void
 SavageDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, int crtc2)
 {
     SavagePtr psav = SAVPTR(pScrn);
-    DisplayModePtr currentMode = pScrn->currentMode;    
     int address=0,top=0,left=0,tile_height,tile_size;
     
     TRACE(("SavageDoAdjustFrame(%d,%d,%x)\n", x, y, flags));
@@ -3942,15 +3941,6 @@ SavageDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, int crtc2)
     
     address += pScrn->fbOffset;
 
-    /*
-     * because we align the viewport to the width and height of one tile
-     * we should update the locate of frame
-     */
-    pScrn->frameX0 = left;
-    pScrn->frameY0 = top;
-    pScrn->frameX1 = left + currentMode->HDisplay - 1;
-    pScrn->frameY1 = top + currentMode->VDisplay - 1;
-
     if (psav->Chipset == S3_SAVAGE_MX) {
 	if (!crtc2) {
             OUTREG32(PRI_STREAM_FBUF_ADDR0, address & 0xFFFFFFFC);

commit 7832dcd82046238d5accb55468c65241f0edc6d0
Author: Alex Deucher <alex@botch2.com>
Date:   Wed Jul 11 21:01:03 2007 -0400

    fix console corruption due to invalid shadow status
    
    tracked down by Tormod Volden, fixes bug 11237

diff --git a/src/savage_driver.c b/src/savage_driver.c
index 6ffe772..27cf8ad 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -3834,6 +3834,8 @@ static Bool SavageCloseScreen(int scrnIndex, ScreenPtr pScreen)
 #ifdef XF86DRI
     if (psav->directRenderingEnabled) {
         SAVAGEDRICloseScreen(pScreen);
+	/* reset shadow values */
+	SavageInitShadowStatus(pScrn);
         psav->directRenderingEnabled=FALSE;
     }
 #endif

commit 8dd310538df11cc5ff4e8e84920218b819bbae47
Author: David Nusinow <dnusinow@debian.org>
Date:   Wed Jul 11 20:00:25 2007 -0400

    disable randr when savage rotation is enabled
    
    fixes bug 7899

diff --git a/man/savage.man b/man/savage.man
index 721c6b8..9e8dd27 100644
--- a/man/savage.man
+++ b/man/savage.man
@@ -95,13 +95,18 @@ possibly unstable.  The default is
 .BI "Option \*qRotate\*q \*qCW\*q"
 .TP
 .BI "Option \*qRotate\*q \*qCCW\*q"
-Rotate the desktop 90 degrees clockwise or counterclockwise.  This option 
-forces the ShadowFB option on, and disables acceleration.
+Rotate the desktop 90 degrees clockwise or counterclockwise.
+This option forces the ShadowFB option on, and disables acceleration and
+the RandR extension.
 Default: no rotation.
 .TP
 .BI "Option \*qShadowFB\*q \*q" boolean \*q
-Enable or disable use of the shadow framebuffer layer.  This option
-disables acceleration.  Default: off.
+Enable or disable use of the shadow framebuffer layer.
+.\" See
+.\" .BR shadowfb (__drivermansuffix__)
+.\" for further information.
+This option disables acceleration.
+Default: off.
 .TP
 .BI "Option \*qLCDClock\*q \*q" frequency \*q
 Override the maximum dot clock.  Some LCD panels produce incorrect results if
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 2c51770..6ffe772 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -1165,15 +1165,23 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
     if ((s = xf86GetOptValString(psav->Options, OPTION_ROTATE))) {
 	if(!xf86NameCmp(s, "CW")) {
 	    /* accel is disabled below for shadowFB */
+             /* RandR is disabled when the Rotate option is used (does
+              * not work well together and scrambles the screen) */
+
 	    psav->shadowFB = TRUE;
 	    psav->rotate = 1;
+            xf86DisableRandR();
 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, 
-		       "Rotating screen clockwise - acceleration disabled\n");
+		       "Rotating screen clockwise"
+                       "- acceleration and RandR disabled\n");
 	} else if(!xf86NameCmp(s, "CCW")) {
 	    psav->shadowFB = TRUE;
 	    psav->rotate = -1;
-	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,  "Rotating screen"
-		       "counter clockwise - acceleration disabled\n");
+            xf86DisableRandR();
+            xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+                   "Rotating screen counter clockwise"
+                   " - acceleration and RandR disabled\n");
+
 	} else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "\"%s\" is not a valid"
 		       "value for Option \"Rotate\"\n", s);



Reply to: