xf86-video-ati: Branch 'master' - 4 commits
Dave Airlie
airlied at kemper.freedesktop.org
Thu Jun 15 13:39:36 EEST 2006
src/ati.h | 1
src/aticlock.c | 1
src/aticonsole.c | 3 --
src/atidri.c | 25 +++++++++--------------
src/atiprint.c | 1
src/r128.h | 1
src/r128_dri.c | 3 +-
src/radeon_accel.c | 4 +++
src/radeon_cursor.c | 7 +-----
src/radeon_mergedfb.c | 2 -
src/theatre.c | 19 ++++++-----------
src/theatre200.c | 54 +++++++++++++++++++++++++-------------------------
src/theatre200.h | 16 +++++++-------
src/theatre_detect.c | 18 ++++++++--------
14 files changed, 75 insertions(+), 80 deletions(-)
New commits:
diff-tree d511ef486a15b582e5d1708a17a00701f5cf1ccd (from f46c3bebe821ee0031770d98d04bd406d1abb9ed)
Author: Dave Airlie <airlied at linux.ie>
Date: Thu Jun 15 20:39:22 2006 +1000
ati/r128: add includes to get C function decls
Also fix a void pointer cast
diff --git a/src/ati.h b/src/ati.h
index 4f87b03..746177e 100644
--- a/src/ati.h
+++ b/src/ati.h
@@ -24,6 +24,7 @@
#ifndef ___ATI_H___
#define ___ATI_H___ 1
+#include <unistd.h>
#include "xf86Pci.h"
#include "atipciids.h"
diff --git a/src/aticlock.c b/src/aticlock.c
index 5acd3f8..c0de559 100644
--- a/src/aticlock.c
+++ b/src/aticlock.c
@@ -196,6 +196,7 @@
#include "config.h"
#endif
+#include <stdlib.h>
#include "ati.h"
#include "atiadapter.h"
#include "atichip.h"
diff --git a/src/atiprint.c b/src/atiprint.c
index 365cffc..d785101 100644
--- a/src/atiprint.c
+++ b/src/atiprint.c
@@ -26,6 +26,7 @@
#endif
#include <string.h>
+#include <ctype.h>
#include "ati.h"
#include "atiadapter.h"
diff --git a/src/r128.h b/src/r128.h
index eced5c7..b37b3ce 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -38,6 +38,7 @@
#ifndef _R128_H_
#define _R128_H_
+#include <unistd.h>
#include "xf86str.h"
/* PCI support */
diff --git a/src/r128_dri.c b/src/r128_dri.c
index 5d7ac3f..62e53a4 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -33,6 +33,7 @@
#endif
#include <string.h>
+#include <stdio.h>
/*
* Authors:
@@ -1036,7 +1037,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen
pDRIInfo->ddxDriverMajorVersion = R128_VERSION_MAJOR;
pDRIInfo->ddxDriverMinorVersion = R128_VERSION_MINOR;
pDRIInfo->ddxDriverPatchVersion = R128_VERSION_PATCH;
- pDRIInfo->frameBufferPhysicalAddress = info->LinearAddr;
+ pDRIInfo->frameBufferPhysicalAddress = (void *)info->LinearAddr;
pDRIInfo->frameBufferSize = info->FbMapSize;
pDRIInfo->frameBufferStride = (pScrn->displayWidth *
info->CurrentLayout.pixel_bytes);
diff-tree f46c3bebe821ee0031770d98d04bd406d1abb9ed (from 6c3f81683abab8ff6b8f2fcaf01a2a1a63af5ef6)
Author: Dave Airlie <airlied at linux.ie>
Date: Thu Jun 15 20:34:56 2006 +1000
fix some more unused variables and bad parameter passing
diff --git a/src/aticonsole.c b/src/aticonsole.c
index 346bf44..53b1ed8 100644
--- a/src/aticonsole.c
+++ b/src/aticonsole.c
@@ -177,8 +177,7 @@ ATIProbeAndSetActiveDisplays
xf86LoaderRefSymLists(vbeSymbols, NULL);
if (xf86GetVerbosity() > 3) {
- xf86ErrorFVerb(4, "\n Before TV-Out queries\n\n",
- pScreenInfo->currentMode->name);
+ xf86ErrorFVerb(4, "\n Before TV-Out queries\n\n");
ATIPrintRegisters(pATI);
}
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 9068b7d..19f7bf1 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -785,7 +785,9 @@ RADEONHostDataBlitCopyPass(
unsigned int srcPitch
){
+#if X_BYTE_ORDER == X_BIG_ENDIAN
RADEONInfoPtr info = RADEONPTR( pScrn );
+#endif
/* RADEONHostDataBlitCopy can return NULL ! */
if( (dst==NULL) || (src==NULL)) return;
@@ -828,7 +830,9 @@ RADEONHostDataBlitCopyPass(
}
#endif
memcpy( dst, src, minPitch );
+#if X_BYTE_ORDER == X_BIG_ENDIAN
next:
+#endif
src += srcPitch;
dst += dstPitch;
}
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 3c748a8..d7a3891 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -134,8 +134,8 @@ RADEONCursorAllocEXA(ScreenPtr pScreen)
info->cursor_offset = 0;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Using hardware cursor\n",
- info->cursor_offset = info->cursorArea->offset);
+ "Using hardware cursor\n");
+ info->cursor_offset = info->cursorArea->offset;
RADEONCTRACE(("%s (0x%08x-0x%08x)\n", __func__,
info->cursor_offset,
@@ -357,9 +357,6 @@ static Bool RADEONUseHWCursor(ScreenPtr
static Bool RADEONUseHWCursorARGB (ScreenPtr pScreen, CursorPtr pCurs)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- RADEONInfoPtr info = RADEONPTR(pScrn);
-
if (RADEONUseHWCursor(pScreen, pCurs) &&
pCurs->bits->height <= CURSOR_HEIGHT && pCurs->bits->width <= CURSOR_WIDTH)
return TRUE;
diff --git a/src/radeon_mergedfb.c b/src/radeon_mergedfb.c
index 70846d9..bbedac9 100644
--- a/src/radeon_mergedfb.c
+++ b/src/radeon_mergedfb.c
@@ -347,8 +347,6 @@ RADEONGenerateModeListFromLargestModes(S
DisplayModePtr mode3 = NULL;
DisplayModePtr mode4 = NULL;
DisplayModePtr result = NULL;
- int p = 0;
- int count = 0;
info->AtLeastOneNonClone = FALSE;
diff-tree 6c3f81683abab8ff6b8f2fcaf01a2a1a63af5ef6 (from 58c6aac0669101481ef6b8217e5cede4573ece42)
Author: Dave Airlie <airlied at linux.ie>
Date: Thu Jun 15 20:25:00 2006 +1000
ati: fix -Wall in atidri.c
atidri.c has some parameter passing bugs, fixed those and cleaned other
warnings.
diff --git a/src/atidri.c b/src/atidri.c
index b611632..5155820 100644
--- a/src/atidri.c
+++ b/src/atidri.c
@@ -33,6 +33,7 @@
#include <string.h>
#include <stdio.h>
+#include <unistd.h>
/* Driver data structures */
#include "ati.h"
@@ -681,7 +682,6 @@ static Bool ATIDRISetAgpMode( ScreenPtr
if (pATI->OptionAGPSize) {
switch (pATI->OptionAGPSize) {
- case 256:
case 128:
case 64:
case 32:
@@ -775,8 +775,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pSc
if (pATI->OptionBufferSize > 2) {
xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Illegal DMA buffers size: %d MB\n",
pATI->OptionBufferSize );
- xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Clamping DMA buffers size to 2 MB\n",
- pATI->OptionBufferSize );
+ xf86DrvMsg( pScreen->myNum, X_WARNING, "[agp] Clamping DMA buffers size to 2 MB\n");
pATIDRIServer->bufferSize = 2;
} else {
pATIDRIServer->bufferSize = pATI->OptionBufferSize;
@@ -817,7 +816,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pSc
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[agp] ring handle = 0x%08lx\n",
+ "[agp] ring handle = 0x%08x\n",
pATIDRIServer->ringHandle );
if ( drmMap( pATI->drmFD, pATIDRIServer->ringHandle,
@@ -838,7 +837,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pSc
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[agp] vertex buffers handle = 0x%08lx\n",
+ "[agp] vertex buffers handle = 0x%08x\n",
pATIDRIServer->bufferHandle );
if ( drmMap( pATI->drmFD, pATIDRIServer->bufferHandle,
@@ -859,7 +858,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pSc
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[agp] AGP texture region handle = 0x%08lx\n",
+ "[agp] AGP texture region handle = 0x%08x\n",
pATIDRIServer->agpTexHandle);
if (drmMap(pATI->drmFD, pATIDRIServer->agpTexHandle, pATIDRIServer->agpTexMapSize,
@@ -928,7 +927,7 @@ static Bool ATIDRIMapInit( ScreenPtr pSc
return FALSE;
}
xf86DrvMsg( pScreen->myNum, X_INFO,
- "[drm] register handle = 0x%08lx\n",
+ "[drm] register handle = 0x%08x\n",
pATIDRIServer->regsHandle );
return TRUE;
@@ -1023,7 +1022,7 @@ static Bool ATIDRIMapBuffers( ScreenPtr
xf86DrvMsg( pScreen->myNum, X_INFO,
"[drm] Mapped %d DMA buffers at 0x%08lx\n",
pATIDRIServer->drmBuffers->count,
- pATIDRIServer->drmBuffers->list->address );
+ (unsigned long)pATIDRIServer->drmBuffers->list->address );
return TRUE;
}
@@ -1061,8 +1060,7 @@ static Bool ATIDRIIrqInit( ScreenPtr pSc
pATI->irq);
else {
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
- "[drm] Falling back to irq-free operation\n",
- pATI->irq);
+ "[drm] Falling back to irq-free operation\n");
return FALSE;
}
}
@@ -1152,7 +1150,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen
pDRIInfo->ddxDriverMajorVersion = ATI_VERSION_MAJOR;
pDRIInfo->ddxDriverMinorVersion = ATI_VERSION_MINOR;
pDRIInfo->ddxDriverPatchVersion = ATI_VERSION_PATCH;
- pDRIInfo->frameBufferPhysicalAddress = pATI->LinearBase;
+ pDRIInfo->frameBufferPhysicalAddress = (void *)pATI->LinearBase;
pDRIInfo->frameBufferSize = pATI->LinearSize;
pDRIInfo->frameBufferStride = (pScreenInfo->displayWidth *
pATI->FBBytesPerPixel);
@@ -1317,8 +1315,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen
if (pATI->OptionBufferSize > 2) {
xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Illegal DMA buffers size: %d MB\n",
pATI->OptionBufferSize );
- xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Clamping DMA buffers size to 2 MB\n",
- pATI->OptionBufferSize );
+ xf86DrvMsg( pScreen->myNum, X_WARNING, "[pci] Clamping DMA buffers size to 2 MB\n");
pATIDRIServer->bufferSize = 2;
} else {
pATIDRIServer->bufferSize = pATI->OptionBufferSize;
@@ -1463,8 +1460,6 @@ void ATIDRIResume( ScreenPtr pScreen )
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo;
- int ret;
-
xf86DrvMsg( pScreen->myNum, X_INFO,
"[RESUME] Attempting to re-init Mach64 hardware.\n");
diff-tree 58c6aac0669101481ef6b8217e5cede4573ece42 (from b7a3e4c9b33f72ae447f99c0c765f24fce988142)
Author: Dave Airlie <airlied at linux.ie>
Date: Thu Jun 15 19:58:11 2006 +1000
theatre: fix all -Wall warnings in theatre*
This fixes all the warnings, it doesn't clean up the horrible mess that is
theatre*.[ch].
diff --git a/src/theatre.c b/src/theatre.c
index 7008ca3..0a635fa 100644
--- a/src/theatre.c
+++ b/src/theatre.c
@@ -2,6 +2,7 @@
#include "config.h"
#endif
+#include <unistd.h>
#include "xf86.h"
#include "generic_bus.h"
#include "theatre.h"
@@ -1795,7 +1796,7 @@ void RT_SetConnector (TheatrePtr t, CARD
counter++;
}
dwTempContrast = ReadRT_fld (fld_LP_CONTRAST);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: timeout waiting for line count (%d)\n", ReadRT_fld (fld_VS_LINE_COUNT));
+ if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: timeout waiting for line count (%ld)\n", ReadRT_fld (fld_VS_LINE_COUNT));
WriteRT_fld (fld_LP_CONTRAST, 0x0);
@@ -1850,7 +1851,7 @@ void RT_SetConnector (TheatrePtr t, CARD
counter++;
}
WriteRT_fld (fld_LP_CONTRAST, dwTempContrast);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: timeout waiting for line count (%d)\n", ReadRT_fld (fld_VS_LINE_COUNT));
+ if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: timeout waiting for line count (%ld)\n", ReadRT_fld (fld_VS_LINE_COUNT));
@@ -1941,7 +1942,7 @@ void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register 0x%04x is equal to 0x%08x\n", i, data);
+ xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register 0x%04x is equal to 0x%08lx\n", i, data);
}
}
@@ -2141,21 +2142,18 @@ void DumpRageTheatreRegsByName(TheatrePt
{ "Y_FALL_CNTL ", 0x01cc },
{ "Y_RISE_CNTL ", 0x01d0 },
{ "Y_SAW_TOOTH_CNTL ", 0x01d4 },
- {NULL, NULL}
+ {NULL, 0}
};
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register (0x%04x) %s is equal to 0x%08x\n", rt_reg_list[i].addr, rt_reg_list[i].name, data);
+ xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register (0x%04lx) %s is equal to 0x%08lx\n", rt_reg_list[i].addr, rt_reg_list[i].name, data);
}
}
void ResetTheatreRegsForNoTVout(TheatrePtr t)
{
- int i;
- CARD32 data;
-
RT_regw(VIP_CLKOUT_CNTL, 0x0);
RT_regw(VIP_HCOUNT, 0x0);
RT_regw(VIP_VCOUNT, 0x0);
@@ -2170,9 +2168,6 @@ void ResetTheatreRegsForNoTVout(TheatreP
void ResetTheatreRegsForTVout(TheatrePtr t)
{
- int i;
- CARD32 data;
-
/* RT_regw(VIP_HW_DEBUG, 0x200); */
/* RT_regw(VIP_INT_CNTL, 0x0);
RT_regw(VIP_GPIO_INOUT, 0x10090000);
@@ -2187,7 +2182,7 @@ void ResetTheatreRegsForTVout(TheatrePtr
RT_regw(VIP_VCOUNT, 0x151);
#endif
RT_regw(VIP_DFCOUNT, 0x01);
-/* RT_regw(VIP_CLOCK_SEL_CNTL, 0xb7); /* versus 0x237 <-> 0x2b7 */
+/* RT_regw(VIP_CLOCK_SEL_CNTL, 0xb7); versus 0x237 <-> 0x2b7 */
RT_regw(VIP_CLOCK_SEL_CNTL, 0x2b7); /* versus 0x237 <-> 0x2b7 */
RT_regw(VIP_VIN_PLL_CNTL, 0x60a6039);
/* RT_regw(VIP_PLL_CNTL1, 0xacacac74); */
diff --git a/src/theatre200.c b/src/theatre200.c
index eb5139c..4b64884 100644
--- a/src/theatre200.c
+++ b/src/theatre200.c
@@ -30,7 +30,7 @@
* wrapped libc symbols to use libc symbols directly. The xf86*
* versions aren't supposed to be used directly.
*
- * * src/*.c: Drop libc wrapper; don't include xf86_ansic.h and add
+ * * src/ *.c: Drop libc wrapper; don't include xf86_ansic.h and add
* includes now missing.
*
* Revision 1.4 2005/08/28 18:00:23 bogdand
@@ -50,6 +50,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include "xf86.h"
#include "generic_bus.h"
@@ -73,24 +74,24 @@ static int dsp_load(TheatrePtr t, struct
static CARD32 dsp_send_command(TheatrePtr t, CARD32 fb_scratch1, CARD32 fb_scratch0);
static CARD32 dsp_set_video_input_connector(TheatrePtr t, CARD32 connector);
-static CARD32 dsp_reset(TheatrePtr t);
+//static CARD32 dsp_reset(TheatrePtr t);
static CARD32 dsp_set_lowpowerstate(TheatrePtr t, CARD32 pstate);
static CARD32 dsp_set_video_standard(TheatrePtr t, CARD32 standard);
static CARD32 dsp_set_videostreamformat(TheatrePtr t, CARD32 format);
static CARD32 dsp_video_standard_detection(TheatrePtr t);
-static CARD32 dsp_get_signallockstatus(TheatrePtr t);
-static CARD32 dsp_get_signallinenumber(TheatrePtr t);
+//static CARD32 dsp_get_signallockstatus(TheatrePtr t);
+//static CARD32 dsp_get_signallinenumber(TheatrePtr t);
static CARD32 dsp_set_brightness(TheatrePtr t, CARD8 brightness);
static CARD32 dsp_set_contrast(TheatrePtr t, CARD8 contrast);
-static CARD32 dsp_set_sharpness(TheatrePtr t, int sharpness);
+//static CARD32 dsp_set_sharpness(TheatrePtr t, int sharpness);
static CARD32 dsp_set_tint(TheatrePtr t, CARD8 tint);
static CARD32 dsp_set_saturation(TheatrePtr t, CARD8 saturation);
static CARD32 dsp_set_video_scaler_horizontal(TheatrePtr t, CARD16 output_width, CARD16 horz_start, CARD16 horz_end);
static CARD32 dsp_set_video_scaler_vertical(TheatrePtr t, CARD16 output_height, CARD16 vert_start, CARD16 vert_end);
static CARD32 dsp_audio_mute(TheatrePtr t, CARD8 left, CARD8 right);
static CARD32 dsp_set_audio_volume(TheatrePtr t, CARD8 left, CARD8 right, CARD8 auto_mute);
-static CARD32 dsp_audio_detection(TheatrePtr t, CARD8 option);
+//static CARD32 dsp_audio_detection(TheatrePtr t, CARD8 option);
static CARD32 dsp_configure_i2s_port(TheatrePtr t, CARD8 tx_mode, CARD8 rx_mode, CARD8 clk_mode);
static CARD32 dsp_configure_spdif_port(TheatrePtr t, CARD8 state);
@@ -375,12 +376,8 @@ static int dsp_load(TheatrePtr t, struct
CARD32 tries = 0;
CARD32 result = 0;
CARD32 seg_id = 0;
-
int screen = t->VIP->scrnIndex;
- ScrnInfoPtr pScrn = xf86Screens[t->VIP->scrnIndex];
- RADEONInfoPtr info = RADEONPTR(pScrn);
- unsigned char *RADEONMMIO = info->MMIO;
-
+
DEBUG("Microcode: before everything: %x\n", data8);
if (RT_fifor(0x000, &data8))
@@ -630,6 +627,7 @@ static CARD32 dsp_set_video_input_connec
return result;
}
+#if 0
static CARD32 dsp_reset(TheatrePtr t)
{
CARD32 fb_scratch0 = 0;
@@ -644,6 +642,7 @@ static CARD32 dsp_reset(TheatrePtr t)
return result;
}
+#endif
static CARD32 dsp_set_lowpowerstate(TheatrePtr t, CARD32 pstate)
{
@@ -704,6 +703,7 @@ static CARD32 dsp_video_standard_detecti
return result;
}
+#if 0
static CARD32 dsp_get_signallockstatus(TheatrePtr t)
{
CARD32 fb_scratch1 = 0;
@@ -737,6 +737,7 @@ static CARD32 dsp_get_signallinenumber(T
return result;
}
+#endif
static CARD32 dsp_set_brightness(TheatrePtr t, CARD8 brightness)
{
@@ -770,6 +771,7 @@ static CARD32 dsp_set_contrast(TheatrePt
return result;
}
+#if 0
static CARD32 dsp_set_sharpness(TheatrePtr t, int sharpness)
{
CARD32 fb_scratch1 = 0;
@@ -785,6 +787,7 @@ static CARD32 dsp_set_sharpness(TheatreP
return result;
}
+#endif
static CARD32 dsp_set_tint(TheatrePtr t, CARD8 tint)
{
@@ -884,6 +887,7 @@ static CARD32 dsp_set_audio_volume(Theat
return result;
}
+#if 0
static CARD32 dsp_audio_detection(TheatrePtr t, CARD8 option)
{
CARD32 fb_scratch1 = 0;
@@ -899,6 +903,7 @@ static CARD32 dsp_audio_detection(Theatr
return result;
}
+#endif
static CARD32 dsp_configure_i2s_port(TheatrePtr t, CARD8 tx_mode, CARD8 rx_mode, CARD8 clk_mode)
{
@@ -1452,6 +1457,7 @@ static void WriteRT_fld1 (TheatrePtr t,
} /* WriteRT_fld ()... */
+#if 0
/****************************************************************************
* ReadRT_fld (CARD32 dwReg) *
* Function: Reads a register field within Rage Theatre *
@@ -1475,8 +1481,10 @@ static CARD32 ReadRT_fld1 (TheatrePtr t,
} /* ReadRT_fld ()... */
-#define WriteRT_fld(a,b) WriteRT_fld1(t, (a), (b))
#define ReadRT_fld(a) ReadRT_fld1(t,(a))
+#endif
+
+#define WriteRT_fld(a,b) WriteRT_fld1(t, (a), (b))
/****************************************************************************
@@ -1792,10 +1800,10 @@ void RT_SetConnector (TheatrePtr t, CARD
t->wConnector = wConnector;
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n", data);
+ xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %lx\n", data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n", data);
+ xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %lx\n", data);
switch (wConnector)
{
@@ -1844,10 +1852,10 @@ void RT_SetConnector (TheatrePtr t, CARD
}
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n", data);
+ xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %lx\n", data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n", data);
+ xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %lx\n", data);
dsp_configure_i2s_port(t, 0, 0, 0);
@@ -2000,7 +2008,7 @@ void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register 0x%04x is equal to 0x%08x\n", i, data);
+ xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register 0x%04x is equal to 0x%08lx\n", i, data);
}
}
@@ -2200,21 +2208,18 @@ void DumpRageTheatreRegsByName(TheatrePt
{ "Y_FALL_CNTL ", 0x01cc },
{ "Y_RISE_CNTL ", 0x01d0 },
{ "Y_SAW_TOOTH_CNTL ", 0x01d4 },
- {NULL, NULL}
+ {NULL, 0}
};
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register (0x%04x) %s is equal to 0x%08x\n", rt_reg_list[i].addr, rt_reg_list[i].name, data);
+ xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "register (0x%04lx) %s is equal to 0x%08lx\n", rt_reg_list[i].addr, rt_reg_list[i].name, data);
}
}
void ResetTheatreRegsForNoTVout(TheatrePtr t)
{
- int i;
- CARD32 data;
-
RT_regw(VIP_CLKOUT_CNTL, 0x0);
RT_regw(VIP_HCOUNT, 0x0);
RT_regw(VIP_VCOUNT, 0x0);
@@ -2229,9 +2234,6 @@ void ResetTheatreRegsForNoTVout(TheatreP
void ResetTheatreRegsForTVout(TheatrePtr t)
{
- int i;
- CARD32 data;
-
/* RT_regw(VIP_HW_DEBUG, 0x200); */
/* RT_regw(VIP_INT_CNTL, 0x0);
RT_regw(VIP_GPIO_INOUT, 0x10090000);
@@ -2246,7 +2248,7 @@ void ResetTheatreRegsForTVout(TheatrePtr
RT_regw(VIP_VCOUNT, 0x151);
#endif
RT_regw(VIP_DFCOUNT, 0x01);
-/* RT_regw(VIP_CLOCK_SEL_CNTL, 0xb7); /* versus 0x237 <-> 0x2b7 */
+/* RT_regw(VIP_CLOCK_SEL_CNTL, 0xb7); versus 0x237 <-> 0x2b7 */
RT_regw(VIP_CLOCK_SEL_CNTL, 0x2b7); /* versus 0x237 <-> 0x2b7 */
RT_regw(VIP_VIN_PLL_CNTL, 0x60a6039);
/* RT_regw(VIP_PLL_CNTL1, 0xacacac74); */
diff --git a/src/theatre200.h b/src/theatre200.h
index 9af1808..9602a15 100644
--- a/src/theatre200.h
+++ b/src/theatre200.h
@@ -62,14 +62,14 @@
#define ERROR_3(str,param1,param2,param3) xf86DrvMsg(screen, X_ERROR, str, param1, param2, param3)
#define DEBUG_3(str,param1,param2,param3) xf86DrvMsg(screen, X_INFO, str, param1, param2, param3)
#else
-#define ERROR_0(str)
-#define DEBUG_0(str)
-#define ERROR(str,param1)
-#define DEBUG(str,param1)
-#define ERROR_2(str,param1,param2)
-#define DEBUG_2(str,param1,param2)
-#define ERROR_3(str,param1,param2,param3)
-#define DEBUG_3(str,param1,param2,param3)
+#define ERROR_0(str) (void)screen
+#define DEBUG_0(str) (void)screen
+#define ERROR(str,param1) (void)screen
+#define DEBUG(str,param1) (void)screen
+#define ERROR_2(str,param1,param2) (void)screen
+#define DEBUG_2(str,param1,param2) (void)screen
+#define ERROR_3(str,param1,param2,param3) (void)screen
+#define DEBUG_3(str,param1,param2,param3) (void)screen
#endif
diff --git a/src/theatre_detect.c b/src/theatre_detect.c
index 7d29984..4836db8 100644
--- a/src/theatre_detect.c
+++ b/src/theatre_detect.c
@@ -39,29 +39,29 @@
#include "config.h"
#endif
+#include <string.h>
#include "xf86.h"
#include "generic_bus.h"
#include "theatre.h"
#include "theatre_reg.h"
-#undef read
-#undef write
-#undef ioctl
-
static Bool theatre_read(TheatrePtr t,CARD32 reg, CARD32 *data)
{
if(t->theatre_num<0)return FALSE;
return t->VIP->read(t->VIP, ((t->theatre_num & 0x3)<<14) | reg,4, (CARD8 *) data);
}
+/* Unused code - reference */
+#if 0
static Bool theatre_write(TheatrePtr t,CARD32 reg, CARD32 data)
{
if(t->theatre_num<0)return FALSE;
return t->VIP->write(t->VIP,((t->theatre_num & 0x03)<<14) | reg,4, (CARD8 *) &data);
}
+#define RT_regw(reg,data) theatre_write(t,(reg),(data))
+#endif
#define RT_regr(reg,data) theatre_read(t,(reg),(data))
-#define RT_regw(reg,data) theatre_write(t,(reg),(data))
#define VIP_TYPE "ATI VIP BUS"
@@ -89,7 +89,7 @@ TheatrePtr DetectTheatre(GENERIC_BUS_Ptr
{
if(b->read(b, ((i & 0x03)<<14) | VIP_VIP_VENDOR_DEVICE_ID, 4, (CARD8 *)&val))
{
- if(val)xf86DrvMsg(b->scrnIndex, X_INFO, "Device %d on VIP bus ids as 0x%08x\n",i,val);
+ if(val)xf86DrvMsg(b->scrnIndex, X_INFO, "Device %ld on VIP bus ids as 0x%08lx\n",i,val);
if(t->theatre_num>=0)continue; /* already found one instance */
switch(val){
case RT100_ATI_ID:
@@ -102,10 +102,10 @@ TheatrePtr DetectTheatre(GENERIC_BUS_Ptr
break;
}
} else {
- xf86DrvMsg(b->scrnIndex, X_INFO, "No response from device %d on VIP bus\n",i);
+ xf86DrvMsg(b->scrnIndex, X_INFO, "No response from device %ld on VIP bus\n",i);
}
}
- if(t->theatre_num>=0)xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre as device %d on VIP bus with id 0x%08x\n",t->theatre_num,t->theatre_id);
+ if(t->theatre_num>=0)xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre as device %d on VIP bus with id 0x%08lx\n",t->theatre_num,t->theatre_id);
if(t->theatre_num < 0)
{
@@ -114,7 +114,7 @@ TheatrePtr DetectTheatre(GENERIC_BUS_Ptr
}
RT_regr(VIP_VIP_REVISION_ID, &val);
- xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8X\n", val);
+ xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8lX\n", val);
#if 0
DumpRageTheatreRegsByName(t);
More information about the xorg-commit
mailing list