rpms/xorg-x11-drv-i128/F-9 i128-fix-usleep.patch, NONE, 1.1 xorg-x11-drv-i128.spec, 1.20, 1.21

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Wed May 28 23:13:11 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-i128/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17002

Modified Files:
	xorg-x11-drv-i128.spec 
Added Files:
	i128-fix-usleep.patch 
Log Message:
* Thu May 29 2008 Dave Airlie <airlied at redhat.com> 1.3.0-2
- Fix usleep (#447061)


i128-fix-usleep.patch:

--- NEW FILE i128-fix-usleep.patch ---
diff --git a/src/i128IBMDAC.c b/src/i128IBMDAC.c
index 4e6fd97..1ad9f65 100644
--- a/src/i128IBMDAC.c
+++ b/src/i128IBMDAC.c
@@ -36,6 +36,7 @@
 #include "i128reg.h"
 #include "IBMRGB.h"
 
+#include <unistd.h>
 
 static void I128IBMShowCursor(ScrnInfoPtr pScrn);
 static void I128IBMHideCursor(ScrnInfoPtr pScrn);
diff --git a/src/i128_driver.c b/src/i128_driver.c
index b9fdb15..9895900 100644
--- a/src/i128_driver.c
+++ b/src/i128_driver.c
@@ -66,6 +66,8 @@
 #include "i128.h"
 #include "i128reg.h"
 
+#include <unistd.h>
+
 /*
  * Forward definitions for the functions that make up the driver.
  */
@@ -797,7 +799,7 @@ I128PreInit(ScrnInfoPtr pScrn, int flags)
 	{
 	    unsigned short temp;
 	    pci_device_cfg_read_u16(pI128->PciInfo, &temp, 0x4);
-	    if ((temp & 0x03 == 0x03) && (PCI_SUB_DEVICE_ID(pI128->PciInfo) == 0x08))
+	    if (((temp & 0x03) == 0x03) && (PCI_SUB_DEVICE_ID(pI128->PciInfo) == 0x08))
 		pI128->MemoryType = I128_MEMORY_DRAM;
 	}
 #endif
@@ -1901,7 +1903,7 @@ I128DDC1Read(ScrnInfoPtr pScrn)
   ddc = inl(iobase + 0x2C);
   if ((ddc & DDC_MODE_MASK) != DDC_MODE_DDC1) {
       outl(iobase + 0x2C, DDC_MODE_DDC1);
-      xf86usleep(40);
+      usleep(40);
   }
 
   /* wait for Vsync */
@@ -1918,7 +1920,7 @@ I128DDC1Read(ScrnInfoPtr pScrn)
 
   if ((ddc & DDC_MODE_MASK) != DDC_MODE_DDC1) {
       outl(iobase + 0x2C, ~DDC_MODE_MASK & ddc);
-      xf86usleep(40);
+      usleep(40);
   }
 
   return val;
@@ -2003,14 +2005,14 @@ I128I2CInit(ScrnInfoPtr pScrn)
     soft_sw &= 0xfffffffc;
     soft_sw |= 0x00000001;
     outl(iobase + 0x28, soft_sw);
-    xf86usleep(1000);
+    usleep(1000);
 
     /* set default as ddc2 mode */
     ddc = inl(iobase + 0x2C);
     ddc &= ~DDC_MODE_MASK;
     ddc |= DDC_MODE_DDC2;
     outl(iobase + 0x2C, ddc);
-    xf86usleep(40);
+    usleep(40);
 
     if (!xf86I2CBusInit(I2CPtr)) {
         return FALSE;
@@ -2105,38 +2107,38 @@ I128DumpBaseRegisters(ScrnInfoPtr pScrn)
 	"  PCI Registers\n");
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    MW0_AD    0x%08lx  addr 0x%08lx  %spre-fetchable\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM),
-	    PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0xFFC00000,
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0xFFC00000),
 	    PCI_REGION_BASE(pI128->PciInfo, 0, REGION_MEM) & 0x8 ? "" : "not-");
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    MW1_AD    0x%08lx  addr 0x%08lx  %spre-fetchable\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM),
-	    PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0xFFC00000,
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0xFFC00000),
 	    PCI_REGION_BASE(pI128->PciInfo, 1, REGION_MEM) & 0x8 ? "" : "not-");
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    XYW_AD(A) 0x%08lx  addr 0x%08lx\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM),
-	    PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM) & 0xFFC00000);
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 2, REGION_MEM) & 0xFFC00000));
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    XYW_AD(B) 0x%08lx  addr 0x%08lx\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM),
-	    PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM) & 0xFFC00000);
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 3, REGION_MEM) & 0xFFC00000));
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    RBASE_G   0x%08lx  addr 0x%08lx\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM),
-	    PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM) & 0xFFFF0000);
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 4, REGION_MEM) & 0xFFFF0000));
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    IO        0x%08lx  addr 0x%08lx\n",
-	    PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO),
-	    PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO) & 0xFFFFFF00);
+	    (unsigned long)PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO),
+	    (unsigned long)(PCI_REGION_BASE(pI128->PciInfo, 5, REGION_IO) & 0xFFFFFF00));
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    SSC       0x%08x  addr 0x%08x\n",
-    	    PCI_SUB_DEVICE_ID(pI128->PciInfo),
-    	    PCI_SUB_DEVICE_ID(pI128->PciInfo) & 0xFFFFFF00);
+    	    (unsigned int)PCI_SUB_DEVICE_ID(pI128->PciInfo),
+	    (unsigned int)(PCI_SUB_DEVICE_ID(pI128->PciInfo) & 0xFFFFFF00));
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    SSV       0x%08x  addr 0x%08x\n",
-    	    PCI_SUB_VENDOR_ID(pI128->PciInfo),
-    	    PCI_SUB_VENDOR_ID(pI128->PciInfo) & 0xFFFFFF00);
+    	    (unsigned int)PCI_SUB_VENDOR_ID(pI128->PciInfo),
+	    (unsigned int)(PCI_SUB_VENDOR_ID(pI128->PciInfo) & 0xFFFFFF00));
 #ifndef XSERVER_LIBPCIACCESS
     xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 	"    RBASE_E   0x%08lx  addr 0x%08lx  %sdecode-enabled\n\n",
