SOURCES: X11-6.8.2-add-i945-support.patch (NEW) - intel 9xx mobile...

mmazur mmazur at pld-linux.org
Tue Dec 20 13:08:02 CET 2005


Author: mmazur                       Date: Tue Dec 20 12:08:02 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- intel 9xx mobile chips support

---- Files affected:
SOURCES:
   X11-6.8.2-add-i945-support.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/X11-6.8.2-add-i945-support.patch
diff -u /dev/null SOURCES/X11-6.8.2-add-i945-support.patch:1.1
--- /dev/null	Tue Dec 20 13:08:02 2005
+++ SOURCES/X11-6.8.2-add-i945-support.patch	Tue Dec 20 13:07:57 2005
@@ -0,0 +1,5264 @@
+--- 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",
++    NULL
++};
++
+ #ifdef XF86DRI
+ const char *I810drmSymbols[] = {
+    "drmAddBufs",
+@@ -303,13 +314,6 @@
+    NULL
+ };
+ 
+-#ifdef XF86DRI
+-
+-static const char *driShadowFBSymbols[] = {
+-    "ShadowFBInit",
+-    NULL
+-};
+-
+ const char *I810shadowSymbols[] = {
+     "shadowInit",
+     "shadowSetup",
+@@ -317,9 +321,7 @@
+     NULL
+ };
+ 
+-#endif
+-
+-#endif /* I830_ONLY */
++#endif 
+ 
+ #ifndef I810_DEBUG
+ int I810_DEBUG = (0
+@@ -388,7 +390,7 @@
+ 			I810drmSymbols,
+ 			I810driSymbols,
+ 			I810shadowSymbols,
+-			driShadowFBSymbols,
++			I810shadowFBSymbols,
+ #endif
+ 			I810vbeSymbols, vbeOptionalSymbols,
+ 			I810ddcSymbols, I810int10Symbols, NULL);
+@@ -560,6 +562,9 @@
+ 	    case PCI_CHIP_I830_M:
+ 	    case PCI_CHIP_I855_GM:
+ 	    case PCI_CHIP_I915_G:
++	    case PCI_CHIP_E7221_G:
++	    case PCI_CHIP_I915_GM:
++	    case PCI_CHIP_I945_G:
+     	       xf86SetEntitySharable(usedChips[i]);
+ 
+     	       /* Allocate an entity private if necessary */		
+@@ -1080,7 +1088,7 @@
+ 		    "Couldn't load shadowfb module:\n");
+        }
+        else {
+-	 xf86LoaderReqSymLists(driShadowFBSymbols, NULL);
++	 xf86LoaderReqSymLists(I810shadowFBSymbols, NULL);
+        }
+      }
+      
+@@ -1729,6 +1737,21 @@
+    i810Reg->ExtHorizBlank = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x40) >> 6;
+ 
+    /*
++    * the KGA fix in vgaHW.c results in the first
++    * scanline and the first character clock (8 pixels)
++    * of each scanline thereafter on display with an i810
++    * to be blank. Restoring CRTC 3, 5, & 22 to their
++    * "theoretical" values corrects the problem. KAO.
++    */
++   pVga->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
++   pVga->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2)
++	 | (((mode->CrtcHSyncEnd >> 3)) & 0x1F);
++   pVga->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
++
++   i810Reg->ExtHorizBlank = vgaHWHBlankKGA(mode, pVga, 7, 0);
++   vgaHWVBlankKGA(mode, pVga, 8, 0);
++
++   /*
+     * The following workarounds are needed to get video overlay working
+     * at 1024x768 and 1280x1024 display resolutions.
+     */
+@@ -1787,7 +1810,6 @@
+ {
+    vgaHWPtr hwp;
+    I810Ptr pI810;
+-   vgaRegPtr pVga;
+ 
+    hwp = VGAHWPTR(pScrn);
+    pI810 = I810PTR(pScrn);
+@@ -1796,18 +1818,6 @@
+ 
+    if (!vgaHWInit(pScrn, mode))
+       return FALSE;
+-   /*
+-    * the KGA fix in vgaHW.c results in the first
+-    * scanline and the first character clock (8 pixels)
+-    * of each scanline thereafter on display with an i810
+-    * to be blank. Restoring CRTC 3, 5, & 22 to their
+-    * "theoretical" values corrects the problem. KAO.
+-    */
+-   pVga = &VGAHWPTR(pScrn)->ModeReg;
+-   pVga->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
+-   pVga->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2)
+-	 | (((mode->CrtcHSyncEnd >> 3)) & 0x1F);
+-   pVga->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
+ 
+    pScrn->vtSema = TRUE;
+ 
+@@ -2097,8 +2107,8 @@
+ 
+ #ifdef XF86DRI
+    /*
+-    * Setup DRI after visuals have been established, but before cfbScreenInit
+-    * is called.   cfbScreenInit will eventually call into the drivers
++    * Setup DRI after visuals have been established, but before fbScreenInit
++    * is called.   fbScreenInit will eventually call into the drivers
+     * InitGLXVisuals call back.
+     */
+    /*
+@@ -2241,7 +2251,7 @@
+ 
+ #ifdef XF86DRI
+    if (pI810->directRenderingEnabled) {
+-      /* Now that mi, cfb, drm and others have done their thing,
++      /* Now that mi, fb, drm and others have done their thing,
+        * complete the DRI setup.
+        */
+       pI810->directRenderingEnabled = I810DRIFinishScreenInit(pScreen);
+@@ -2255,9 +2265,9 @@
+ #endif
+ 
+    if (pI810->directRenderingEnabled) {
+-      xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering enabled\n");
++      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n");
+    } else {
+-      xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering disabled\n");
++      xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Direct rendering disabled\n");
+    }
+ 
+    pScreen->SaveScreen = I810SaveScreen;
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c.i945	2005-08-18 19:40:12.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c	2005-08-18 19:40:24.000000000 -0400
+@@ -50,8 +50,8 @@
+ 
+ #include "xf86xv.h"
+ #include "xf86xvmc.h"
+-#include "Xv.h"
+-#include "XvMC.h"
++#include <X11/extensions/Xv.h>
++#include <X11/extensions/XvMC.h>
+ #include "xaa.h"
+ #include "xaalocal.h"
+ #include "dixstruct.h"
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h.i945	2005-08-18 19:40:12.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h	2005-08-18 19:40:24.000000000 -0400
+@@ -75,7 +75,7 @@
+ 
+ /*
+  * The mode handling is based upon the VESA driver written by
+- * Paulo César Pereira de Andrade <pcpa at conectiva.com.br>.
++ * Paulo CĂŠsar Pereira de Andrade <pcpa at conectiva.com.br>.
+  */
+ 
+ #define PIPE_NONE	0<<0
+@@ -91,7 +91,7 @@
+ typedef struct _VESARec {
+    /* SVGA state */
+    pointer state, pstate;
+-   int statePage, stateSize, stateMode;
++   int statePage, stateSize, stateMode, stateRefresh;
+    CARD32 *savedPal;
+    int savedScanlinePitch;
+    xf86MonPtr monitor;
+@@ -165,13 +165,17 @@
+ 
+    Bool newPipeSwitch;
+ 
++   Bool fakeSwitch;
++   
++   int fixedPipe;
++
+    Bool Clone;
+    int CloneRefresh;
+    int CloneHDisplay;
+    int CloneVDisplay;
+ 
+    I830EntPtr entityPrivate;	
+-   int pipe;
++   int pipe, origPipe;
+    int init;
+ 
+    unsigned int bufferOffset;		/* for I830SelectBuffer */
+@@ -234,6 +238,7 @@
+ 
+    int MonType1;
+    int MonType2;
++   Bool specifiedMonitor;
+ 
+    DGAModePtr DGAModes;
+    int numDGAModes;
+@@ -297,7 +302,15 @@
+    drm_handle_t ring_map;
+ #endif
+ 
++   /* Broken-out options. */
+    OptionInfoPtr Options;
++   int rotate;
++   Bool shadowFB;
++
++   /* Support for shadowFB and rotation. */
++   unsigned char *shadowPtr;
++   int shadowPitch;
++   void (*PointerMoved)(int, int, int);
+ 
+    /* Stolen memory support */
+    Bool StolenOnly;
+@@ -320,10 +333,11 @@
+    /* Use BIOS call 0x5f05 to set the refresh rate. */
+    Bool useExtendedRefresh;
+ 
+-   Bool checkLid;
++   Bool checkDevices;
+    int monitorSwitch;
+    int operatingDevices;
+    int savedDevices;
++   int lastDevice1, lastDevice2;
+ 
+    /* These are indexed by the display types */
+    Bool displayAttached[NumDisplayTypes];
+@@ -343,6 +357,7 @@
+    Bool starting;
+    Bool closing;
+    Bool suspended;
++   Bool leaving;
+ 
+    /* fbOffset converted to (x, y). */
+    int xoffset;
+@@ -353,7 +368,7 @@
+    Bool displayInfo;
+    Bool devicePresence;
+ 
+-   OsTimerPtr lidTimer;
++   OsTimerPtr devicesTimer;
+ } I830Rec;
+ 
+ #define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
+@@ -390,6 +405,7 @@
+ extern void I830SetupMemoryTiling(ScrnInfoPtr pScrn);
+ extern Bool I830DRIScreenInit(ScreenPtr pScreen);
+ extern Bool I830DRIDoMappings(ScreenPtr pScreen);
++extern Bool I830DRIResume(ScreenPtr pScreen);
+ extern void I830DRICloseScreen(ScreenPtr pScreen);
+ extern Bool I830DRIFinishScreenInit(ScreenPtr pScreen);
+ #endif
+@@ -423,13 +439,27 @@
+ 
+ extern void I830ChangeFrontbuffer(ScrnInfoPtr pScrn,int buffer);
+ 
++extern DisplayModePtr I830GetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe,
++					VbeInfoBlock *vbe);
++extern void I830SetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe);
++extern void I830UnsetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe);
++extern void I830PrintModes(ScrnInfoPtr pScrn);
++extern int I830GetBestRefresh(ScrnInfoPtr pScrn, int refresh);
++extern Bool I830CheckModeSupport(ScrnInfoPtr pScrn, int x, int y, int mode);
++extern void I830PointerMoved(int index, int x, int y);
++extern void I830RefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
++extern void I830RefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
++extern void I830RefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
++extern void I830RefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
++extern void I830RefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
++
+ /*
+  * 12288 is set as the maximum, chosen because it is enough for
+  * 1920x1440 at 32bpp with a 2048 pixel line pitch with some to spare.
+  */
+ #define I830_MAXIMUM_VBIOS_MEM		12288
+-#define I830_DEFAULT_VIDEOMEM_2D	(MB(8) / 1024)
+-#define I830_DEFAULT_VIDEOMEM_3D	(MB(32) / 1024)
++#define I830_DEFAULT_VIDEOMEM_2D	(MB(32) / 1024)
++#define I830_DEFAULT_VIDEOMEM_3D	(MB(64) / 1024)
+ 
+ /* Flags for memory allocation function */
+ #define FROM_ANYWHERE			0x00000000
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830_common.h.i945	2005-08-18 19:40:12.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_common.h	2005-08-18 19:40:24.000000000 -0400
+@@ -55,7 +55,8 @@
+ typedef struct {
+    enum {
+       I830_INIT_DMA = 0x01,
+-      I830_CLEANUP_DMA = 0x02
++      I830_CLEANUP_DMA = 0x02,
++      I830_RESUME_DMA = 0x03
+    } func;
+    unsigned int mmio_offset;
+    int sarea_priv_offset;
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c.i945	2005-08-18 19:40:12.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c	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.
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a
+@@ -82,7 +82,7 @@
+ 
+    DPRINTF(PFX, "I830InitHWCursor\n");
+    /* Initialise the HW cursor registers, leaving the cursor hidden. */
+-   if (IS_MOBILE(pI830) || IS_I915G(pI830)) {
++   if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) {
+       temp = INREG(CURSOR_A_CONTROL);
+       temp &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE | MCURSOR_MEM_TYPE_LOCAL |
+ 		MCURSOR_PIPE_SELECT);
+@@ -304,7 +304,7 @@
+    }
+ 
+    /* have to upload the base for the new position */
+-   if (IS_I915G(pI830)) {
++   if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) {
+       if (pI830->CursorIsARGB)
+          OUTREG(CURSOR_A_BASE, pI830->CursorMemARGB->Physical);
+       else
+@@ -335,7 +335,7 @@
+ 	   pI830->CursorMemARGB->Physical, pI830->CursorMemARGB->Start);
+ 
+    pI830->cursorOn = TRUE;
+-   if (IS_MOBILE(pI830) || IS_I915G(pI830)) {
++   if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) {
+       temp = INREG(CURSOR_A_CONTROL);
+       temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT);
+       if (pI830->CursorIsARGB)
+@@ -383,7 +383,7 @@
+    DPRINTF(PFX, "I830HideCursor\n");
+ 
+    pI830->cursorOn = FALSE;
+-   if (IS_MOBILE(pI830) || IS_I915G(pI830)) {
++   if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) {
+       temp = INREG(CURSOR_A_CONTROL);
+       temp &= ~CURSOR_MODE;
+       temp |= CURSOR_MODE_DISABLE;
+--- xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c.i945	2005-08-18 19:40:12.000000000 -0400
++++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c	2005-08-18 19:40:24.000000000 -0400
+@@ -2,7 +2,7 @@
+ /**************************************************************************
+ 
+ Copyright 2001 VA Linux Systems Inc., Fremont, California.
+-Copyright Š 2002 by David Dawes
++Copyright Š 2002 by David Dawes
+ 
+ All Rights Reserved.
+ 
+@@ -163,6 +163,24 @@
+ }
+ 
+ static Bool
++I830ResumeDma(ScrnInfoPtr pScrn)
++{
++   I830Ptr pI830 = I830PTR(pScrn);
++   drmI830Init info;
++
++   memset(&info, 0, sizeof(drmI830Init));
++   info.func = I830_RESUME_DMA;
++
++   if (drmCommandWrite(pI830->drmSubFD, DRM_I830_INIT,
++		       &info, sizeof(drmI830Init))) {
++      xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I830 Dma Resume Failed\n");
++      return FALSE;
++   }
++
++   return TRUE;
++}
++
++static Bool
+ I830SetParam(ScrnInfoPtr pScrn, int param, int value)
+ {
+    I830Ptr pI830 = I830PTR(pScrn);
+@@ -510,7 +528,7 @@
+       return FALSE;
+    }
+ 
+-   /* Check the i830 DRM versioning */
++   /* Check the i915 DRM versioning */
+    {
+       drmVersionPtr version;
+ 
+@@ -568,10 +586,18 @@
+ 	    drmFreeVersion(version);
+ 	    return FALSE;
+ 	 }
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list