rpms/xorg-x11-drv-openchrome/devel openchrome-0.2.901-libpciaccess.patch, 1.1, 1.2 xorg-x11-drv-openchrome.spec, 1.4, 1.5
Xavier Bachelot (xavierb)
fedora-extras-commits at redhat.com
Mon Jan 7 23:34:31 UTC 2008
Author: xavierb
Update of /cvs/pkgs/rpms/xorg-x11-drv-openchrome/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv740
Modified Files:
openchrome-0.2.901-libpciaccess.patch
xorg-x11-drv-openchrome.spec
Log Message:
Fix broken libpciaccess patch
openchrome-0.2.901-libpciaccess.patch:
Index: openchrome-0.2.901-libpciaccess.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-openchrome/devel/openchrome-0.2.901-libpciaccess.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openchrome-0.2.901-libpciaccess.patch 3 Jan 2008 00:21:50 -0000 1.1
+++ openchrome-0.2.901-libpciaccess.patch 7 Jan 2008 23:34:24 -0000 1.2
@@ -61,10 +61,11 @@
AM_CONDITIONAL(DEBUG, test x$DEBUG = xyes)
if test "$DEBUG" = yes; then
AC_DEFINE(HAVE_DEBUG,1,[Enable debug support])
+
Index: src/via_driver.c
===================================================================
---- src/via_driver.c (revision 489)
-+++ src/via_driver.c (working copy)
+--- src/via_driver.c (revision 489)
++++ src/via_driver.c (working copy)
@@ -50,7 +50,30 @@
/* Prototypes. */
@@ -167,7 +168,7 @@
LoaderRefSymLists(vgaHWSymbols,
#ifdef USE_FB
fbSymbols,
-@@ -500,6 +559,47 @@
+@@ -500,6 +559,46 @@
VIAChipsets);
} /* VIAIdentify */
@@ -211,19 +212,10 @@
+}
+#else /* XSERVER_LIBPCIACCESS */
+
-+
static Bool VIAProbe(DriverPtr drv, int flags)
{
GDevPtr *devSections;
-@@ -543,6 +643,7 @@
- for (i = 0; i < numUsed; i++) {
- ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
- EntityInfoPtr pEnt;
-+
- if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
- VIAPciChipsets, 0, 0, 0, 0, 0)))
- {
-@@ -610,6 +711,7 @@
+@@ -610,6 +709,7 @@
return foundScreen;
} /* VIAProbe */
@@ -231,7 +223,7 @@
#ifdef XF86DRI
static void kickVblank(ScrnInfoPtr pScrn)
-@@ -756,6 +858,10 @@
+@@ -756,6 +895,10 @@
vgaHWPtr hwp;
int i, bMemSize = 0;
@@ -242,7 +234,7 @@
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAPreInit\n"));
if (pScrn->numEntities > 1)
-@@ -939,7 +1045,8 @@
+@@ -939,7 +1082,8 @@
pEnt->device->chipID);
} else {
from = X_PROBED;
@@ -252,7 +244,7 @@
pVia->Chipset = LookupChipID(VIAPciChipsets, pVia->ChipId);
pScrn->chipset = (char *)xf86TokenToString(VIAChipsets,
pVia->Chipset);
-@@ -948,12 +1055,20 @@
+@@ -948,12 +1092,20 @@
xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset);
if (pEnt->device->chipRev >= 0) {
@@ -273,7 +265,42 @@
}
if (pVia->Chipset == VIA_CLE266)
-@@ -1378,8 +1493,10 @@
+@@ -968,19 +1120,34 @@
+ switch (pVia->Chipset) {
+ case VIA_CLE266:
+ case VIA_KM400:
++#if XSERVER_LIBPCIACCESS
++ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xE1);
++ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 10 ;
++#else
+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 0), 0xE1) & 0x70 ) >> 4 ) ) << 10 ;
+ break;
++#endif
+ case VIA_PM800:
+ case VIA_VM800:
+ case VIA_K8M800:
++#if XSERVER_LIBPCIACCESS
++ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xA1);
++ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 10 ;
++#else
+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70 ) >> 4 ) ) << 10 ;
+ break;
++#endif
+ case VIA_K8M890:
+ case VIA_P4M890:
+ case VIA_P4M900:
+ case VIA_CX700:
++#if XSERVER_LIBPCIACCESS
++ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xA1);
++ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 12 ;
++#else
+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70 ) >> 4 ) ) << 12 ;
+ break;
++#endif
+ default:
+ if (pScrn->videoRam < 16384 || pScrn->videoRam > 65536) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+@@ -1378,8 +1545,10 @@
/* maybe throw in some more sanity checks here */
@@ -284,7 +311,7 @@
if (!VIAMapMMIO(pScrn)) {
VIAFreeRec(pScrn);
-@@ -1407,7 +1524,9 @@
+@@ -1407,7 +1576,9 @@
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"...Finished parsing config file options.\n");
@@ -294,73 +321,7 @@
/* Read memory bandwidth from registers */
pVia->MemClk = hwp->readCrtc(hwp, 0x3D) >> 4;
-@@ -1440,6 +1559,65 @@
- return FALSE;
- }
-
-+ from = X_PROBED;
-+
-+ /* Detect the amount of installed RAM */
-+ switch (pVia->Chipset) {
-+ case VIA_CLE266:
-+ case VIA_KM400:
-+#if XSERVER_LIBPCIACCESS
-+ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xE1);
-+ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 10 ;
-+#else
-+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 0), 0xE1) & 0x70 ) >> 4 ) ) << 10 ;
-+ break;
-+#endif
-+ case VIA_PM800:
-+ case VIA_VM800:
-+ case VIA_K8M800:
-+#if XSERVER_LIBPCIACCESS
-+ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xA1);
-+ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 10 ;
-+#else
-+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70 ) >> 4 ) ) << 10 ;
-+ break;
-+#endif
-+ case VIA_K8M890:
-+ case VIA_P4M900:
-+ case VIA_CX700:
-+#if XSERVER_LIBPCIACCESS
-+ pci_device_cfg_read_u32 (bridge, & pScrn->videoRam, 0xA1);
-+ pScrn->videoRam = (1 << ( ( pScrn->videoRam & 0x70) >> 4 )) << 12 ;
-+#else
-+ pScrn->videoRam = ( 1 << ( ( pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70 ) >> 4 ) ) << 12 ;
-+ break;
-+#endif
-+ default:
-+ if (pScrn->videoRam < 16384 || pScrn->videoRam > 65536) {
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Using old memory-detection method.");
-+ bMemSize = hwp->readSeq(hwp, 0x39);
-+ if (bMemSize > 16 && bMemSize <= 128)
-+ pScrn->videoRam = (bMemSize + 1) << 9;
-+ else if (bMemSize > 0 && bMemSize < 31)
-+ pScrn->videoRam = bMemSize << 12;
-+ else {
-+ from = X_DEFAULT;
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Memory size detection failed: using 16 MB.\n");
-+ pScrn->videoRam = 16 << 10;
-+ }
-+ } else {
-+ from = X_DEFAULT;
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "No memory-detection done. Use VideoRAM option.");
-+ }
-+ }
-+
-+ if (from == X_PROBED)
-+ xf86DrvMsg(pScrn->scrnIndex, from, "Probed VideoRAM = %d kB\n",
-+ pScrn->videoRam);
-+
- /* Split FB for SAMM */
- /* FIXME: For now, split FB into two equal sections. This should
- * be able to be adjusted by user with a config option. */
-@@ -2046,27 +2224,75 @@
+@@ -2046,26 +2217,74 @@
VIAMapMMIO(ScrnInfoPtr pScrn)
{
VIAPtr pVia = VIAPTR(pScrn);
@@ -391,7 +352,7 @@
+ (PCI_DEV_MAP_FLAG_WRITABLE
+ |PCI_DEV_MAP_FLAG_WRITE_COMBINE),
+ (void **) &pVia->MapBase);
-
++
+ if (err)
+ {
+ xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
@@ -406,7 +367,7 @@
+ if (!pVia->MapBase)
+ return FALSE;
+ #endif
-+
+
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"mapping BitBlt MMIO @ 0x%lx with size 0x%x\n",
pVia->MmioBase + VIA_MMIO_BLTBASE, VIA_MMIO_BLTSIZE);
@@ -421,7 +382,7 @@
+ (PCI_DEV_MAP_FLAG_WRITABLE
+ |PCI_DEV_MAP_FLAG_WRITE_COMBINE),
+ (void **) &pVia->BltBase);
-
++
+ if (err)
+ {
+ xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
@@ -437,11 +398,10 @@
+ if (!pVia->BltBase)
+ return FALSE;
+ #endif
-+
+
if (!pVia->MapBase || !pVia->BltBase) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Internal error: cound not map registers\n");
-@@ -2111,6 +2337,9 @@
+@@ -2111,6 +2330,9 @@
VIAMapFB(ScrnInfoPtr pScrn)
{
VIAPtr pVia = VIAPTR(pScrn);
@@ -451,7 +411,7 @@
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAMapFB\n"));
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
-@@ -2125,6 +2354,7 @@
+@@ -2125,6 +2347,7 @@
* in the OS support layer.
*/
@@ -459,7 +419,7 @@
unsigned char *tmp;
tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pVia->PciTag, pVia->FrameBufferBase,
-@@ -2143,10 +2373,24 @@
+@@ -2143,10 +2366,24 @@
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)tmp,
pVia->videoRambytes);
@@ -484,7 +444,7 @@
pVia->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pVia->PciTag, pVia->FrameBufferBase,
pVia->videoRambytes);
-@@ -2156,6 +2400,7 @@
+@@ -2156,6 +2393,7 @@
"Internal error: could not map framebuffer\n");
return FALSE;
}
@@ -492,7 +452,7 @@
pVia->FBFreeStart = (pScrn->displayWidth * pScrn->bitsPerPixel >> 3) *
pScrn->virtualY;
-@@ -2166,7 +2411,11 @@
+@@ -2166,7 +2404,11 @@
pVia->FBBase, pVia->FBFreeStart, pVia->FBFreeEnd);
}
@@ -504,12 +464,12 @@
pScrn->fbOffset = 0;
if(pVia->IsSecondary) pScrn->fbOffset = pScrn->videoRam << 10;
-@@ -2184,7 +2433,17 @@
+@@ -2184,6 +2426,16 @@
/* Disable MMIO */
ViaSeqMask(VGAHWPTR(pScrn), 0x1A, 0x00, 0x60);
+#ifdef XSERVER_LIBPCIACCESS
- if (pVia->MapBase)
++ if (pVia->MapBase)
+ pci_device_unmap_range(pVia->PciInfo, (pointer)pVia->MapBase, VIA_MMIO_REGSIZE);
+
+ if (pVia->BltBase)
@@ -518,11 +478,10 @@
+ if (pVia->FBBase)
+ pci_device_unmap_range(pVia->PciInfo, (pointer)pVia->FBBase, pVia->videoRambytes);
+#else
-+ if (pVia->MapBase)
+ if (pVia->MapBase)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pVia->MapBase, VIA_MMIO_REGSIZE);
- if (pVia->BltBase)
-@@ -2192,6 +2451,7 @@
+@@ -2192,6 +2444,7 @@
if (pVia->FBBase)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pVia->FBBase, pVia->videoRambytes);
@@ -532,12 +491,12 @@
static void
Index: src/via_driver.h
===================================================================
---- src/via_driver.h (revision 489)
-+++ src/via_driver.h (working copy)
+--- src/via_driver.h (revision 489)
++++ src/via_driver.h (working copy)
@@ -66,6 +66,10 @@
#include "via_dmabuffer.h"
#include "via_3d.h"
-
+
+#ifdef XSERVER_LIBPCIACCESS
+#include <pciaccess.h>
+#endif
@@ -547,7 +506,7 @@
#include "sarea.h"
@@ -234,8 +238,15 @@
int agpMem;
-
+
CloseScreenProcPtr CloseScreen;
- pciVideoPtr PciInfo;
- PCITAG PciTag;
Index: xorg-x11-drv-openchrome.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-openchrome/devel/xorg-x11-drv-openchrome.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xorg-x11-drv-openchrome.spec 3 Jan 2008 00:21:50 -0000 1.4
+++ xorg-x11-drv-openchrome.spec 7 Jan 2008 23:34:24 -0000 1.5
@@ -9,7 +9,7 @@
Summary: Xorg X11 openchrome video driver
Name: xorg-x11-drv-openchrome
Version: 0.2.901
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.openchrome.org
License: MIT
Group: User Interface/X Hardware Support
@@ -18,7 +18,7 @@
Source0: http://www.openchrome.org/releases/%{tarball}-%{version}.tar.bz2
Source1: openchrome.xinf
-Patch1: openchrome-0.2.901-libpciaccess.patch
+Patch1: openchrome-0.2.901-libpciaccess_2.patch
ExclusiveArch: %{ix86} x86_64
BuildRequires: pkgconfig
@@ -101,6 +101,9 @@
%changelog
+* Mon Jan 07 2008 Xavier Bachelot <xavier AT bachelot DOT org> - 0.2.901-2
+- Fix broken libpciaccess patch.
+
* Wed Jan 02 2008 Xavier Bachelot <xavier AT bachelot DOT org> - 0.2.901-1
- Update to 0.2.901.
- Remove obsoleted patches.
More information about the fedora-extras-commits
mailing list