From 0882cf01aaf6bff4d9d8ee8858eddb08f334c804 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Jan 02 2008 19:51:27 +0000 Subject: - r128-6.7.196-pciaccess.patch: Fix some preprocessor dumbness. --- diff --git a/r128-6.7.196-pciaccess.patch b/r128-6.7.196-pciaccess.patch index 63ebc38..c127c85 100644 --- a/r128-6.7.196-pciaccess.patch +++ b/r128-6.7.196-pciaccess.patch @@ -1,7 +1,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/r128_driver.c --- xf86-video-ati-6.7.196/src/r128_driver.c.jx 2007-08-22 23:00:48.000000000 -0400 +++ xf86-video-ati-6.7.196/src/r128_driver.c 2008-01-02 13:27:02.000000000 -0500 -@@ -425,14 +425,21 @@ static Bool R128MapMMIO(ScrnInfoPtr pScr +@@ -425,14 +425,21 @@ if (info->FBDev) { info->MMIO = fbdevHWMapMMIO(pScrn); } else { @@ -24,7 +24,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ return TRUE; } -@@ -444,9 +451,13 @@ static Bool R128UnmapMMIO(ScrnInfoPtr pS +@@ -444,9 +451,13 @@ if (info->FBDev) fbdevHWUnmapMMIO(pScrn); @@ -40,7 +40,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ info->MMIO = NULL; return TRUE; } -@@ -459,14 +470,21 @@ static Bool R128MapFB(ScrnInfoPtr pScrn) +@@ -459,14 +470,21 @@ if (info->FBDev) { info->FB = fbdevHWMapVidmem(pScrn); } else { @@ -63,7 +63,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ return TRUE; } -@@ -478,7 +496,11 @@ static Bool R128UnmapFB(ScrnInfoPtr pScr +@@ -478,7 +496,11 @@ if (info->FBDev) fbdevHWUnmapVidmem(pScrn); else @@ -75,7 +75,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ info->FB = NULL; return TRUE; } -@@ -650,6 +672,9 @@ static Bool R128GetBIOSParameters(ScrnIn +@@ -650,6 +672,9 @@ (void)memcpy(info->VBIOS, xf86int10Addr(pInt10, info->BIOSAddr), R128_VBIOS_SIZE); } else { @@ -85,7 +85,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ xf86ReadPciBIOS(0, info->PciTag, 0, info->VBIOS, R128_VBIOS_SIZE); if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, -@@ -659,6 +684,7 @@ static Bool R128GetBIOSParameters(ScrnIn +@@ -659,6 +684,7 @@ info->BIOSAddr = 0x000c0000; xf86ReadDomainMemory(info->PciTag, info->BIOSAddr, R128_VBIOS_SIZE, info->VBIOS); } @@ -93,7 +93,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ } if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) { info->BIOSAddr = 0x00000000; -@@ -997,7 +1023,7 @@ static Bool R128PreInitConfig(ScrnInfoPt +@@ -997,7 +1023,7 @@ info->Chipset = dev->chipID; from = X_CONFIG; } else { @@ -102,25 +102,25 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ } pScrn->chipset = (char *)xf86TokenToString(R128Chipsets, info->Chipset); -@@ -1021,7 +1047,7 @@ static Bool R128PreInitConfig(ScrnInfoPt +@@ -1021,7 +1047,7 @@ /* Framebuffer */ from = X_PROBED; - info->LinearAddr = info->PciInfo->memBase[0] & 0xfc000000; -+ info->LinearAddr = PCI_REGION_BASE(0) & 0xfc000000; ++ info->LinearAddr = PCI_REGION_BASE(info->PciInfo, 0, REGION_MEM) & 0xfc000000; pScrn->memPhysBase = info->LinearAddr; if (dev->MemBase) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, -@@ -1040,7 +1066,7 @@ static Bool R128PreInitConfig(ScrnInfoPt +@@ -1040,7 +1066,7 @@ /* MMIO registers */ from = X_PROBED; - info->MMIOAddr = info->PciInfo->memBase[2] & 0xffffff00; -+ info->MMIOAddr = PCI_REGION_BASE(2) & 0xffffff00; ++ info->MMIOAddr = PCI_REGION_BASE(info->PciInfo, 2, REGION_MEM) & 0xffffff00; if (dev->IOBase) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MMIO address override, using 0x%08lx instead of 0x%08lx\n", -@@ -1055,6 +1081,7 @@ static Bool R128PreInitConfig(ScrnInfoPt +@@ -1055,6 +1081,7 @@ xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%08lx\n", info->MMIOAddr); @@ -128,7 +128,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ /* BIOS */ from = X_PROBED; info->BIOSAddr = info->PciInfo->biosBase & 0xfffe0000; -@@ -1070,6 +1097,7 @@ static Bool R128PreInitConfig(ScrnInfoPt +@@ -1070,6 +1097,7 @@ xf86DrvMsg(pScrn->scrnIndex, from, "BIOS at 0x%08lx\n", info->BIOSAddr); } @@ -136,7 +136,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ /* Flat panel (part 1) */ if (xf86GetOptValBool(info->Options, OPTION_PROG_FP_REGS, -@@ -2101,6 +2129,7 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int +@@ -2101,6 +2129,7 @@ } info->PciInfo = xf86GetPciInfoForEntity(info->pEnt->index); @@ -144,7 +144,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ info->PciTag = pciTag(info->PciInfo->bus, info->PciInfo->device, info->PciInfo->func); -@@ -2110,6 +2139,7 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int +@@ -2110,6 +2139,7 @@ info->PciInfo->bus, info->PciInfo->device, info->PciInfo->func); @@ -152,10 +152,9 @@ diff -up xf86-video-ati-6.7.196/src/r128_driver.c.jx xf86-video-ati-6.7.196/src/ if (xf86RegisterResources(info->pEnt->index, 0, ResNone)) goto fail; if (xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr)) goto fail; -diff -up xf86-video-ati-6.7.196/src/r128.h.jx xf86-video-ati-6.7.196/src/r128.h --- xf86-video-ati-6.7.196/src/r128.h.jx 2007-08-21 20:09:50.000000000 -0400 +++ xf86-video-ati-6.7.196/src/r128.h 2008-01-02 13:20:22.000000000 -0500 -@@ -37,6 +37,11 @@ +@@ -37,6 +37,12 @@ #ifndef _R128_H_ #define _R128_H_ @@ -163,11 +162,12 @@ diff -up xf86-video-ati-6.7.196/src/r128.h.jx xf86-video-ati-6.7.196/src/r128.h +#ifdef XSERVER_LIBPCIACCESS +#include +#endif ++#include "atipcirename.h" + #include #include "xf86str.h" -@@ -223,8 +228,14 @@ typedef enum +@@ -223,8 +229,14 @@ typedef struct { EntityInfoPtr pEnt; @@ -182,10 +182,9 @@ diff -up xf86-video-ati-6.7.196/src/r128.h.jx xf86-video-ati-6.7.196/src/r128.h int Chipset; Bool Primary; -diff -up xf86-video-ati-6.7.196/src/Makefile.am.jx xf86-video-ati-6.7.196/src/Makefile.am --- xf86-video-ati-6.7.196/src/Makefile.am.jx 2008-01-02 13:15:51.000000000 -0500 +++ xf86-video-ati-6.7.196/src/Makefile.am 2008-01-02 13:15:51.000000000 -0500 -@@ -99,16 +99,12 @@ atimisc_drv_la_SOURCES = \ +@@ -99,16 +99,12 @@ atiload.c atimisc.c atimach64probe.c $(ATIMISC_CPIO_SOURCES) \ $(ATIMISC_DGA_SOURCES) $(ATIMISC_DRI_SRCS) $(ATIMISC_EXA_SOURCES) @@ -202,10 +201,9 @@ diff -up xf86-video-ati-6.7.196/src/Makefile.am.jx xf86-video-ati-6.7.196/src/Ma radeon_drv_la_LTLIBRARIES = radeon_drv.la radeon_drv_la_LDFLAGS = -module -avoid-version -diff -up xf86-video-ati-6.7.196/src/r128_dri.c.jx xf86-video-ati-6.7.196/src/r128_dri.c --- xf86-video-ati-6.7.196/src/r128_dri.c.jx 2008-01-02 13:15:51.000000000 -0500 +++ xf86-video-ati-6.7.196/src/r128_dri.c 2008-01-02 13:28:27.000000000 -0500 -@@ -470,8 +470,8 @@ static Bool R128DRIAgpInit(R128InfoPtr i +@@ -470,8 +470,8 @@ xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n", mode, vendor, device, @@ -216,7 +214,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_dri.c.jx xf86-video-ati-6.7.196/src/r12 if (drmAgpEnable(info->drmFD, mode) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not enabled\n"); -@@ -910,9 +910,16 @@ static void R128DRIIrqInit(R128InfoPtr i +@@ -910,9 +910,16 @@ if (!info->irq) { info->irq = drmGetInterruptFromBusID( info->drmFD, @@ -234,7 +232,7 @@ diff -up xf86-video-ati-6.7.196/src/r128_dri.c.jx xf86-video-ati-6.7.196/src/r12 if((drmCtlInstHandler(info->drmFD, info->irq)) != 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, -@@ -1026,12 +1033,14 @@ Bool R128DRIScreenInit(ScreenPtr pScreen +@@ -1026,12 +1033,14 @@ if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { pDRIInfo->busIdString = DRICreatePCIBusID(info->PciInfo); } else { diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index c2b6b21..d88f9bb 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -5,7 +5,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati Version: 6.7.196 -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -89,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Wed Jan 02 2008 Adam Jackson 6.7.196-5 +- r128-6.7.196-pciaccess.patch: Fix some preprocessor dumbness. + * Wed Jan 02 2008 Adam Jackson 6.7.196-4 - r128-6.7.196-pciaccess.patch: Port r128 to libpciaccess.