diff options
Diffstat (limited to 'src/radeon_atombios.c')
-rw-r--r-- | src/radeon_atombios.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 20aa722c..be0849d5 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -501,11 +501,11 @@ rhdAtomASICInit(atomBiosHandlePtr handle) RHDAtomBiosFunc(handle->scrnIndex, handle, GET_DEFAULT_ENGINE_CLOCK, &data); - asicInit.sASICInitClocks.ulDefaultEngineClock = data.val / 10;/*in 10 Khz*/ + asicInit.sASICInitClocks.ulDefaultEngineClock = cpu_to_le32(data.val / 10);/*in 10 Khz*/ RHDAtomBiosFunc(handle->scrnIndex, handle, GET_DEFAULT_MEMORY_CLOCK, &data); - asicInit.sASICInitClocks.ulDefaultMemoryClock = data.val / 10;/*in 10 Khz*/ + asicInit.sASICInitClocks.ulDefaultMemoryClock = cpu_to_le32(data.val / 10);/*in 10 Khz*/ data.exec.dataSpace = NULL; data.exec.index = 0x0; data.exec.pspace = &asicInit; @@ -2027,9 +2027,12 @@ RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle, VOID* CailAllocateMemory(VOID *CAIL,UINT16 size) { + void *ret; CAILFUNC(CAIL); - return malloc(size); + ret = malloc(size); + memset(ret, 0, size); + return ret; } VOID @@ -2256,4 +2259,15 @@ atombios_get_command_table_version(atomBiosHandlePtr atomBIOS, int index, int *m } +UINT16 ATOM_BSWAP16(UINT16 x) +{ + return bswap_16(x); +} + +UINT32 ATOM_BSWAP32(UINT32 x) +{ + return bswap_32(x); +} + + #endif /* ATOM_BIOS */ |