rpms/xorg-x11/FC-4 xorg-x11-6.8.2-add-i945-support.patch, NONE, 1.1 xorg-x11.spec, 1.207, 1.208

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 5 17:27:43 UTC 2005


Author: mharris

Update of /cvs/dist/rpms/xorg-x11/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv15233

Modified Files:
	xorg-x11.spec 
Added Files:
	xorg-x11-6.8.2-add-i945-support.patch 
Log Message:
added xorg-x11-6.8.2-add-i945-support.patch

xorg-x11-6.8.2-add-i945-support.patch:
 Imakefile     |    9 
 common.h      |   27 
 i810.man      |   15 
 i810_accel.c  |    2 
 i810_dri.c    |    8 
 i810_dri.h    |    1 
 i810_driver.c |   76 +-
 i810_hwmc.c   |    4 
 i830.h        |   44 +
 i830_common.h |    3 
 i830_cursor.c |   10 
 i830_dri.c    |   70 +
 i830_driver.c | 2077 +++++++++++++++++++++++++++++++++++++++++++---------------
 i830_memory.c |   17 
 i830_modes.c  |  769 +++++++++++++++++++++
 i830_shadow.c |  249 ++++++
 i830_video.c  |  262 +++++--
 17 files changed, 2953 insertions(+), 690 deletions(-)

--- NEW FILE xorg-x11-6.8.2-add-i945-support.patch ---
--- xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile	2005-08-18 19:40:24.000000000 -0400
@@ -37,14 +37,14 @@
 
 #if !I830Only
 I810SRCS = i810_cursor.c i810_accel.c i810_memory.c i810_wmark.c i810_dga.c \
-	   i810_video.c i810_io.c
+	   i810_video.c i810_io.c i830_modes.c
 I810OBJS = i810_cursor.o i810_accel.o i810_memory.o i810_wmark.o i810_dga.o \
-	   i810_video.o i810_io.o
+	   i810_video.o i810_io.o i830_modes.o
 #endif
 I830SRCS = i830_driver.c i830_memory.c i830_cursor.c i830_accel.c i830_io.c \
-	   i830_dga.c $(I830SRCS1) $(I830SRCS2)
+	   i830_dga.c i830_shadow.c $(I830SRCS1) $(I830SRCS2)
 I830OBJS = i830_driver.o i830_memory.o i830_cursor.o i830_accel.o i830_io.o \
-	   i830_dga.o $(I830OBJS1) $(I830OBJS2)
+	   i830_dga.o i830_shadow.o $(I830OBJS1) $(I830OBJS2)
 
 SRCS = 	i810_driver.c \
 	$(I810SRCS) $(I830SRCS) $(DRISRCS)
@@ -121,6 +121,7 @@
 InstallDriverSDKNonExecFile(i830_dri.h,$(DRIVERSDKDIR)/drivers/i810)
 InstallDriverSDKNonExecFile(i830_driver.c,$(DRIVERSDKDIR)/drivers/i810)
 InstallDriverSDKNonExecFile(i830_memory.c,$(DRIVERSDKDIR)/drivers/i810)
+InstallDriverSDKNonExecFile(i830_shadow.c,$(DRIVERSDKDIR)/drivers/i810)
 InstallDriverSDKNonExecFile(i830_video.c,$(DRIVERSDKDIR)/drivers/i810)
 
 InstallDriverSDKObjectModule(i810,$(DRIVERSDKMODULEDIR),drivers)
--- xc/programs/Xserver/hw/xfree86/drivers/i810/common.h.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/common.h	2005-08-18 19:40:24.000000000 -0400
@@ -2,7 +2,7 @@
 /**************************************************************************
 
 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-Copyright © 2002 David Dawes
+Copyright © 2002 David Dawes
 
 All Rights Reserved.
 
@@ -79,6 +79,7 @@
 extern const char *I810ddcSymbols[];
 extern const char *I810fbSymbols[];
 extern const char *I810xaaSymbols[];
+extern const char *I810shadowFBSymbols[];
 #ifdef XF86DRI
 extern const char *I810driSymbols[];
 extern const char *I810drmSymbols[];
@@ -305,6 +306,22 @@
 #define PCI_CHIP_I915_G_BRIDGE	   0x2580
 #endif
 
+#ifndef PCI_CHIP_I915_GM
+#define PCI_CHIP_I915_GM	   0x2592
+#define PCI_CHIP_I915_GM_BRIDGE	   0x2590
+#endif
+
+#ifndef PCI_CHIP_E7221_G
+#define PCI_CHIP_E7221_G	   0x258A
+/* Same as I915_G_BRIDGE */
+#define PCI_CHIP_E7221_G_BRIDGE	   0x2580
+#endif
+
+#ifndef PCI_CHIP_I945_G
+#define PCI_CHIP_I945_G        0x2772
+#define PCI_CHIP_I945_G_BRIDGE 0x2770
+#endif
+
 #define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 ||	\
 			pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \
 			pI810->PciInfo->chipType == PCI_CHIP_I810_E)
