From d47accabd1ff128981ac6cf1625e26b8d8572785 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 20 Mar 2008 22:09:12 -0300 Subject: [PATCH] Compile warning fixes. o Make sure all functions have a prototype defined in a header file, before definition, and all callers include this header. Only Atombios/hwserv_drv.c:AllocateMemory() did have a prototype not matching definition, and was fixed changing first argument from VOID * to DEVICE_DATA *. o Added an if !defined(__GNUC__) around the usage of pragma warning. o Changed type RADEONInfoRec's FB field from void * to unsigned char *, and VBIOS field from CARD8 * to unsigned char *. This fixes warnings about usage of void * in arithmetic. Also, compiled the driver in both cases, with pciaccess support enabled and disabled, as gcc will also not allow math involving void * and unsigned char *, and fixed the few cases where it did happen. o Added missing prototypes for atombios related functions (src/atombios_output.c and src/atombios_crtc.c) to radeon.h, so that no prototypes are declared in C files now, only in headers. o Changed some atombios functions to static as they are used only inside the defining file, or their pointers are set to structure fields. o _X_EXPORT'ed src/theatre200.c/DumpRageTheatreRegsByName() as it was missed in previous patch and would cause problems if compiled with hidden symbols. Actually, this code should be reviewed, as some of these symbols are also called from the X Server. Probably they should their pointers should be members of some data structure. This would be mandatory if theatre200_drv.so and theatre_drv.so would be both loaded. --- src/AtomBios/CD_Operations.c | 148 +++++++++++++++---------------- src/AtomBios/Decoder.c | 3 +- src/AtomBios/hwserv_drv.c | 23 ++---- src/AtomBios/includes/CD_Common_Types.h | 4 +- src/AtomBios/includes/CD_Definitions.h | 16 ++-- src/AtomBios/includes/CD_hw_services.h | 3 +- src/AtomBios/includes/Decoder.h | 7 ++- src/AtomBios/includes/atombios.h | 15 +++ src/ati.c | 2 +- src/radeon.h | 19 ++++- src/radeon_atombios.c | 6 +- src/radeon_crtc.c | 6 -- src/radeon_dri.c | 2 +- src/radeon_driver.c | 2 +- src/radeon_output.c | 6 -- src/radeon_textured_video.c | 2 +- src/radeon_textured_videofuncs.c | 2 +- src/theatre200.c | 4 +- 18 files changed, 141 insertions(+), 129 deletions(-) diff --git a/src/AtomBios/CD_Operations.c b/src/AtomBios/CD_Operations.c index 1e48f81..dc0b46f 100644 --- a/src/AtomBios/CD_Operations.c +++ b/src/AtomBios/CD_Operations.c @@ -38,35 +38,33 @@ Revision History: #include "Decoder.h" #include "atombios.h" +#include "CD_Definitions.h" -VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData); -UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData); - -UINT16* GetDataMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData); -UINT8 GetTrueIndexInMasterTable(PARSER_TEMP_DATA STACK_BASED * pParserTempData, UINT8 IndexInMasterTable); +static UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData); +static UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData); WRITE_IO_FUNCTION WritePCIFunctions[8] = { @@ -211,7 +209,7 @@ VOID IndirectIOCommand_CLEAR(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { // if ((pParserTempData->IndirectData & 0x7f)==INDIRECT_IO_MM) pParserTempData->IndirectData|=pParserTempData->CurrentPortID; // pParserTempData->IndirectIOTablePointer=pParserTempData->IndirectIOTable; @@ -236,7 +234,7 @@ UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData) -VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.WordXX.PA_Destination; pParserTempData->Index+=pParserTempData->CurrentRegBlock; @@ -261,13 +259,13 @@ VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } } -VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { *(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->pCmd->Parameters.ByteXX.PA_Destination)= pParserTempData->DestData32; } -VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { if (pParserTempData->pCmd->Parameters.ByteXX.PA_Destination < WS_QUOTIENT_C) *(pParserTempData->pWorkingTableData->pWorkSpace+pParserTempData->pCmd->Parameters.ByteXX.PA_Destination) = pParserTempData->DestData32; @@ -300,7 +298,7 @@ VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination; //Make an Index from address first, then add to the Index @@ -308,31 +306,31 @@ VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) WriteFrameBuffer32(pParserTempData); } -VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination; WritePLL32( pParserTempData ); } -VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination; WriteMC32( pParserTempData ); } -VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); } -VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->pWorkingTableData->IP+=sizeof(UINT16); } -UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT16); @@ -354,14 +352,14 @@ UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } } -UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); return *(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->Index); } -UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); @@ -389,7 +387,7 @@ UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); @@ -397,14 +395,14 @@ UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) return ReadFrameBuffer32(pParserTempData); } -UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); return ReadPLL32( pParserTempData ); } -UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); @@ -412,14 +410,14 @@ UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT16); return *(UINT32*)(RELATIVE_TO_BIOS_IMAGE(pParserTempData->Index)+pParserTempData->CurrentDataBlock); } -UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->CD_Mask.SrcAlignment=alignmentByte0; pParserTempData->Index=*(UINT8*)pParserTempData->pWorkingTableData->IP; @@ -427,7 +425,7 @@ UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData) return pParserTempData->Index; } -UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->CD_Mask.SrcAlignment=alignmentLowerWord; pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP; @@ -435,7 +433,7 @@ UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) return pParserTempData->Index; } -UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->CD_Mask.SrcAlignment=alignmentDword; pParserTempData->Index=*(UINT32*)pParserTempData->pWorkingTableData->IP; @@ -444,20 +442,20 @@ UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { return GetParametersDirectArray[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData); } -VOID CommonSourceDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID CommonSourceDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]; pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment]; pParserTempData->SourceData32 <<= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment]; } -VOID CommonOperationDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID CommonOperationDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]; pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment]; @@ -465,7 +463,7 @@ VOID CommonOperationDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTem pParserTempData->DestData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment]; } -VOID ProcessMove(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessMove(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { if (pParserTempData->CD_Mask.SrcAlignment!=alignmentDword) { @@ -488,7 +486,7 @@ VOID ProcessMove(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessMask(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessMask(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); @@ -503,7 +501,7 @@ VOID ProcessMask(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessAnd(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessAnd(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -514,7 +512,7 @@ VOID ProcessAnd(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessOr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessOr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -523,7 +521,7 @@ VOID ProcessOr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessXor(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessXor(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -532,7 +530,7 @@ VOID ProcessXor(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessShl(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessShl(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -541,7 +539,7 @@ VOID ProcessShl(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessShr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessShr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -551,7 +549,7 @@ VOID ProcessShr(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessADD(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessADD(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -560,7 +558,7 @@ VOID ProcessADD(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessSUB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessSUB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -569,7 +567,7 @@ VOID ProcessSUB(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessMUL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessMUL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -577,7 +575,7 @@ VOID ProcessMUL(PARSER_TEMP_DATA STACK_BASED * pParserTempData) pParserTempData->MultiplicationOrDivision.Multiplication.Low32Bit=pParserTempData->DestData32 * pParserTempData->SourceData32; } -VOID ProcessDIV(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessDIV(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -590,7 +588,7 @@ VOID ProcessDIV(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessCompare(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessCompare(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -606,7 +604,7 @@ VOID ProcessCompare(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessClear(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessClear(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->DestData32 &= ~(AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]); @@ -614,7 +612,7 @@ VOID ProcessClear(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessShift(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessShift(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { UINT32 mask = AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]; pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); @@ -637,7 +635,7 @@ VOID ProcessShift(PARSER_TEMP_DATA STACK_BASED * pParserTempData) PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData); } -VOID ProcessTest(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessTest(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData); pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); @@ -647,7 +645,7 @@ VOID ProcessTest(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessSetFB_Base(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessSetFB_Base(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]; @@ -655,7 +653,7 @@ VOID ProcessSetFB_Base(PARSER_TEMP_DATA STACK_BASED * pParserTempData) pParserTempData->CurrentFB_Window=pParserTempData->SourceData32; } -VOID ProcessSwitch(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ +static VOID ProcessSwitch(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData); pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]; pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment]; @@ -677,7 +675,7 @@ VOID ProcessSwitch(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ } -VOID cmdSetDataBlock(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID cmdSetDataBlock(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { UINT8 value; UINT16* pMasterDataTable; @@ -696,14 +694,14 @@ VOID cmdSetDataBlock(PARSER_TEMP_DATA STACK_BASED * pParserTempData) pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE); } -VOID cmdSet_ATI_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID cmdSet_ATI_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->Multipurpose.CurrentPort=ATI_RegsPort; pParserTempData->CurrentPortID = (UINT8)((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination; pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16); } -VOID cmdSet_Reg_Block(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID cmdSet_Reg_Block(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->CurrentRegBlock = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination; pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16); @@ -711,26 +709,26 @@ VOID cmdSet_Reg_Block(PARSER_TEMP_DATA STACK_BASED * pParserTempData) //Atavism!!! Review!!! -VOID cmdSet_X_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ +static VOID cmdSet_X_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ pParserTempData->Multipurpose.CurrentPort=pParserTempData->ParametersType.Destination; pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_ONLY); } -VOID cmdDelay_Millisec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ +static VOID cmdDelay_Millisec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ pParserTempData->SourceData32 = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination; DelayMilliseconds(pParserTempData); pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE); } -VOID cmdDelay_Microsec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ +static VOID cmdDelay_Microsec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ pParserTempData->SourceData32 = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination; DelayMicroseconds(pParserTempData); pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE); } -VOID ProcessPostChar(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessPostChar(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->SourceData32 = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination; @@ -738,7 +736,7 @@ VOID ProcessPostChar(PARSER_TEMP_DATA STACK_BASED * pParserTempData) pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE); } -VOID ProcessDebug(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessDebug(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->SourceData32 = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination; @@ -747,13 +745,13 @@ VOID ProcessDebug(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessDS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessDS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->pWorkingTableData->IP+=((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination+sizeof(COMMAND_TYPE_OPCODE_OFFSET16); } -VOID cmdCall_Table(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ +static VOID cmdCall_Table(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ UINT16* MasterTableOffset; pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE); MasterTableOffset = GetCommandMasterTablePointer(pParserTempData->pDeviceData); @@ -770,7 +768,7 @@ VOID cmdCall_Table(PARSER_TEMP_DATA STACK_BASED * pParserTempData){ } -VOID cmdNOP_(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID cmdNOP_(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { } @@ -781,7 +779,7 @@ static VOID NotImplemented(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } -VOID ProcessJump(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessJump(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { if ((pParserTempData->ParametersType.Destination == NoCondition) || (pParserTempData->ParametersType.Destination == pParserTempData->CompareFlags )) @@ -794,7 +792,7 @@ VOID ProcessJump(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } } -VOID ProcessJumpE(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessJumpE(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { if ((pParserTempData->CompareFlags == Equal) || (pParserTempData->CompareFlags == pParserTempData->ParametersType.Destination)) @@ -807,7 +805,7 @@ VOID ProcessJumpE(PARSER_TEMP_DATA STACK_BASED * pParserTempData) } } -VOID ProcessJumpNE(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static VOID ProcessJumpNE(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { if (pParserTempData->CompareFlags != Equal) { diff --git a/src/AtomBios/Decoder.c b/src/AtomBios/Decoder.c index cdaa9ef..a8b9b4d 100644 --- a/src/AtomBios/Decoder.c +++ b/src/AtomBios/Decoder.c @@ -39,6 +39,7 @@ Revision History: #include "atombios.h" #include "CD_binding.h" #include "CD_Common_Types.h" +#include "CD_Definitions.h" #ifndef DISABLE_EASF #include "easf.h" @@ -50,7 +51,7 @@ Revision History: extern COMMANDS_PROPERTIES CallTable[]; -UINT8 ProcessCommandProperties(PARSER_TEMP_DATA STACK_BASED * pParserTempData) +static UINT8 ProcessCommandProperties(PARSER_TEMP_DATA STACK_BASED *pParserTempData) { UINT8 opcode=((COMMAND_HEADER*)pParserTempData->pWorkingTableData->IP)->Opcode; pParserTempData->pWorkingTableData->IP+=CallTable[opcode].headersize; diff --git a/src/AtomBios/hwserv_drv.c b/src/AtomBios/hwserv_drv.c index a5f5a5b..b0f8b2b 100644 --- a/src/AtomBios/hwserv_drv.c +++ b/src/AtomBios/hwserv_drv.c @@ -36,6 +36,8 @@ Revision History: --*/ #include "CD_binding.h" #include "CD_hw_services.h" +#include "CD_Definitions.h" +#include "atombios.h" //trace settings #if DEBUG_OUTPUT_DEVICE & 1 @@ -55,21 +57,6 @@ Revision History: #define MEM_TRACE //MEM access trace switch, undefine it to turn off #endif -UINT32 CailReadATIRegister(VOID*,UINT32); -VOID CailWriteATIRegister(VOID*,UINT32,UINT32); -VOID* CailAllocateMemory(VOID*,UINT16); -VOID CailReleaseMemory(VOID *,VOID *); -VOID CailDelayMicroSeconds(VOID *,UINT32 ); -VOID CailReadPCIConfigData(VOID*,VOID*,UINT32,UINT16); -VOID CailWritePCIConfigData(VOID*,VOID*,UINT32,UINT16); -UINT32 CailReadFBData(VOID*,UINT32); -VOID CailWriteFBData(VOID*,UINT32,UINT32); -ULONG CailReadPLL(VOID *Context ,ULONG Address); -VOID CailWritePLL(VOID *Context,ULONG Address,ULONG Data); -ULONG CailReadMC(VOID *Context ,ULONG Address); -VOID CailWriteMC(VOID *Context ,ULONG Address,ULONG Data); - - #if DEBUG_PARSER>0 VOID CailVideoDebugPrint(VOID*,ULONG_PTR, UINT16); #endif @@ -262,16 +249,18 @@ VOID WriteIndReg32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) // ATI Registers IO Mapped Access #if ( defined ENABLE_PARSER_REGISTERS_IO_ACCESS || defined ENABLE_ALL_SERVICE_FUNCTIONS ) -UINT32 ReadRegIO (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) +#if 0 +static UINT32 ReadRegIO (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) { //return CailReadATIRegister(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index); return 0; } -VOID WriteRegIO(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) +static VOID WriteRegIO(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) { // return CailWriteATIRegister(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index,pWorkingTableData->DestData32 ); } #endif +#endif // access to Frame buffer, dummy function, need more information to implement it UINT32 ReadFrameBuffer32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData) diff --git a/src/AtomBios/includes/CD_Common_Types.h b/src/AtomBios/includes/CD_Common_Types.h index 44a0b35..996f5ff 100644 --- a/src/AtomBios/includes/CD_Common_Types.h +++ b/src/AtomBios/includes/CD_Common_Types.h @@ -72,7 +72,7 @@ Revision History: typedef unsigned int uintn_t; #endif #endif -#ifndef FGL_LINUX +#if !defined(FGL_LINUX) && !defined(__GNUC__) #pragma warning ( disable : 4142 ) #endif @@ -146,7 +146,7 @@ typedef unsigned long ULONG_PTR; //typedef UINTN CD_STATUS; -#ifndef FGL_LINUX +#if !defined(FGL_LINUX) && !defined(__GNUC__) #pragma warning ( default : 4142 ) #endif #endif // _COMMON_TYPES_H_ diff --git a/src/AtomBios/includes/CD_Definitions.h b/src/AtomBios/includes/CD_Definitions.h index 98fd495..9b5b3fc 100644 --- a/src/AtomBios/includes/CD_Definitions.h +++ b/src/AtomBios/includes/CD_Definitions.h @@ -38,12 +38,14 @@ NEG:27.08.2002 Initiated. #include "CD_Structs.h" #ifndef _CD_DEFINITIONS_H #define _CD_DEFINITIONS_H_ -#ifdef DRIVER_PARSER -VOID *AllocateMemory(VOID *, UINT16); + +/* Decoder.c */ +extern UINT16* GetCommandMasterTablePointer(DEVICE_DATA* pDeviceData); +extern UINT16* GetDataMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData); +extern CD_STATUS ParseTable(DEVICE_DATA* pDeviceData, UINT8 IndexInMasterTable); + +/* hwserv_drv.c */ +VOID *AllocateMemory(DEVICE_DATA *, UINT16); VOID ReleaseMemory(DEVICE_DATA * , WORKING_TABLE_DATA* ); -#endif -CD_STATUS ParseTable(DEVICE_DATA* pDeviceData, UINT8 IndexInMasterTable); -//CD_STATUS CD_MainLoop(PARSER_TEMP_DATA_POINTER pParserTempData); -CD_STATUS Main_Loop(DEVICE_DATA* pDeviceData,UINT16 *MasterTableOffset,UINT8 IndexInMasterTable); -UINT16* GetCommandMasterTablePointer(DEVICE_DATA* pDeviceData); + #endif //CD_DEFINITIONS diff --git a/src/AtomBios/includes/CD_hw_services.h b/src/AtomBios/includes/CD_hw_services.h index 529fde5..ba3162f 100644 --- a/src/AtomBios/includes/CD_hw_services.h +++ b/src/AtomBios/includes/CD_hw_services.h @@ -314,5 +314,4 @@ UINT16 CD_checkstack(UINT16 size); #define CD_FILLSTACK(stacksize) #endif - -#endif +#endif /* _HW_SERVICES_INTERFACE_ */ diff --git a/src/AtomBios/includes/Decoder.h b/src/AtomBios/includes/Decoder.h index 24c25fc..1808b9c 100644 --- a/src/AtomBios/includes/Decoder.h +++ b/src/AtomBios/includes/Decoder.h @@ -80,7 +80,12 @@ NEG:27.08.2002 Initiated. +sizeof(((CASE_OFFSET*)pParserTempData->pWorkingTableData->IP)->CaseSignature));\ } -#endif +/* Decoder.c */ +extern UINT16* GetCommandMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData); +extern UINT8 GetTrueIndexInMasterTable(PARSER_TEMP_DATA STACK_BASED * pParserTempData, UINT8 IndexInMasterTable); + +#endif /* _DECODER_H_ */ + /* pWorkingTableData->pCmd->Header.Attribute.SourceAlignment=alignmentLowerWord;\*/ // EOF diff --git a/src/AtomBios/includes/atombios.h b/src/AtomBios/includes/atombios.h index 16fcf2d..54db600 100644 --- a/src/AtomBios/includes/atombios.h +++ b/src/AtomBios/includes/atombios.h @@ -4433,4 +4433,19 @@ typedef struct _ATOM_POWERPLAY_INFO_V3 #pragma pack() // BIOS data must use byte aligment +/* radeon_atombios.h */ +extern VOID* CailAllocateMemory(VOID*,UINT16); +extern VOID CailDelayMicroSeconds(VOID *,UINT32 ); +extern UINT32 CailReadATIRegister(VOID*,UINT32); +extern UINT32 CailReadFBData(VOID*,UINT32); +extern ULONG CailReadMC(VOID *Context ,ULONG Address); +extern VOID CailReadPCIConfigData(VOID*,VOID*,UINT32,UINT16); +extern ULONG CailReadPLL(VOID *Context ,ULONG Address); +extern VOID CailReleaseMemory(VOID *,VOID *); +extern VOID CailWriteATIRegister(VOID*,UINT32,UINT32); +extern VOID CailWriteFBData(VOID*,UINT32,UINT32); +extern VOID CailWriteMC(VOID *Context ,ULONG Address,ULONG Data); +extern VOID CailWritePCIConfigData(VOID*,VOID*,UINT32,UINT16); +extern VOID CailWritePLL(VOID *Context,ULONG Address,ULONG Data); + #endif /* _ATOMBIOS_H */ diff --git a/src/ati.c b/src/ati.c index 85da389..0b5466d 100644 --- a/src/ati.c +++ b/src/ati.c @@ -143,7 +143,7 @@ ati_device_get_from_busid(int bus, int dev, int func) } static pciVideoPtr -ati_device_get_primary() +ati_device_get_primary(void) { pciVideoPtr pVideo = NULL; pciVideoPtr *xf86PciVideoInfo; diff --git a/src/radeon.h b/src/radeon.h index f3db451..5ef007d 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -381,8 +381,8 @@ typedef struct { CARD32 gartLocation; void *MMIO; /* Map of MMIO region */ - void *FB; /* Map of frame buffer */ - CARD8 *VBIOS; /* Video BIOS pointer */ + unsigned char *FB; /* Map of frame buffer */ + unsigned char *VBIOS; /* Video BIOS pointer */ Bool IsAtomBios; /* New BIOS used in R420 etc. */ int ROMHeaderStart; /* Start of the ROM Info Table */ @@ -766,6 +766,21 @@ do { \ info->fifo_slots -= entries; \ } while (0) +/* atombios_output.c */ +extern int atombios_external_tmds_setup(xf86OutputPtr output, + DisplayModePtr mode); +extern void atombios_output_dpms(xf86OutputPtr output, int mode); +extern void atombios_output_mode_set(xf86OutputPtr output, + DisplayModePtr mode, + DisplayModePtr adjusted_mode); +extern RADEONMonitorType atombios_dac_detect(ScrnInfoPtr pScrn, + xf86OutputPtr output); +/* atombios_crtc.c */ +extern void atombios_crtc_dpms(xf86CrtcPtr crtc, int mode); +extern void atombios_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, + DisplayModePtr adjusted_mode, int x, int y); +extern void atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode); + /* legacy_crtc.c */ extern void legacy_crtc_dpms(xf86CrtcPtr crtc, int mode); extern void legacy_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 85a2e71..e05c690 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -273,7 +273,7 @@ rhdAtomAnalyzeRomDataTable(unsigned char *base, int offset, return TRUE; } -Bool +static Bool rhdAtomGetTableRevisionAndSize(ATOM_COMMON_TABLE_HEADER *hdr, CARD8 *contentRev, CARD8 *formatRev, @@ -517,7 +517,8 @@ rhdAtomASICInit(atomBiosHandlePtr handle) return FALSE; } -Bool +#if 0 +static Bool rhdAtomSetScaler(atomBiosHandlePtr handle, unsigned char scalerID, int setting) { ENABLE_SCALER_PARAMETERS scaler; @@ -537,6 +538,7 @@ rhdAtomSetScaler(atomBiosHandlePtr handle, unsigned char scalerID, int setting) xf86DrvMsg(handle->scrnIndex, X_INFO, "EableScaler Failed\n"); return FALSE; } +#endif # endif diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index e2d31eb..4826ca0 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -53,12 +53,6 @@ #include "sarea.h" #endif -extern void atombios_crtc_mode_set(xf86CrtcPtr crtc, - DisplayModePtr mode, - DisplayModePtr adjusted_mode, - int x, int y); -extern void atombios_crtc_dpms(xf86CrtcPtr crtc, int mode); - static void radeon_crtc_dpms(xf86CrtcPtr crtc, int mode) { diff --git a/src/radeon_dri.c b/src/radeon_dri.c index ac8d03c..a0a83ed 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -1444,7 +1444,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) RADEON_VERSION_MAJOR_TILED : RADEON_VERSION_MAJOR; pDRIInfo->ddxDriverMinorVersion = RADEON_VERSION_MINOR; pDRIInfo->ddxDriverPatchVersion = RADEON_VERSION_PATCH; - pDRIInfo->frameBufferPhysicalAddress = (void *)info->LinearAddr + info->frontOffset; + pDRIInfo->frameBufferPhysicalAddress = (void *)(info->LinearAddr + info->frontOffset); pDRIInfo->frameBufferSize = info->FbMapSize - info->FbSecureSize; pDRIInfo->frameBufferStride = (pScrn->displayWidth * info->CurrentLayout.pixel_bytes); diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 3d33d47..1ba90e2 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -436,7 +436,7 @@ static Bool RADEONMapFB(ScrnInfoPtr pScrn) info->FbMapSize, PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE, - &info->FB); + (void **)&info->FB); if (err) { xf86DrvMsg (pScrn->scrnIndex, X_ERROR, diff --git a/src/radeon_output.c b/src/radeon_output.c index 19ce36d..1559b52 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -175,12 +175,6 @@ static void RADEONGetTMDSInfoFromTable(xf86OutputPtr output); #define AVIVO_I2C_ENABLE 1 static Bool AVIVOI2CDoLock(xf86OutputPtr output, int lock_state); -extern void atombios_output_mode_set(xf86OutputPtr output, - DisplayModePtr mode, - DisplayModePtr adjusted_mode); -extern void atombios_output_dpms(xf86OutputPtr output, int mode); -extern RADEONMonitorType atombios_dac_detect(ScrnInfoPtr pScrn, xf86OutputPtr output); -extern int atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode); static void radeon_bios_output_dpms(xf86OutputPtr output, int mode); static void diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 0a6598d..60d0e68 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -63,7 +63,7 @@ RADEONTilingEnabled(ScrnInfoPtr pScrn, PixmapPtr pPix) } else #endif { - if (info->tilingEnabled && ((pPix->devPrivate.ptr - info->FB) == 0)) + if (info->tilingEnabled && (((unsigned char *)pPix->devPrivate.ptr - info->FB) == 0)) return TRUE; else return FALSE; diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index d4a3343..5ffb2fd 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -93,7 +93,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv } else #endif { - dst_offset = (pPixmap->devPrivate.ptr - info->FB) + + dst_offset = ((unsigned char *)pPixmap->devPrivate.ptr - info->FB) + info->fbLocation + pScrn->fbOffset; dst_pitch = pPixmap->devKind; } diff --git a/src/theatre200.c b/src/theatre200.c index 0341c6e..c8f6d59 100644 --- a/src/theatre200.c +++ b/src/theatre200.c @@ -63,8 +63,6 @@ #undef write #undef ioctl -void DumpRageTheatreRegsByName(TheatrePtr t); - static int DownloadMicrocode(TheatrePtr t); static int microc_load (char* micro_path, char* micro_type, struct rt200_microc_data* microc_datap, int screen); static void microc_clean(struct rt200_microc_data* microc_datap, int screen); @@ -2017,7 +2015,7 @@ _X_EXPORT void DumpRageTheatreRegs(TheatrePtr t) } -void DumpRageTheatreRegsByName(TheatrePtr t) +_X_EXPORT void DumpRageTheatreRegsByName(TheatrePtr t) { int i; CARD32 data; -- 1.5.3.2