ChangeLog | 44 +++++ configure.ac | 2 debian/changelog | 24 +- debian/patches/fix-fallback.diff | 45 ----- debian/patches/series | 1 src/alp_driver.c | 5 src/cir_driver.c | 12 + src/cir_shadow.c | 317 ++++++++++++++++++++++----------------- src/lg_driver.c | 5 9 files changed, 251 insertions(+), 204 deletions(-)
New commits: commit c666c31845b06a5f96f439b85b0fa71e10aeaba7 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue Jan 8 11:28:37 2013 +0100 release to raring diff --git a/debian/changelog b/debian/changelog index e4e6def..1ff9f2f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -xserver-xorg-video-cirrus (1:1.5.2-1) UNRELEASED; urgency=low +xserver-xorg-video-cirrus (1:1.5.2-0ubuntu1) raring; urgency=low * Sync from unreleased debian git. - Upstream release fixes cirRefreshArea SEGV (LP: #1043513) * Drop fix-fallback.diff, upstreamed. - -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 08 Jan 2013 11:18:53 +0100 + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 08 Jan 2013 11:21:32 +0100 xserver-xorg-video-cirrus (1:1.5.2-1) UNRELEASED; urgency=low commit ee22dcd8e1ca95c12d0d9835d0dcfc4c296ed165 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue Jan 8 11:20:53 2013 +0100 Sync from unreleased debian git. * Sync from unreleased debian git. - Upstream release fixes cirRefreshArea SEGV (LP: #1043513) * Drop fix-fallback.diff, upstreamed. diff --git a/debian/changelog b/debian/changelog index e769949..e4e6def 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,13 @@ xserver-xorg-video-cirrus (1:1.5.2-1) UNRELEASED; urgency=low + * Sync from unreleased debian git. + - Upstream release fixes cirRefreshArea SEGV (LP: #1043513) + * Drop fix-fallback.diff, upstreamed. + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 08 Jan 2013 11:18:53 +0100 + +xserver-xorg-video-cirrus (1:1.5.2-1) UNRELEASED; urgency=low + * New upstream release. * Require xserver 1.13rc1 * Refresh 10-qemu.diff diff --git a/debian/patches/fix-fallback.diff b/debian/patches/fix-fallback.diff deleted file mode 100644 index 7e543a9..0000000 --- a/debian/patches/fix-fallback.diff +++ /dev/null @@ -1,45 +0,0 @@ -commit bc04e9ed659be51a3c712f34a038bd60f639f9c5 -Author: Dave Airlie <airl...@redhat.com> -Date: Mon Aug 20 13:49:19 2012 +1000 - - cirrus: fix falling back after kernel check - - if we find a kernel driver the code leave the pci slot claimed which - stops us falling back. unclaim the pci slot. - - Signed-off-by: Dave Airlie <airl...@redhat.com> - -diff --git a/src/cir_driver.c b/src/cir_driver.c -index 5468b6b..c8d5aae 100644 ---- a/src/cir_driver.c -+++ b/src/cir_driver.c -@@ -237,9 +237,10 @@ CIRProbe(DriverPtr drv, int flags) - CIRChipsets, CIRPciChipsets, devSections, - numDevSections, drv, &usedChips); - /* Free it since we don't need that list after this */ -- free(devSections); -- if (numUsed <= 0) -+ if (numUsed <= 0) { -+ free(devSections); - return FALSE; -+ } - if (flags & PROBE_DETECT) - foundScreen = TRUE; - else for (i = 0; i < numUsed; i++) { -@@ -257,6 +258,8 @@ CIRProbe(DriverPtr drv, int flags) - pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); - xf86DrvMsg(0, X_ERROR, - "cirrus: This driver cannot operate until it has been unloaded.\n"); -+ xf86UnclaimPciSlot(pPci, devSections[0]); -+ free(devSections); - return FALSE; - } - #endif -@@ -290,6 +293,7 @@ CIRProbe(DriverPtr drv, int flags) - pScrn->Probe = NULL; - } - } -+ free(devSections); - free(usedChips); - - return foundScreen; diff --git a/debian/patches/series b/debian/patches/series index 7fa23bc..354eb33 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 10-qemu.diff -fix-fallback.diff commit 257211311d6f94ad50615a632ff99caccbc01bd7 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue Jan 8 11:15:51 2013 +0100 New upstream release. diff --git a/ChangeLog b/ChangeLog index a5d1a48..d730d78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +commit e2bf5b255611de267bc1c56b2fccf51268d28f3d +Author: Maarten Lankhorst <maarten.lankho...@canonical.com> +Date: Tue Jan 8 11:04:38 2013 +0100 + + cirrus: release 1.5.2 + +commit bade70ce71ea26fae4f250f0bd1729dfb0d392df +Author: Maarten Lankhorst <maarten.lankho...@canonical.com> +Date: Tue Jan 8 11:00:33 2013 +0100 + + cirrus: fix out of bounds access to shadowfb + + Perform the same bounds checking other drivers do. Thanks to Dave Gilbert for feedback on this patch. + + Signed-off-by: Maarten Lankhorst <maarten.lankho...@canonical.com> + +commit 5fcb3b018797457c3099a86c6c1257b6e4e89ceb +Author: Adam Jackson <a...@redhat.com> +Date: Tue Sep 25 08:54:36 2012 -0400 + + Remove mibstore.h + + Signed-off-by: Adam Jackson <a...@redhat.com> + +commit aa9016576163b3065910437b6ea51a69f24a41ca +Author: Dave Airlie <airl...@gmail.com> +Date: Tue Aug 21 21:01:43 2012 +1000 + + cirrus: fix build against old server + + Reported-by: jobermayer on irc + Signed-off-by: Dave Airlie <airl...@redhat.com> + +commit bc04e9ed659be51a3c712f34a038bd60f639f9c5 +Author: Dave Airlie <airl...@redhat.com> +Date: Mon Aug 20 13:49:19 2012 +1000 + + cirrus: fix falling back after kernel check + + if we find a kernel driver the code leave the pci slot claimed which + stops us falling back. unclaim the pci slot. + + Signed-off-by: Dave Airlie <airl...@redhat.com> + commit 129076c2a9c20ab515736bb7141b4f334699e21b Author: Dave Airlie <airl...@redhat.com> Date: Tue Jul 17 16:05:09 2012 +1000 diff --git a/debian/changelog b/debian/changelog index b47b682..dee9d6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -xserver-xorg-video-cirrus (1:1.5.1-1) UNRELEASED; urgency=low +xserver-xorg-video-cirrus (1:1.5.2-1) UNRELEASED; urgency=low - * New upstream release 1.5.1 + * New upstream release. * Require xserver 1.13rc1 * Refresh 10-qemu.diff commit e2bf5b255611de267bc1c56b2fccf51268d28f3d Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue Jan 8 11:04:38 2013 +0100 cirrus: release 1.5.2 diff --git a/configure.ac b/configure.ac index dddf9ef..0e00305 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-cirrus], - [1.5.1], + [1.5.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-cirrus]) AC_CONFIG_SRCDIR([Makefile.am]) commit bade70ce71ea26fae4f250f0bd1729dfb0d392df Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue Jan 8 11:00:33 2013 +0100 cirrus: fix out of bounds access to shadowfb Perform the same bounds checking other drivers do. Thanks to Dave Gilbert for feedback on this patch. Signed-off-by: Maarten Lankhorst <maarten.lankho...@canonical.com> diff --git a/src/cir_shadow.c b/src/cir_shadow.c index a9b425b..6bde0fd 100644 --- a/src/cir_shadow.c +++ b/src/cir_shadow.c @@ -15,30 +15,41 @@ #include "cir.h" #include "alp.h" +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + _X_EXPORT void cirRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { CirPtr pCir = CIRPTR(pScrn); - int width, height, Bpp, FBPitch; + int width, height, Bpp, FBPitch, x1, x2, y1, y2; unsigned char *src, *dst; Bpp = pScrn->bitsPerPixel >> 3; FBPitch = BitmapBytePad(pScrn->displayWidth * pScrn->bitsPerPixel); while(num--) { - width = (pbox->x2 - pbox->x1) * Bpp; - height = pbox->y2 - pbox->y1; - src = pCir->ShadowPtr + (pbox->y1 * pCir->ShadowPitch) + - (pbox->x1 * Bpp); - dst = pCir->FbBase + (pbox->y1 * FBPitch) + (pbox->x1 * Bpp); - - while(height--) { - memcpy(dst, src, width); - dst += FBPitch; - src += pCir->ShadowPitch; - } - - pbox++; + x1 = MAX(pbox->x1, 0); + y1 = MAX(pbox->y1, 0); + x2 = MIN(pbox->x2, pScrn->virtualX); + y2 = MIN(pbox->y2, pScrn->virtualY); + + width = (x2 - x1) * Bpp; + height = y2 - y1; + + if (width <= 0 || height <= 0) + continue; + + src = pCir->ShadowPtr + (y1 * pCir->ShadowPitch) + (x1 * Bpp); + dst = pCir->FbBase + (y1 * FBPitch) + (x1 * Bpp); + + while(height--) { + memcpy(dst, src, width); + dst += FBPitch; + src += pCir->ShadowPitch; + } + + pbox++; } } @@ -64,7 +75,7 @@ _X_EXPORT void cirRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { CirPtr pCir = CIRPTR(pScrn); - int count, width, height, y1, y2, dstPitch, srcPitch; + int count, width, height, x1, x2, y1, y2, dstPitch, srcPitch; CARD8 *dstPtr, *srcPtr, *src; CARD32 *dst; @@ -72,36 +83,44 @@ cirRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox) srcPitch = -pCir->rotate * pCir->ShadowPitch; while(num--) { - width = pbox->x2 - pbox->x1; - y1 = pbox->y1 & ~3; - y2 = (pbox->y2 + 3) & ~3; - height = (y2 - y1) >> 2; /* in dwords */ - - if(pCir->rotate == 1) { - dstPtr = pCir->FbBase + - (pbox->x1 * dstPitch) + pScrn->virtualX - y2; - srcPtr = pCir->ShadowPtr + ((1 - y2) * srcPitch) + pbox->x1; - } else { - dstPtr = pCir->FbBase + - ((pScrn->virtualY - pbox->x2) * dstPitch) + y1; - srcPtr = pCir->ShadowPtr + (y1 * srcPitch) + pbox->x2 - 1; - } - - while(width--) { - src = srcPtr; - dst = (CARD32*)dstPtr; - count = height; - while(count--) { - *(dst++) = src[0] | (src[srcPitch] << 8) | - (src[srcPitch * 2] << 16) | - (src[srcPitch * 3] << 24); - src += srcPitch * 4; - } - srcPtr += pCir->rotate; - dstPtr += dstPitch; - } - - pbox++; + x1 = MAX(pbox->x1, 0); + y1 = MAX(pbox->y1, 0); + x2 = MIN(pbox->x2, pScrn->virtualX); + y2 = MIN(pbox->y2, pScrn->virtualY); + + width = x2 - x1; + y1 = y1 & ~3; + y2 = (y2 + 3) & ~3; + height = (y2 - y1) / 4; /* in dwords */ + + if (width <= 0 || height <= 0) + continue; + + if(pCir->rotate == 1) { + dstPtr = pCir->FbBase + + (x1 * dstPitch) + pScrn->virtualX - y2; + srcPtr = pCir->ShadowPtr + ((1 - y2) * srcPitch) + x1; + } else { + dstPtr = pCir->FbBase + + ((pScrn->virtualY - x2) * dstPitch) + y1; + srcPtr = pCir->ShadowPtr + (y1 * srcPitch) + x2 - 1; + } + + while(width--) { + src = srcPtr; + dst = (CARD32*)dstPtr; + count = height; + while(count--) { + *(dst++) = src[0] | (src[srcPitch] << 8) | + (src[srcPitch * 2] << 16) | + (src[srcPitch * 3] << 24); + src += srcPitch * 4; + } + srcPtr += pCir->rotate; + dstPtr += dstPitch; + } + + pbox++; } } @@ -110,7 +129,7 @@ _X_EXPORT void cirRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { CirPtr pCir = CIRPTR(pScrn); - int count, width, height, y1, y2, dstPitch, srcPitch; + int count, width, height, x1, x2, y1, y2, dstPitch, srcPitch; CARD16 *dstPtr, *srcPtr, *src; CARD32 *dst; @@ -118,36 +137,44 @@ cirRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox) srcPitch = -pCir->rotate * pCir->ShadowPitch >> 1; while(num--) { - width = pbox->x2 - pbox->x1; - y1 = pbox->y1 & ~1; - y2 = (pbox->y2 + 1) & ~1; - height = (y2 - y1) >> 1; /* in dwords */ - - if(pCir->rotate == 1) { - dstPtr = (CARD16*)pCir->FbBase + - (pbox->x1 * dstPitch) + pScrn->virtualX - y2; - srcPtr = (CARD16*)pCir->ShadowPtr + - ((1 - y2) * srcPitch) + pbox->x1; - } else { - dstPtr = (CARD16*)pCir->FbBase + - ((pScrn->virtualY - pbox->x2) * dstPitch) + y1; - srcPtr = (CARD16*)pCir->ShadowPtr + - (y1 * srcPitch) + pbox->x2 - 1; - } - - while(width--) { - src = srcPtr; - dst = (CARD32*)dstPtr; - count = height; - while(count--) { - *(dst++) = src[0] | (src[srcPitch] << 16); - src += srcPitch * 2; - } - srcPtr += pCir->rotate; - dstPtr += dstPitch; - } - - pbox++; + x1 = MAX(pbox->x1, 0); + y1 = MAX(pbox->y1, 0); + x2 = MIN(pbox->x2, pScrn->virtualX); + y2 = MIN(pbox->y2, pScrn->virtualY); + + width = x2 - x1; + y1 = y1 & ~1; + y2 = (y2 + 1) & ~1; + height = (y2 - y1) / 2; /* in dwords */ + + if (width <= 0 || height <= 0) + continue; + + if(pCir->rotate == 1) { + dstPtr = (CARD16*)pCir->FbBase + + (x1 * dstPitch) + pScrn->virtualX - y2; + srcPtr = (CARD16*)pCir->ShadowPtr + + ((1 - y2) * srcPitch) + x1; + } else { + dstPtr = (CARD16*)pCir->FbBase + + ((pScrn->virtualY - x2) * dstPitch) + y1; + srcPtr = (CARD16*)pCir->ShadowPtr + + (y1 * srcPitch) + x2 - 1; + } + + while(width--) { + src = srcPtr; + dst = (CARD32*)dstPtr; + count = height; + while(count--) { + *(dst++) = src[0] | (src[srcPitch] << 16); + src += srcPitch * 2; + } + srcPtr += pCir->rotate; + dstPtr += dstPitch; + } + + pbox++; } } @@ -157,7 +184,7 @@ _X_EXPORT void cirRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { CirPtr pCir = CIRPTR(pScrn); - int count, width, height, y1, y2, dstPitch, srcPitch; + int count, width, height, x1, x2, y1, y2, dstPitch, srcPitch; CARD8 *dstPtr, *srcPtr, *src; CARD32 *dst; @@ -165,42 +192,50 @@ cirRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox) srcPitch = -pCir->rotate * pCir->ShadowPitch; while(num--) { - width = pbox->x2 - pbox->x1; - y1 = pbox->y1 & ~3; - y2 = (pbox->y2 + 3) & ~3; - height = (y2 - y1) >> 2; /* blocks of 3 dwords */ - - if(pCir->rotate == 1) { - dstPtr = pCir->FbBase + - (pbox->x1 * dstPitch) + ((pScrn->virtualX - y2) * 3); - srcPtr = pCir->ShadowPtr + ((1 - y2) * srcPitch) + (pbox->x1 * 3); - } else { - dstPtr = pCir->FbBase + - ((pScrn->virtualY - pbox->x2) * dstPitch) + (y1 * 3); - srcPtr = pCir->ShadowPtr + (y1 * srcPitch) + (pbox->x2 * 3) - 3; - } - - while(width--) { - src = srcPtr; - dst = (CARD32*)dstPtr; - count = height; - while(count--) { - dst[0] = src[0] | (src[1] << 8) | (src[2] << 16) | + x1 = MAX(pbox->x1, 0); + y1 = MAX(pbox->y1, 0); + x2 = MIN(pbox->x2, pScrn->virtualX); + y2 = MIN(pbox->y2, pScrn->virtualY); + + width = x2 - x1; + y1 = y1 & ~3; + y2 = (y2 + 3) & ~3; + height = (y2 - y1) / 4; /* blocks of 3 dwords */ + + if (width <= 0 || height <= 0) + continue; + + if(pCir->rotate == 1) { + dstPtr = pCir->FbBase + + (x1 * dstPitch) + ((pScrn->virtualX - y2) * 3); + srcPtr = pCir->ShadowPtr + ((1 - y2) * srcPitch) + (x1 * 3); + } else { + dstPtr = pCir->FbBase + + ((pScrn->virtualY - x2) * dstPitch) + (y1 * 3); + srcPtr = pCir->ShadowPtr + (y1 * srcPitch) + (x2 * 3) - 3; + } + + while(width--) { + src = srcPtr; + dst = (CARD32*)dstPtr; + count = height; + while(count--) { + dst[0] = src[0] | (src[1] << 8) | (src[2] << 16) | (src[srcPitch] << 24); - dst[1] = src[srcPitch + 1] | (src[srcPitch + 2] << 8) | + dst[1] = src[srcPitch + 1] | (src[srcPitch + 2] << 8) | (src[srcPitch * 2] << 16) | (src[(srcPitch * 2) + 1] << 24); - dst[2] = src[(srcPitch * 2) + 2] | (src[srcPitch * 3] << 8) | + dst[2] = src[(srcPitch * 2) + 2] | (src[srcPitch * 3] << 8) | (src[(srcPitch * 3) + 1] << 16) | (src[(srcPitch * 3) + 2] << 24); - dst += 3; - src += srcPitch * 4; - } - srcPtr += pCir->rotate * 3; - dstPtr += dstPitch; - } - - pbox++; + dst += 3; + src += srcPitch * 4; + } + srcPtr += pCir->rotate * 3; + dstPtr += dstPitch; + } + + pbox++; } } @@ -208,41 +243,49 @@ _X_EXPORT void cirRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { CirPtr pCir = CIRPTR(pScrn); - int count, width, height, dstPitch, srcPitch; + int count, width, height, x1, x2, y1, y2, dstPitch, srcPitch; CARD32 *dstPtr, *srcPtr, *src, *dst; dstPitch = pScrn->displayWidth; srcPitch = -pCir->rotate * pCir->ShadowPitch >> 2; while(num--) { - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - if(pCir->rotate == 1) { - dstPtr = (CARD32*)pCir->FbBase + - (pbox->x1 * dstPitch) + pScrn->virtualX - pbox->y2; - srcPtr = (CARD32*)pCir->ShadowPtr + - ((1 - pbox->y2) * srcPitch) + pbox->x1; - } else { - dstPtr = (CARD32*)pCir->FbBase + - ((pScrn->virtualY - pbox->x2) * dstPitch) + pbox->y1; - srcPtr = (CARD32*)pCir->ShadowPtr + - (pbox->y1 * srcPitch) + pbox->x2 - 1; - } - - while(width--) { - src = srcPtr; - dst = dstPtr; - count = height; - while(count--) { - *(dst++) = *src; - src += srcPitch; - } - srcPtr += pCir->rotate; - dstPtr += dstPitch; - } - - pbox++; + x1 = MAX(pbox->x1, 0); + y1 = MAX(pbox->y1, 0); + x2 = MIN(pbox->x2, pScrn->virtualX); + y2 = MIN(pbox->y2, pScrn->virtualY); + + width = x2 - x1; + height = y2 - y1; + + if (width <= 0 || height <= 0) + continue; + + if(pCir->rotate == 1) { + dstPtr = (CARD32*)pCir->FbBase + + (x1 * dstPitch) + pScrn->virtualX - y2; + srcPtr = (CARD32*)pCir->ShadowPtr + + ((1 - y2) * srcPitch) + x1; + } else { + dstPtr = (CARD32*)pCir->FbBase + + ((pScrn->virtualY - x2) * dstPitch) + y1; + srcPtr = (CARD32*)pCir->ShadowPtr + + (y1 * srcPitch) + x2 - 1; + } + + while(width--) { + src = srcPtr; + dst = dstPtr; + count = height; + while(count--) { + *(dst++) = *src; + src += srcPitch; + } + srcPtr += pCir->rotate; + dstPtr += dstPitch; + } + + pbox++; } } commit 5fcb3b018797457c3099a86c6c1257b6e4e89ceb Author: Adam Jackson <a...@redhat.com> Date: Tue Sep 25 08:54:36 2012 -0400 Remove mibstore.h Signed-off-by: Adam Jackson <a...@redhat.com> diff --git a/src/alp_driver.c b/src/alp_driver.c index e38c613..36f2039 100644 --- a/src/alp_driver.c +++ b/src/alp_driver.c @@ -39,9 +39,6 @@ /* All drivers initialising the SW cursor need this */ #include "mipointer.h" -/* All drivers implementing backing store need this */ -#include "mibstore.h" - #include "micmap.h" /* Needed by the Shadow Framebuffer */ @@ -1617,8 +1614,6 @@ AlpScreenInit(SCREEN_INIT_ARGS_DECL) if (init_picture) fbPictureInit (pScreen, 0, 0); - miInitializeBackingStore(pScreen); - /* * Set initial black & white colourmap indices. */ diff --git a/src/lg_driver.c b/src/lg_driver.c index 13f222d..c20bbd0 100644 --- a/src/lg_driver.c +++ b/src/lg_driver.c @@ -46,9 +46,6 @@ /* need this for inputInfo */ #include "inputstr.h" -/* All drivers implementing backing store need this */ -#include "mibstore.h" - #include "micmap.h" /* Needed by the Shadow Framebuffer */ @@ -1373,8 +1370,6 @@ LgScreenInit(SCREEN_INIT_ARGS_DECL) fbPictureInit(pScreen, 0, 0); - miInitializeBackingStore(pScreen); - /* * Set initial black & white colourmap indices. */ commit aa9016576163b3065910437b6ea51a69f24a41ca Author: Dave Airlie <airl...@gmail.com> Date: Tue Aug 21 21:01:43 2012 +1000 cirrus: fix build against old server Reported-by: jobermayer on irc Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/src/cir_driver.c b/src/cir_driver.c index c8d5aae..2df4a2e 100644 --- a/src/cir_driver.c +++ b/src/cir_driver.c @@ -258,7 +258,11 @@ CIRProbe(DriverPtr drv, int flags) pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); xf86DrvMsg(0, X_ERROR, "cirrus: This driver cannot operate until it has been unloaded.\n"); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 13 + xf86UnclaimPciSlot(pPci); +#else xf86UnclaimPciSlot(pPci, devSections[0]); +#endif free(devSections); return FALSE; } commit bc04e9ed659be51a3c712f34a038bd60f639f9c5 Author: Dave Airlie <airl...@redhat.com> Date: Mon Aug 20 13:49:19 2012 +1000 cirrus: fix falling back after kernel check if we find a kernel driver the code leave the pci slot claimed which stops us falling back. unclaim the pci slot. Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/src/cir_driver.c b/src/cir_driver.c index 5468b6b..c8d5aae 100644 --- a/src/cir_driver.c +++ b/src/cir_driver.c @@ -237,9 +237,10 @@ CIRProbe(DriverPtr drv, int flags) CIRChipsets, CIRPciChipsets, devSections, numDevSections, drv, &usedChips); /* Free it since we don't need that list after this */ - free(devSections); - if (numUsed <= 0) + if (numUsed <= 0) { + free(devSections); return FALSE; + } if (flags & PROBE_DETECT) foundScreen = TRUE; else for (i = 0; i < numUsed; i++) { @@ -257,6 +258,8 @@ CIRProbe(DriverPtr drv, int flags) pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); xf86DrvMsg(0, X_ERROR, "cirrus: This driver cannot operate until it has been unloaded.\n"); + xf86UnclaimPciSlot(pPci, devSections[0]); + free(devSections); return FALSE; } #endif @@ -290,6 +293,7 @@ CIRProbe(DriverPtr drv, int flags) pScrn->Probe = NULL; } } + free(devSections); free(usedChips); return foundScreen; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1tswqg-0002sv...@vasks.debian.org