@@ -312,10 +329,14 @@
 #define IS_I830(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I830_M)
 #define IS_845G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_845_G)
 #define IS_I85X(pI810)  (pI810->PciInfo->chipType == PCI_CHIP_I855_GM)
+#define IS_I852(pI810)  (pI810->PciInfo->chipType == PCI_CHIP_I855_GM && (pI810->variant == I852_GM || pI810->variant == I852_GME))
+#define IS_I855(pI810)  (pI810->PciInfo->chipType == PCI_CHIP_I855_GM && (pI810->variant == I855_GM || pI810->variant == I855_GME))
 #define IS_I865G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I865_G)
-#define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G)
+#define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G || pI810->PciInfo->chipType == PCI_CHIP_E7221_G)
+#define IS_I915GM(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_GM)
+#define IS_I945G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I945_G)
 
-#define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810))
+#define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810))
 
 #define GTT_PAGE_SIZE			KB(4)
 #define ROUND_TO(x, y)			(((x) + (y) - 1) / (y) * (y))
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man	2005-08-18 19:40:24.000000000 -0400
@@ -25,7 +25,7 @@
 .SH SUPPORTED HARDWARE
 .B i810
 supports the i810, i810-DC100, i810e, i815, 830M, 845G, 852GM, 855GM,
-865G and 915G chipsets.
+865G, 915G and 915GM chipsets.
 
 .SH CONFIGURATION DETAILS
 Please refer to __xconfigfile__(__filemansuffix__) for general configuration
@@ -191,6 +191,17 @@
 the machine has booted, but unfortunately it doesn't always work and
 is extremely dependent upon the Video BIOS.
 Default: disabled
+.TP
+.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.
+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.
 
 .SH "SEE ALSO"
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
@@ -199,5 +210,5 @@
 Jeff Hartmann, Mark Vojkovich, Alan Hourihane, H. J. Lu.  830M and 845G
 support reworked for XFree86 4.3 by David Dawes and Keith Whitwell.
 852GM, 855GM, and 865G support added by David Dawes and Keith Whitwell.
-915G support added by Alan Hourihane and Keith Whitwell.
+915G and 915GM support added by Alan Hourihane and Keith Whitwell.
 Dual Head, Clone and lid status support added by Alan Hourihane.
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c	2005-08-18 19:40:24.000000000 -0400
@@ -259,7 +259,7 @@
 #ifdef XF86DRI
    /* VT switching tries to do this.  
     */
-   if ((!pI810->LockHeld && pI810->directRenderingEnabled) || !pScrn->vtSema) {
+   if (!pI810->LockHeld && pI810->directRenderingEnabled) {
       return;
    }
 #endif
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c	2005-08-18 19:40:24.000000000 -0400
@@ -1498,10 +1498,10 @@
 	    return FALSE;
 	 }
       if (pI810->cursorARGBHandle != 0)
-	 if (drmAgpUnbind(pI810->drmSubFD, pI810->cursorARGBHandle) != 0) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"%s\n",strerror(errno));
-	    return FALSE;
-	 }
+	  if (drmAgpUnbind(pI810->drmSubFD, pI810->cursorARGBHandle) != 0) {
+	      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"%s\n",strerror(errno));
+	      return FALSE;
+	  }
       if (pI810->agpAcquired == TRUE)
 	 drmAgpRelease(pI810->drmSubFD);
       pI810->agpAcquired = FALSE;
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h	2005-08-18 19:40:24.000000000 -0400
@@ -3,7 +3,6 @@
 #ifndef _I810_DRI_
 #define _I810_DRI_
 
-#include "xf86dri.h"
 #include "xf86drm.h"
 #include "i810_common.h"
 
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c.i945	2005-08-18 19:40:12.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c	2005-08-18 19:40:24.000000000 -0400
@@ -74,7 +74,7 @@
 #include "fb.h"
 #include "miscstruct.h"
 #include "xf86xv.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
 #include "vbe.h"
 
 #include "i810.h"