diff --git a/src/i128accel.c b/src/i128accel.c
index 4db3e8d..37d6353 100644
--- a/src/i128accel.c
+++ b/src/i128accel.c
@@ -56,9 +56,11 @@ static void I128SetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1,
 	int x2, int y2);
 static void I128FillSolidRects(ScrnInfoPtr pScrn, int fg, int rop,
 	unsigned int planemask, int nBox, register BoxPtr pBoxI);
+#if 0
 static void I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox,
         DDXPointPtr pptSrc, BoxPtr pbox, int xdir, int ydir, int alu,
         unsigned planemask);
+#endif
 
 #define ENG_PIPELINE_READY() { while (pI128->mem.rbase_a[BUSY] & BUSY_BUSY) ; }
 #define ENG_DONE() { while (pI128->mem.rbase_a[FLOW] & (FLOW_DEB | FLOW_MCB | FLOW_PRV)) ;}
@@ -396,7 +398,7 @@ I128FillSolidRects(ScrnInfoPtr pScrn, int fg, int rop, unsigned int planemask,
 
 }
 
-
+#if 0
 static void
 I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc,
 	BoxPtr pbox, int xdir, int ydir, int alu, unsigned planemask)
@@ -408,7 +410,7 @@ I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc,
                 pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
 	ENG_DONE();
 }
-
+#endif
 
 Bool
 I128XaaInit(ScreenPtr pScreen)
diff --git a/src/i128exa.c b/src/i128exa.c
index 36aa78f..84452a8 100644
--- a/src/i128exa.c
+++ b/src/i128exa.c
@@ -452,11 +452,13 @@ static const struct dest_format dest_formats[] = {
     { 0, 0 }
 };
 
+#if 0
 static struct dest_format *
 i128MapDestFormat(int fmt)
 {
     return NULL;
 }
+#endif
 
 /* Composite is probably t2r and t2r4 only */
 static Bool
diff --git a/src/i128init.c b/src/i128init.c
index 29906cf..d57e295 100644
--- a/src/i128init.c
+++ b/src/i128init.c
@@ -37,6 +37,8 @@
 #include "Ti302X.h"
 #include "IBMRGB.h"
 
+#include <unistd.h>
+
 static void I128SavePalette(I128Ptr pI128);
 static void I128RestorePalette(I128Ptr pI128);
 
diff --git a/src/i128pcirename.h b/src/i128pcirename.h
index f0f5cf8..3e04b2d 100644
--- a/src/i128pcirename.h
+++ b/src/i128pcirename.h
@@ -26,8 +26,8 @@
  * library. The main purpose being to facilitate source code compatibility.
  */
 
-#ifndef CIRPCIRENAME_H
-#define CIRPCIRENAME_H
+#ifndef I128PCIRENAME_H
+#define I128PCIRENAME_H
 
 enum region_type {
     REGION_MEM,
@@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr;
 
 #endif /* XSERVER_LIBPCIACCESS */
 
-#endif /* CIRPCIRENAME_H */
+#endif /* I128PCIRENAME_H */


Index: xorg-x11-drv-i128.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-i128/F-9/xorg-x11-drv-i128.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- xorg-x11-drv-i128.spec	20 Mar 2008 01:24:23 -0000	1.20
+++ xorg-x11-drv-i128.spec	28 May 2008 23:12:30 -0000	1.21
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 i128 video driver
 Name:      xorg-x11-drv-i128
 Version:   1.3.0
-Release:   1%{?dist}
+Release:   2%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -15,6 +15,7 @@
 Source1:    i128.xinf
 
 Patch0:	    i128-1.2.0-1600sw-range-hack.patch
+Patch1:     i128-fix-usleep.patch
 
 ExcludeArch: s390 s390x
 
@@ -30,6 +31,7 @@
 %setup -q -n %{tarball}-%{version}
 
 %patch0 -p1 -b .1600sw-hack
+%patch1 -p1 -b .fixusleep
 
 %build
 %configure --disable-static
@@ -57,6 +59,9 @@
 %{_mandir}/man4/i128.4*
 
 %changelog
+* Thu May 29 2008 Dave Airlie <airlied at redhat.com> 1.3.0-2
+- Fix usleep (#447061)
+
 * Thu Mar 20 2008 Dave Airlie <airlied at redhat.com> 1.3.0-1
 - Update to latest upstream release
 




More information about the scm-commits mailing list