Module Name: xsrc
Committed By: macallan
Date: Thu Jul 19 19:18:20 UTC 2012
Modified Files:
xsrc/external/mit/xf86-video-xgi/dist/src: vb_ext.c vb_i2c.c vb_i2c.h
vb_init.c vb_setmode.c vb_table.h vgatypes.h xgi.h xgi_accel.c
xgi_driver.c xgi_driver.h xgi_opt.c xgi_setup.c xgi_video.c
Log Message:
make this compile on NetBSD, still needs to be tested on actual hardware
( hi msaitoh@ )
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h \
xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.1.1.1 Thu Jul 19 15:24:38 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c Thu Jul 19 19:18:20 2012
@@ -139,7 +139,7 @@ void XGI_GetSenseStatus( PXGI_HW_DEVICE_
USHORT tempax = 0 , tempbx , tempcx , temp ,
P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = pVBInfo->OutputSelect,
ModeIdIndex , i ;
- pVBInfo->BaseAddr = ( USHORT )HwDeviceExtension->pjIOAddress ;
+ pVBInfo->BaseAddr = ( ULONG )HwDeviceExtension->pjIOAddress ;
{ /* for 301 */
if ( pVBInfo->VBInfo & SetCRT2ToHiVisionTV )
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.1.1.1 Thu Jul 19 15:24:39 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c Thu Jul 19 19:18:20 2012
@@ -3,6 +3,7 @@
#include "config.h"
#endif
+#include <unistd.h>
#include "osdef.h"
#include "vgatypes.h"
/* #include "vb_util.h" */ /* Jong@08032009 */
@@ -114,7 +115,7 @@ typedef enum _I2C_ACCESS_CMD
#define ENABLE_GPIOC 0x04
VOID
EnableGPIOA(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
{
PDEBUGI2C(ErrorF("EnableGPIOA()-pjIOPort=0x%x...\n", pjIOPort));
@@ -134,7 +135,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
VOID
EnableGPIOB(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
{
UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III);
@@ -152,7 +153,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
VOID
EnableGPIOC(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
{
UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III);
@@ -1174,8 +1175,8 @@ UCHAR ReverseUCHAR(UCHAR data)
*************************************************************************/
VOID vWriteClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
- UCHAR temp;
- PUCHAR pjI2cIOBase;
+ UCHAR temp;
+ XGIIOADDRESS pjI2cIOBase;
PDEBUGI2C(ErrorF("vWriteClockLineDVI()...begin\n"));
@@ -1224,8 +1225,8 @@ VOID vWriteClockLineDVI(PXGI_HW_DEVICE_I
*************************************************************************/
VOID vWriteDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
- UCHAR temp;
- PUCHAR pjI2cIOBase;
+ UCHAR temp;
+ XGIIOADDRESS pjI2cIOBase;
PDEBUGI2C(ErrorF("vWriteDataLineDVI()...begin\n"));
@@ -1277,8 +1278,8 @@ VOID vWriteDataLineDVI(PXGI_HW_DEVICE_IN
*************************************************************************/
BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE)
{
- UCHAR cPortData;
- PUCHAR pjI2cIOBase;
+ UCHAR cPortData;
+ XGIIOADDRESS pjI2cIOBase;
PDEBUGI2C(ErrorF("bReadClockLineDVI()...begin\n"));
@@ -1318,7 +1319,7 @@ BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE
BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE)
{
UCHAR cPortData;
- PUCHAR pjI2cIOBase;
+ XGIIOADDRESS pjI2cIOBase;
PDEBUGI2C(ErrorF("bReadDataLineDVI()...begin\n"));
@@ -1357,7 +1358,7 @@ BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_
//*************************************************************************//
VOID vWaitForCRT1HsyncActive(PXGI_HW_DEVICE_INFO pHWDE)
{
- PUCHAR pjPort = pHWDE->pjIOAddress + INPUT_STATUS_1_COLOR;
+ XGIIOADDRESS pjPort = pHWDE->pjIOAddress + INPUT_STATUS_1_COLOR;
ULONG i;
for (i = 0; i < 0x00FFFF; i++)
@@ -1398,7 +1399,7 @@ VOID vWaitForCRT1HsyncActive(PXGI_HW_DEV
VOID vWriteClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
UCHAR temp, ujSR1F;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
PDEBUGI2C(ErrorF("I2C:Write CRT clock = %x\n", data & 1));
@@ -1433,7 +1434,7 @@ VOID vWriteClockLineCRT(PXGI_HW_DEVICE_I
VOID vWriteDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
UCHAR temp, ujSR1F;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
PDEBUGI2C(ErrorF("I2C:Write CRT data = %x\n", data & 1));
@@ -1467,7 +1468,7 @@ VOID vWriteDataLineCRT(PXGI_HW_DEVICE_IN
BOOLEAN bReadClockLineCRT(PXGI_HW_DEVICE_INFO pHWDE)
{
UCHAR cPortData;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG);
cPortData = GETBITS(cPortData, 0:0);
@@ -1489,7 +1490,7 @@ BOOLEAN bReadClockLineCRT(PXGI_HW_DEVICE
BOOLEAN bReadDataLineCRT(PXGI_HW_DEVICE_INFO pHWDE)
{
UCHAR cPortData;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG);
cPortData = GETBITS(cPortData, 1:1);
@@ -1517,7 +1518,7 @@ BOOLEAN bReadDataLineCRT(PXGI_HW_DEVICE_
VOID vWriteClockLineFCNT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
UCHAR temp;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
PDEBUGI2C(ErrorF("I2C:Write FCNT clock = %x\n", data & 1));
@@ -1541,7 +1542,7 @@ VOID vWriteClockLineFCNT(PXGI_HW_DEVICE_
VOID vWriteDataLineFCNT(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
{
UCHAR temp, temp2, temp3;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
PDEBUGI2C(ErrorF("I2C:Write FCNT data = %x\n", data & 1));
@@ -1565,7 +1566,7 @@ VOID vWriteDataLineFCNT(PXGI_HW_DEVICE_I
BOOLEAN bReadClockLineFCNT(PXGI_HW_DEVICE_INFO pHWDE)
{
UCHAR cPortData;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG);
cPortData = GETBITS(cPortData, 2:2);
@@ -1587,7 +1588,7 @@ BOOLEAN bReadClockLineFCNT(PXGI_HW_DEVIC
BOOLEAN bReadDataLineFCNT(PXGI_HW_DEVICE_INFO pHWDE)
{
UCHAR cPortData;
- PUCHAR pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
+ XGIIOADDRESS pjI2cIOBase = pHWDE->pjIOAddress + SEQ_ADDRESS_PORT;
cPortData = XGI_GetReg(pjI2cIOBase, IND_SR11_DDC_REG);
cPortData = GETBITS(cPortData, 3:3);
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h:1.1.1.1 Thu Jul 19 15:24:39 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h Thu Jul 19 19:18:20 2012
@@ -7,7 +7,7 @@
#endif
#ifndef u32
#define u32 unsigned long
-#define u8 unsigned long
+#define u8 uint8_t
#endif
/* Jong@08052009 */
@@ -81,8 +81,11 @@
//#define MASK(n) BITSMASK(1?n, 0?n)
// set bits as 1 between bit(a) and bit(b)
#define MASK(n) ( BITS(LARGE(n)-SMALL(n)+1) << SMALL(n) )
+
+#ifndef GETBITS
// get bits [a:b]'s binary value
#define GETBITS(b,n) ( ((b) & MASK(n)) >> SMALL(n) ) /* Jong@08032009 */
+#endif /* GETBITS */
// set binary value from [a:0] to [c:d]
#define SETBITS(b, n) ( ( (b) << ((1?n) > (0?n) ? (0?n) : (1?n)) ) & MASK(n) )
// move bits value from [a:b] to [c:d]
@@ -180,5 +183,6 @@ extern BOOLEAN ResetI2C(PXGI_HW_DEVICE_
extern BOOLEAN I2CRead(PXGI_HW_DEVICE_INFO pHWDE,PI2CControl pI2CControl);
extern BOOLEAN I2CWrite(PXGI_HW_DEVICE_INFO pHWDE, PI2CControl pI2CControl);
extern BOOLEAN ResetI2C(PXGI_HW_DEVICE_INFO pHWDE, PI2CControl pI2CControl);
+extern BOOLEAN bGetEDID(PXGI_HW_DEVICE_INFO, ULONG , PUCHAR, ULONG);
#endif
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c:1.1.1.1 Thu Jul 19 15:24:39 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c Thu Jul 19 19:18:20 2012
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include <unistd.h>
#include "osdef.h"
#include "vgatypes.h"
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c:1.1.1.1 Thu Jul 19 15:24:40 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c Thu Jul 19 19:18:20 2012
@@ -189,7 +189,7 @@ void XGI_GetTVInfo(USHORT ModeNo, USHORT
void XGI_SetCRT2ECLK(USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo);
void InitTo330Pointer(UCHAR, PVB_DEVICE_INFO pVBInfo);
-void XGI_GetLCDSync(USHORT * HSyncWidth, USHORT * VSyncWidth,
+void XGI_GetLCDSync(ULONG * HSyncWidth, ULONG * VSyncWidth,
PVB_DEVICE_INFO pVBInfo);
void XGI_DisableBridge(PXGI_HW_DEVICE_INFO HwDeviceExtension,
PVB_DEVICE_INFO pVBInfo);
@@ -325,8 +325,8 @@ InitTo330Pointer(UCHAR ChipType, PVB_DEV
(void) memcpy(pVBInfo->ECLKData, XGI330_ECLKData, sizeof(XGI330_ECLKData));
}
- pVBInfo->VCLKData = XGI_VCLKData;
- pVBInfo->VBVCLKData = XGI_VBVCLKData;
+ pVBInfo->VCLKData = (const XGI_VCLKDataStruct *)XGI_VCLKData;
+ pVBInfo->VBVCLKData = (const XGI_VBVCLKDataStruct *)XGI_VBVCLKData;
pVBInfo->ScreenOffset = XGI330_ScreenOffset;
pVBInfo->StResInfo = XGI330_StResInfo;
pVBInfo->ModeResInfo = XGI330_ModeResInfo;
@@ -3131,7 +3131,7 @@ XGI_GetLVDSResInfo(USHORT ModeNo, USHORT
static void
-get_HDE_VDE(PVB_DEVICE_INFO pVBInfo, USHORT *HDE, USHORT *VDE)
+get_HDE_VDE(PVB_DEVICE_INFO pVBInfo, ULONG *HDE, ULONG *VDE)
{
switch (pVBInfo->LCDResInfo) {
case Panel1024x768:
@@ -3265,7 +3265,7 @@ void
XGI_SetLVDSRegs(USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo)
{
- USHORT tempbx, tempax, tempcx, tempdx, push1, push2, modeflag;
+ ULONG tempbx, tempax, tempcx, tempdx, push1, push2, modeflag;
unsigned long temp, temp1, temp2, temp3, push3;
XGI330_LCDDataDesStruct *LCDPtr = NULL;
XGI330_LCDDataDesStruct2 *LCDPtr1 = NULL;
@@ -6282,7 +6282,7 @@ XGI_SetLCDRegs(USHORT ModeNo, USHORT Mod
PXGI_HW_DEVICE_INFO HwDeviceExtension,
USHORT RefreshRateTableIndex, PVB_DEVICE_INFO pVBInfo)
{
- USHORT push1,
+ ULONG push1,
push2,
pushbx,
tempax,
@@ -8610,7 +8610,7 @@ XGI_GetLCDCapPtr1(PVB_DEVICE_INFO pVBInf
/* Description : */
/* --------------------------------------------------------------------- */
void
-XGI_GetLCDSync(USHORT * HSyncWidth, USHORT * VSyncWidth,
+XGI_GetLCDSync(ULONG * HSyncWidth, ULONG * VSyncWidth,
PVB_DEVICE_INFO pVBInfo)
{
USHORT Index;
@@ -10018,7 +10018,7 @@ XGI_GetVCLK2Ptr(USHORT ModeNo, USHORT Mo
{
/* Jong 10/08/2007; merge code */
USHORT tempbx ;
- UCHAR *CHTVVCLKPtr = NULL ;
+ const UCHAR *CHTVVCLKPtr = NULL ;
unsigned VCLKIndex;
USHORT CRT2Index;
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h:1.1.1.1 Thu Jul 19 15:24:41 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h Thu Jul 19 19:18:20 2012
@@ -3112,14 +3112,14 @@ static const XGI_ModeResInfoStruct XGI33
{ 1152, 864, 8,16}
};
-static const UCHAR XGI330_OutputSelect = 0x40;
-static const UCHAR XGI330_SoftSetting = 0x30;
-static const UCHAR XGI330_SR07 = 0x18;
-static const UCHAR XG21_DVOSetting = 0x00 ;
-static const UCHAR XG21_CR2E = 0x00 ;
-static const UCHAR XG21_CR2F = 0x00 ;
-static const UCHAR XG21_CR46 = 0x00 ;
-static const UCHAR XG21_CR47 = 0x00 ;
+static UCHAR XGI330_OutputSelect = 0x40;
+static UCHAR XGI330_SoftSetting = 0x30;
+static UCHAR XGI330_SR07 = 0x18;
+static UCHAR XG21_DVOSetting = 0x00 ;
+static UCHAR XG21_CR2E = 0x00 ;
+static UCHAR XG21_CR2F = 0x00 ;
+static UCHAR XG21_CR46 = 0x00 ;
+static UCHAR XG21_CR47 = 0x00 ;
UCHAR XG27_CR97 = 0xC1 ;
UCHAR XG27_SR36 = 0x30 ;
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h:1.1.1.1 Thu Jul 19 15:24:41 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h Thu Jul 19 19:18:20 2012
@@ -212,7 +212,7 @@ typedef struct _XGI_DSReg
typedef struct _XGI_HW_DEVICE_INFO XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO;
-typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, ULONG *);
+typedef BOOLEAN (*PXGI_QUERYSPACE) (PXGI_HW_DEVICE_INFO, ULONG, ULONG, CARD32 *);
struct _XGI_HW_DEVICE_INFO
{
@@ -229,7 +229,7 @@ struct _XGI_HW_DEVICE_INFO
ULONG ulVideoMemorySize; /* size, in bytes, of the memory on the board */
- PUCHAR pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
+ XGIIOADDRESS pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
PUCHAR pjCustomizedROMImage;
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h:1.1.1.1 Thu Jul 19 15:24:41 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h Thu Jul 19 19:18:20 2012
@@ -32,13 +32,6 @@
#ifndef _XGI_H_
#define _XGI_H_
-#define DEBUG
-#define DEBUG1
-#define DEBUG2
-#define DEBUG3
-#define DEBUG4
-#define DEBUG5
-
/***************
#define DEBUG
#define DEBUG1
@@ -51,7 +44,7 @@
#ifndef XGI_VIDEO_HW /* avoid compile error in xgi_videohw.c; weird! */
/* Jong 07/27/2009; use run-time debug instead except for HW acceleration routines */
-extern BOOL g_bRunTimeDebug;
+extern Bool g_bRunTimeDebug;
#define RUNTIMEDEBUG(p) if(g_bRunTimeDebug)p;
/* Jong@08052009 */
@@ -1017,7 +1010,10 @@ extern void XGI_SetRegANDOR(XGIIOADDRESS
extern void XGI_SetRegAND(XGIIOADDRESS Port, USHORT Index, USHORT DataAND);
extern void XGI_SetRegOR(XGIIOADDRESS Port, USHORT Index, USHORT DataOR);
+#ifndef __NetBSD__
#define uint8_t CARD8
+#endif
+
extern void XGI_WriteDAC(XGIIOADDRESS dac_data, unsigned shift,
unsigned ordering, uint8_t red, uint8_t green, uint8_t blue);
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c:1.1.1.1 Thu Jul 19 15:24:41 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c Thu Jul 19 19:18:20 2012
@@ -34,6 +34,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include <unistd.h>
#include "xf86.h"
#include "xf86_OSproc.h"
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c:1.1.1.1 Thu Jul 19 15:24:43 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c Thu Jul 19 19:18:20 2012
@@ -47,9 +47,9 @@
#include "config.h"
#endif
-#define PACKAGE_VERSION_MAJOR 6
-#define PACKAGE_VERSION_MINOR 1
-#define PACKAGE_VERSION_PATCHLEVEL 6803
+#define PACKAGE_VERSION_MAJOR 1
+#define PACKAGE_VERSION_MINOR 6
+#define PACKAGE_VERSION_PATCHLEVEL 0
#include "fb.h"
#include "micmap.h"
@@ -77,11 +77,15 @@
#include "xgi_vb.h"
#include "xgi_dac.h"
#include "vb_def.h"
+#include "vb_ext.h"
+#include "vb_i2c.h"
+#include "vb_setmode.h"
#include "xgi_driver.h"
+#include "xgi_accel.h"
#include "valid_mode.h"
#define _XF86DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
#include "globals.h"
@@ -106,11 +110,8 @@
#include <unistd.h>
#endif
-/* Jong 01/22/2009; compiler error; type conflict */
-/*
#include <fcntl.h>
#include <sys/ioctl.h>
-*/
#ifdef XSERVER_LIBPCIACCESS
static Bool XGIPciProbe(DriverPtr drv, int entity_num,
@@ -132,7 +133,7 @@ xf86MonPtr g_pMonitorDVI=NULL; /* Jong
/* Jong 07/27/2009; use run-time debug instead except for HW acceleration routines */
/* Set Option "RunTimeDebug" to "true" in X configuration file */
-BOOL g_bRunTimeDebug=0;
+Bool g_bRunTimeDebug=0;
/* Jong@09072009 */
unsigned char g_DVI_I_SignalType = 0x00;
@@ -500,6 +501,7 @@ xgiSetup(pointer module, pointer opts, i
xf86AddDriver(&XGI, module, 0);
#endif
+#if 0
LoaderRefSymLists(vgahwSymbols, fbSymbols, xaaSymbols,
shadowSymbols, ramdacSymbols, ddcSymbols,
vbeSymbols, int10Symbols,
@@ -507,6 +509,7 @@ xgiSetup(pointer module, pointer opts, i
drmSymbols, driSymbols,
#endif
NULL);
+#endif
return (pointer) TRUE;
}
@@ -1615,7 +1618,9 @@ XGIInternalDDC(ScrnInfoPtr pScrn, int cr
ErrorF("get EDID with VBIOS call...\n");
if (xf86LoadSubModule(pScrn, "int10"))
{
+#if 0
xf86LoaderReqSymLists(int10Symbols, NULL);
+#endif
pInt = xf86InitInt10(pXGI->pEnt->index);
if (pInt == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -1676,9 +1681,9 @@ XGIInternalDDC(ScrnInfoPtr pScrn, int cr
g_DVI_I_SignalType = (buffer[20] & 0x80) >> 7;
ErrorF("DVI-I : %s signal ...\n", (g_DVI_I_SignalType == 0x01) ? "DVI" : "CRT" );
-
+#if 0
xf86LoaderReqSymLists(ddcSymbols, NULL);
-
+#endif
/* Jong 09/04/2007; Alan fixed abnormal EDID data */
/* pMonitor = xf86InterpretEDID(pScrn->scrnIndex, buffer) ; */
if ( (buffer[0]==0) && (buffer[7]==0) )
@@ -2218,9 +2223,9 @@ XGIDDCPreInit(ScrnInfoPtr pScrn)
if (xf86LoadSubModule(pScrn, "ddc"))
{
-
+#if 0
xf86LoaderReqSymLists(ddcSymbols, NULL);
-
+#endif
if (pXGI->xgi_HwDevExt.jChipType == XG27)
{
ErrorF("Getting CRT EDID (DAC1-CRT1)...\n");
@@ -2684,9 +2689,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIErrorLog(pScrn, "Could not load vgahw module\n");
return FALSE;
}
-
+#if 0
xf86LoaderReqSymLists(vgahwSymbols, NULL);
-
+#endif
/* Due to the liberal license terms this is needed for
* keeping the copyright notice readable and intact in
* binary distributions. Removing this is a copyright
@@ -2798,7 +2803,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
"Initializing display adapter through int10\n");
if (xf86LoadSubModule(pScrn, "int10")) {
+#if 0
xf86LoaderReqSymLists(int10Symbols, NULL);
+#endif
pXGI->pInt = xf86InitInt10(pXGI->pEnt->index);
}
else {
@@ -2829,9 +2836,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIFreeRec(pScrn);
return FALSE;
}
-
+#if 0
xf86LoaderReqSymLists(ramdacSymbols, NULL);
-
+#endif
/* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor;
@@ -3695,7 +3702,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
#if !defined(__powerpc__)
/* Now load and initialize VBE module. */
if (xf86LoadSubModule(pScrn, "vbe")) {
+#if 0
xf86LoaderReqSymLists(vbeSymbols, NULL);
+#endif
pXGI->pVbe = VBEExtendedInit(pXGI->pInt, pXGI->pEnt->index,
SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH);
if (!pXGI->pVbe) {
@@ -4117,8 +4126,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIFreeRec(pScrn);
return FALSE;
}
+#if 0
xf86LoaderReqSymLists(fbSymbols, NULL);
-
+#endif
/* Load XAA if needed */
if (!pXGI->NoAccel)
{
@@ -4139,7 +4149,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIFreeRec(pScrn);
return FALSE;
}
+#if 0
xf86LoaderReqSymLists(xaaSymbols, NULL);
+#endif
}
#endif
@@ -4150,7 +4162,9 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIErrorLog(pScrn, "Could not load exa module\n");
return FALSE;
}
+#if 0
xf86LoaderReqSymLists(exaSymbols, NULL);
+#endif
}
#endif
}
@@ -4169,14 +4183,18 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
XGIFreeRec(pScrn);
return FALSE;
}
+#if 0
xf86LoaderReqSymLists(shadowSymbols, NULL);
+#endif
}
/* Load the dri module if requested. */
#ifdef XF86DRI
if(pXGI->loadDRI) {
if (xf86LoadSubModule(pScrn, "dri")) {
+#if 0
xf86LoaderReqSymLists(driSymbols, drmSymbols, NULL);
+#endif
}
else {
if (!IS_DUAL_HEAD(pXGI))
@@ -4771,7 +4789,9 @@ XGIScreenInit(int scrnIndex, ScreenPtr p
#if !defined(__powerpc__)
if (!IS_DUAL_HEAD(pXGI) || !IS_SECOND_HEAD(pXGI)) {
if (xf86LoadSubModule(pScrn, "vbe")) {
+#if 0
xf86LoaderReqSymLists(vbeSymbols, NULL);
+#endif
pXGI->pVbe = VBEExtendedInit(NULL, pXGI->pEnt->index,
SET_BIOS_SCRATCH |
RESTORE_BIOS_SCRATCH);
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h:1.1.1.1 Thu Jul 19 15:24:43 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h Thu Jul 19 19:18:20 2012
@@ -493,10 +493,10 @@ static const MyXGITVVScale XGITVVScale[]
},
};
-unsigned const char XGIScalingP1Regs[] = {
+static unsigned const char XGIScalingP1Regs[] = {
0x08,0x09,0x0b,0x0c,0x0d,0x0e,0x10,0x11,0x12
};
-unsigned const char XGIScalingP4Regs[] = {
+static unsigned const char XGIScalingP4Regs[] = {
0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b
};
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c:1.1.1.1 Thu Jul 19 15:24:43 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c Thu Jul 19 19:18:20 2012
@@ -315,13 +315,13 @@ xgiOptions(ScrnInfoPtr pScrn)
Non_DDCDefaultResolutionY ,
Non_DDCDefaultRefreshRate );
- if( (xf86NameCmp(Non_DDCDefaultResolutionX,"") == NULL) || (xf86NameCmp(Non_DDCDefaultResolutionY,"") == NULL) )
+ if( (xf86NameCmp(Non_DDCDefaultResolutionX,"") == 0) || (xf86NameCmp(Non_DDCDefaultResolutionY,"") == 0) )
{
strcpy(Non_DDCDefaultResolutionX, "1024");
strcpy(Non_DDCDefaultResolutionY, "768");
}
- if( (xf86NameCmp(Non_DDCDefaultRefreshRate,"") == NULL) || (xf86NameCmp(Non_DDCDefaultRefreshRate,"auto") == NULL) )
+ if( (xf86NameCmp(Non_DDCDefaultRefreshRate,"") == 0) || (xf86NameCmp(Non_DDCDefaultRefreshRate,"auto") == 0) )
strcpy(Non_DDCDefaultRefreshRate, "60");
ErrorF("Non-DDC default mode is (%s x %s @ %s Hz)...\n",
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.1.1.1 Thu Jul 19 15:24:43 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c Thu Jul 19 19:18:20 2012
@@ -47,10 +47,11 @@
#include "xgi.h"
#include "xgi_regs.h"
#include "xgi_dac.h"
+#include "xgi_driver.h"
/* #include "valid_mode.h" */
#define _XF86DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
#include "globals.h"
#ifdef HAVE_XEXTPROTO_71
@@ -65,7 +66,7 @@
extern int FbDevExist;
static Bool bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset,
- ULONG ulSet, ULONG *pulValue);
+ ULONG ulSet, CARD32 *pulValue);
static Bool bAccessNBridgePCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo,
ULONG ulOffset, ULONG ulSet, ULONG *pulValue);
static Bool XGI_IsXG21(ScrnInfoPtr pScrn);
@@ -659,7 +660,7 @@ XGI_InitHwDevInfo(ScrnInfoPtr pScrn)
}
Bool
-bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, ULONG ulSet, ULONG *pulValue)
+bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pHwDevInfo, ULONG ulOffset, ULONG ulSet, CARD32 *pulValue)
{
XGIPtr pXGI ;
#ifdef XSERVER_LIBPCIACCESS
@@ -678,7 +679,7 @@ bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pH
err = pci_device_cfg_write_u32(pXGI->PciInfo, *pulValue,
ulOffset & ~3);
} else {
- err = pci_device_cfg_write_u32(pXGI->PciInfo, pulValue,
+ err = pci_device_cfg_read_u32(pXGI->PciInfo, pulValue,
ulOffset & ~3);
}
Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c:1.1.1.1 Thu Jul 19 15:24:43 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c Thu Jul 19 19:18:20 2012
@@ -101,7 +101,7 @@ static void XGIQueryBestSize(ScrnInfoPtr
short, short, short, short, unsigned int *, unsigned int *, pointer);
static int XGIPutImage( ScrnInfoPtr,
short, short, short, short, short, short, short, short,
- int, unsigned char*, short, short, Bool, RegionPtr, pointer);
+ int, unsigned char*, short, short, Bool, RegionPtr, pointer, DrawablePtr);
static int XGIQueryImageAttributes(ScrnInfoPtr,
int, unsigned short *, unsigned short *, int *, int *);
@@ -1081,7 +1081,8 @@ XGIPutImage(
int id, unsigned char* buf,
short width, short height,
Bool sync,
- RegionPtr clipBoxes, pointer data
+ RegionPtr clipBoxes, pointer data,
+ DrawablePtr pDraw
){
XGIPtr pXGI = XGIPTR(pScrn);
XGIPortPrivPtr pPriv = (XGIPortPrivPtr)data;