From ab451e4b7a5423d61b57cf0646599267d8504af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 3 Jan 2008 17:52:39 +0100 Subject: radeon: Miscellaneous warning fixes. --- src/AtomBios/Decoder.c | 2 +- src/Makefile.am | 2 +- src/atombios_output.c | 4 ++++ src/radeon_atombios.c | 9 +++++---- src/radeon_atombios.h | 2 +- src/radeon_output.c | 9 +++++++-- 6 files changed, 19 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/AtomBios/Decoder.c b/src/AtomBios/Decoder.c index 95908d5f..cdaa9ef4 100644 --- a/src/AtomBios/Decoder.c +++ b/src/AtomBios/Decoder.c @@ -46,7 +46,7 @@ Revision History: -#define INDIRECT_IO_TABLE (((UINT16)&((ATOM_MASTER_LIST_OF_DATA_TABLES*)0)->IndirectIOAccess)/sizeof(TABLE_UNIT_TYPE) ) +#define INDIRECT_IO_TABLE (((UINT16)(ULONG_PTR)&((ATOM_MASTER_LIST_OF_DATA_TABLES*)0)->IndirectIOAccess)/sizeof(TABLE_UNIT_TYPE) ) extern COMMANDS_PROPERTIES CallTable[]; diff --git a/src/Makefile.am b/src/Makefile.am index 7b25e4b1..5e95dd7c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -77,7 +77,7 @@ ATIMISC_EXA_SOURCES = atimach64exa.c RADEON_EXA_SOURCES = radeon_exa.c endif -AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER +AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DFGL_LINUX -DDRIVER_PARSER INCLUDES = -I$(srcdir)/AtomBios/includes ati_drv_la_LTLIBRARIES = ati_drv.la diff --git a/src/atombios_output.c b/src/atombios_output.c index 8098185c..5ec30987 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -316,6 +316,8 @@ atombios_output_lvds_setup(xf86OutputPtr output, DisplayModePtr mode) return ATOM_NOT_IMPLEMENTED; } +#if 0 + static int atombios_output_scaler_setup(xf86OutputPtr output, DisplayModePtr mode) { @@ -354,6 +356,8 @@ atombios_output_scaler_setup(xf86OutputPtr output, DisplayModePtr mode) } +#endif + static AtomBiosResult atombios_display_device_control(atomBiosHandlePtr atomBIOS, int device, Bool state) { diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index b352a566..7cf05567 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -36,9 +36,6 @@ #include "radeon_macros.h" #include "xorg-server.h" -#if XSERVER_LIBPCIACCESS -#warning pciaccess defined -#endif /* only for testing now */ #include "xf86DDC.h" @@ -190,6 +187,8 @@ enum { # define LOG_CAIL LOG_DEBUG + 1 +#if 0 + static void RHDDebug(int scrnIndex, const char *format, ...) { @@ -210,6 +209,8 @@ RHDDebugCont(const char *format, ...) va_end(ap); } +#endif + static void CailDebug(int scrnIndex, const char *format, ...) { @@ -1644,7 +1645,7 @@ RADEONGetATOMTVInfo(xf86OutputPtr output) } Bool -RADEONATOMGetTVTimings(ScrnInfoPtr pScrn, int index, SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION *crtc_timing, uint32_t *pixel_clock) +RADEONATOMGetTVTimings(ScrnInfoPtr pScrn, int index, SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION *crtc_timing, int32_t *pixel_clock) { RADEONInfoPtr info = RADEONPTR(pScrn); ATOM_ANALOG_TV_INFO *tv_info; diff --git a/src/radeon_atombios.h b/src/radeon_atombios.h index 4b15ec1c..9cb279e6 100644 --- a/src/radeon_atombios.h +++ b/src/radeon_atombios.h @@ -248,6 +248,6 @@ typedef struct _atomBiosHandle { # endif extern Bool -RADEONATOMGetTVTimings(ScrnInfoPtr pScrn, int index, SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION *crtc_timing, uint32_t *pixel_clock); +RADEONATOMGetTVTimings(ScrnInfoPtr pScrn, int index, SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION *crtc_timing, int32_t *pixel_clock); #endif /* RHD_ATOMBIOS_H_ */ diff --git a/src/radeon_output.c b/src/radeon_output.c index ec4f3dc5..c1a0ba8d 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -2254,23 +2254,28 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) optstr = (char *)xf86GetOptValString(info->Options, OPTION_CONNECTORTABLE); if (optstr) { + unsigned int ddc_line[2]; + for (i = 2; i < RADEON_MAX_BIOS_CONNECTOR; i++) { info->BiosConnector[i].valid = FALSE; } info->BiosConnector[0].valid = TRUE; info->BiosConnector[1].valid = TRUE; if (sscanf(optstr, "%u,%d,%d,%u,%u,%d,%d,%u", - (unsigned int *)&info->BiosConnector[0].ddc_line, + &ddc_line[0], &info->BiosConnector[0].DACType, &info->BiosConnector[0].TMDSType, &info->BiosConnector[0].ConnectorType, - (unsigned int *)&info->BiosConnector[1].ddc_line, + &ddc_line[1], &info->BiosConnector[1].DACType, &info->BiosConnector[1].TMDSType, &info->BiosConnector[1].ConnectorType) != 8) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid ConnectorTable option: %s\n", optstr); return FALSE; } + + info->BiosConnector[0].ddc_line = ddc_line[0]; + info->BiosConnector[1].ddc_line = ddc_line[1]; } info->tvdac_use_count = 0; -- cgit v1.2.3