@@ -129,6 +129,9 @@
    {PCI_CHIP_I855_GM,		"852GM/855GM"},
    {PCI_CHIP_I865_G,		"865G"},
    {PCI_CHIP_I915_G,		"915G"},
+   {PCI_CHIP_E7221_G,		"E7221 (i915)"},
+   {PCI_CHIP_I915_GM,		"915GM"},
+   {PCI_CHIP_I945_G,		"945G"},
    {-1,				NULL}
 };
 
@@ -144,6 +147,9 @@
    {PCI_CHIP_I855_GM,		PCI_CHIP_I855_GM,	RES_SHARED_VGA},
    {PCI_CHIP_I865_G,		PCI_CHIP_I865_G,	RES_SHARED_VGA},
    {PCI_CHIP_I915_G,		PCI_CHIP_I915_G,	RES_SHARED_VGA},
+   {PCI_CHIP_E7221_G,		PCI_CHIP_E7221_G,	RES_SHARED_VGA},
+   {PCI_CHIP_I915_GM,		PCI_CHIP_I915_GM,	RES_SHARED_VGA},
+   {PCI_CHIP_I945_G,		PCI_CHIP_I945_G,	RES_SHARED_VGA},
    {-1,				-1, RES_UNDEFINED }
 };
 
@@ -262,6 +268,11 @@
    NULL
 };
 
+const char *I810shadowFBSymbols[] = {
+    "ShadowFBInit",
[...4881 lines suppressed...]
+    ScrnInfoPtr pScrn = xf86Screens[index];
+    I830Ptr pI830 = I830PTR(pScrn);
+    int newX, newY;
+
+    if(pI830->rotate == 1) {
+	newX = pScrn->pScreen->height - y - 1;
+	newY = x;
+    } else {
+	newX = y;
+	newY = pScrn->pScreen->width - x - 1;
+    }
+
+    (*pI830->PointerMoved)(index, newX, newY);
+}
+
+void
+I830RefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int count, width, height, y1, y2, dstPitch, srcPitch;
+    CARD8 *dstPtr, *srcPtr, *src;
+    CARD32 *dst;
+
+    dstPitch = pScrn->displayWidth;
+    srcPitch = -pI830->rotate * pI830->shadowPitch;
+
+    while(num--) {
+	width = pbox->x2 - pbox->x1;
+	y1 = pbox->y1 & ~3;
+	y2 = (pbox->y2 + 3) & ~3;
+	height = (y2 - y1) >> 2;  /* in dwords */
+
+	if(pI830->rotate == 1) {
+	    dstPtr = pI830->FbBase + 
+			(pbox->x1 * dstPitch) + pScrn->virtualX - y2;
+	    srcPtr = pI830->shadowPtr + ((1 - y2) * srcPitch) + pbox->x1;
+	} else {
+	    dstPtr = pI830->FbBase + 
+			((pScrn->virtualY - pbox->x2) * dstPitch) + y1;
+	    srcPtr = pI830->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 += pI830->rotate;
+	    dstPtr += dstPitch;
+	}
+
+	pbox++;
+    }
+} 
+
+
+void
+I830RefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int count, width, height, y1, y2, dstPitch, srcPitch;
+    CARD16 *dstPtr, *srcPtr, *src;
+    CARD32 *dst;
+
+    dstPitch = pScrn->displayWidth;
+    srcPitch = -pI830->rotate * pI830->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(pI830->rotate == 1) {
+	    dstPtr = (CARD16*)pI830->FbBase + 
+			(pbox->x1 * dstPitch) + pScrn->virtualX - y2;
+	    srcPtr = (CARD16*)pI830->shadowPtr + 
+			((1 - y2) * srcPitch) + pbox->x1;
+	} else {
+	    dstPtr = (CARD16*)pI830->FbBase + 
+			((pScrn->virtualY - pbox->x2) * dstPitch) + y1;
+	    srcPtr = (CARD16*)pI830->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 += pI830->rotate;
+	    dstPtr += dstPitch;
+	}
+
+	pbox++;
+    }
+}
+
+
+/* this one could be faster */
+void
+I830RefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int count, width, height, y1, y2, dstPitch, srcPitch;
+    CARD8 *dstPtr, *srcPtr, *src;
+    CARD32 *dst;
+
+    dstPitch = BitmapBytePad(pScrn->displayWidth * 24);
+    srcPitch = -pI830->rotate * pI830->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(pI830->rotate == 1) {
+	    dstPtr = pI830->FbBase + 
+			(pbox->x1 * dstPitch) + ((pScrn->virtualX - y2) * 3);
+	    srcPtr = pI830->shadowPtr + ((1 - y2) * srcPitch) + (pbox->x1 * 3);
+	} else {
+	    dstPtr = pI830->FbBase + 
+			((pScrn->virtualY - pbox->x2) * dstPitch) + (y1 * 3);
+	    srcPtr = pI830->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) |
+				(src[srcPitch] << 24);		
+		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) |
+				(src[(srcPitch * 3) + 1] << 16) |
+				(src[(srcPitch * 3) + 2] << 24);	
+		dst += 3;
+		src += srcPitch * 4;
+	    }
+	    srcPtr += pI830->rotate * 3;
+	    dstPtr += dstPitch; 
+	}
+
+	pbox++;
+    }
+}
+
+void
+I830RefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int count, width, height, dstPitch, srcPitch;
+    CARD32 *dstPtr, *srcPtr, *src, *dst;
+
+    dstPitch = pScrn->displayWidth;
+    srcPitch = -pI830->rotate * pI830->shadowPitch >> 2;
+
+    while(num--) {
+	width = pbox->x2 - pbox->x1;
+	height = pbox->y2 - pbox->y1;
+
+	if(pI830->rotate == 1) {
+	    dstPtr = (CARD32*)pI830->FbBase + 
+			(pbox->x1 * dstPitch) + pScrn->virtualX - pbox->y2;
+	    srcPtr = (CARD32*)pI830->shadowPtr + 
+			((1 - pbox->y2) * srcPitch) + pbox->x1;
+	} else {
+	    dstPtr = (CARD32*)pI830->FbBase + 
+			((pScrn->virtualY - pbox->x2) * dstPitch) + pbox->y1;
+	    srcPtr = (CARD32*)pI830->shadowPtr + 
+			(pbox->y1 * srcPitch) + pbox->x2 - 1;
+	}
+
+	while(width--) {
+	    src = srcPtr;
+	    dst = dstPtr;
+	    count = height;
+	    while(count--) {
+		*(dst++) = *src;
+		src += srcPitch;
+	    }
+	    srcPtr += pI830->rotate;
+	    dstPtr += dstPitch;
+	}
+
+	pbox++;
+    }
+}


