[xorg-commit-diffs] xc/programs/Xserver/hw/xfree86/drivers/i810
i830.h, 1.1.4.3, 1.1.4.4 i830_driver.c, 1.1.4.3, 1.1.4.4
Egbert Eich
xorg-commit at pdx.freedesktop.org
Tue Mar 30 06:23:48 PST 2004
Committed by: eich
Update of /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810
In directory pdx:/tmp/cvs-serv15785/programs/Xserver/hw/xfree86/drivers/i810
Modified Files:
Tag: XORG-CURRENT
i830.h i830_driver.c
Log Message:
36. Conversion: __AMD64__ > __amd64__ (Egbert Eich).
35. Fixed stretching option and centering in C&T driver (Egbert Eich).
34. Added support for memory size tweaking in BIOS for i845 (Egbert Eich,
thanks to Christian Ziez)
33. Removed video playback dependency on Accel in NSC drivers (Egbert
3Eich).
32. Fix HW cursor state on Savage driver when entering VT as some
BIOSes seem to enable it unconditionally (Egbert Eich).
31. Fixed Emulate3Button message to distinguish between 'hard' (ie.
configured) and 'soft' (ie. automatic emulation that is disabled as
soon as the middle button is pressed) (Egbert Eich).
30. Free XrmDB in XCloseDisplay() only when implicitely allocated by
XGetDefaults(). If Client allocates it itself it should free it also.
Trying to free it for the client may result in segfault if the client
has already freed it (Egbert Eich).
Index: i830.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/i830.h 5 Mar 2004 13:40:24 -0000 1.1.4.3
+++ b/i830.h 30 Mar 2004 14:23:13 -0000 1.1.4.4
@@ -401,7 +401,8 @@
#define ALLOCATE_DRY_RUN 0x80000000
/* Chipset registers for VIDEO BIOS memory RW access */
-#define DRAM_RW_CONTROL 0x58
+#define _855_DRAM_RW_CONTROL 0x58
+#define _845_DRAM_RW_CONTROL 0x90
#define DRAM_WRITE 0x33330000
#endif /* _I830_H_ */
Index: i830_driver.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/i830_driver.c 5 Mar 2004 13:40:24 -0000 1.1.4.3
+++ b/i830_driver.c 30 Mar 2004 14:23:13 -0000 1.1.4.4
@@ -1079,7 +1079,9 @@
TweakMemorySize(ScrnInfoPtr pScrn, CARD32 newsize, Bool preinit)
{
#define SIZE 0x10000
-#define IDOFFSET (-23)
+#define _855_IDOFFSET (-23)
+#define _845_IDOFFSET (-19)
+
const char *MAGICstring = "Total time for VGA POST:";
const int len = strlen(MAGICstring);
I830Ptr pI830 = I830PTR(pScrn);
@@ -1090,7 +1092,8 @@
CARD32 ret = 0;
int i,j = 0;
PCITAG tag =pciTag(0,0,0);
-
+ int reg = IS_845G(pI830) ? _845_DRAM_RW_CONTROL : _855_DRAM_RW_CONTROL;
+
if(!pI830->PciInfo
|| !(pI830->PciInfo->chipType == PCI_CHIP_I855_GM
|| pI830->PciInfo->chipType == PCI_CHIP_I865_G))
@@ -1119,19 +1122,19 @@
}
if (j < len) return 0;
- pI830->BIOSMemSizeLoc = (i - j + 1 + IDOFFSET);
+ pI830->BIOSMemSizeLoc = (i - j + 1 + (IS_845G(pI830)
+ ? _845_IDOFFSET : _855_IDOFFSET));
}
position = biosAddr + pI830->BIOSMemSizeLoc;
oldsize = *(CARD32 *)position;
ret = oldsize - (3 << 16);
-
/* verify that register really contains current size */
if (preinit && ((oldsize) >> 16) - 3 != pI830->vbeInfo->TotalMemory)
return 0;
- oldpermission = pciReadLong(tag, DRAM_RW_CONTROL);
- pciWriteLong(tag, DRAM_RW_CONTROL, 0x33330000);
+ oldpermission = pciReadLong(tag, reg);
+ pciWriteLong(tag, reg, 0x33330000);
*(CARD32 *)position = newsize + (3 << 16);
if (preinit) {
@@ -1142,7 +1145,7 @@
pI830->vbeInfo = VBEGetVBEInfo(pI830->pVbe);
/* verify that change was successful */
- if (pI830->vbeInfo->TotalMemory * 64 * 1024 != pI830->newBIOSMemSize) {
+ if (pI830->vbeInfo->TotalMemory * 64 * 1024 != pI830->newBIOSMemSize){
ret = 0;
*(CARD32 *)position = oldsize;
} else {
@@ -1153,7 +1156,7 @@
}
}
- pciWriteLong(tag, DRAM_RW_CONTROL, oldpermission);
+ pciWriteLong(tag, reg, oldpermission);
return ret;
}
More information about the xorg-commit-diffs
mailing list