Index: xorg-x11.spec
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11/FC-4/xorg-x11.spec,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -r1.207 -r1.208
--- xorg-x11.spec	1 Sep 2005 11:00:26 -0000	1.207
+++ xorg-x11.spec	5 Sep 2005 17:27:40 -0000	1.208
@@ -2134,29 +2134,14 @@
   fi
 } &> /dev/null || :
          
-%post libs
-/sbin/ldconfig
-
-%postun libs
-/sbin/ldconfig
-
-%post deprecated-libs
-/sbin/ldconfig
-
-%postun deprecated-libs
-/sbin/ldconfig
-
-%post Mesa-libGL
-/sbin/ldconfig
-
-%postun Mesa-libGL
-/sbin/ldconfig
-
-%post Mesa-libGLU
-/sbin/ldconfig
-
-%postun Mesa-libGLU
-/sbin/ldconfig
+%post libs		-p /sbin/ldconfig
+%postun libs		-p /sbin/ldconfig
+%post deprecated-libs	-p /sbin/ldconfig
+%postun deprecated-libs	-p /sbin/ldconfig
+%post Mesa-libGL	-p /sbin/ldconfig
+%postun Mesa-libGL	-p /sbin/ldconfig
+%post Mesa-libGLU	-p /sbin/ldconfig
+%postun Mesa-libGLU	-p /sbin/ldconfig
 
 ##### xfs scripts ####################################################
 # Work around a bug in the XFree86-xfs postun script, which results in the
@@ -3607,7 +3592,11 @@
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 
 
 %changelog
-* Thu Sep  1 2005 Mike A. Harris <mharris at redhat.com> 6.8.2-46
+* Mon Sep  5 2005 Mike A. Harris <mharris at redhat.com>
+- Updated post/postun scripts for libs to use -p /sbin/ldconfig instead,
+  which allows rpm to optimize/reduce package installation time
+
+* Thu Sep  1 2005 Mike A. Harris <mharris at redhat.com>
 - Added following patches, merged over from RHEL-4 branch of CVS:
   - Added xorg-x11-6.8.1-ati-radeon-RV100-bus-master-fix.patch for bug (#165179)
   - Added xorg-x11-6.8.2-add-i945-support.patch to fix (#156964)




More information about the fedora-cvs-commits mailing list