hrev47258 adds 1 changeset to branch 'master' old head: bc73719d2f309f5ba23b97680299c3eb1d9b2d35 new head: 38ec158d2a398e39be6257007bbeb82683c0fc90 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=38ec158+%5Ebc73719 ---------------------------------------------------------------------------- 38ec158: radeon_hd: Cleanup atombios parser types * pptable.h now 100% stock * atombios.h now 99% stock * Resolves issues with radeon_hd on x86_64 by making atombios structs match OS typedefs * Resolves #10614 [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev47258 Commit: 38ec158d2a398e39be6257007bbeb82683c0fc90 URL: http://cgit.haiku-os.org/haiku/commit/?id=38ec158 Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> Date: Sun May 25 01:19:17 2014 UTC Ticket: https://dev.haiku-os.org/ticket/10614 ---------------------------------------------------------------------------- 3 files changed, 45 insertions(+), 20 deletions(-) .../radeon_hd/atombios/atombios-types.h | 28 +++++++++++++++++ .../accelerants/radeon_hd/atombios/atombios.h | 32 +++++++++++--------- .../accelerants/radeon_hd/atombios/pptable.h | 5 --- ---------------------------------------------------------------------------- diff --git a/src/add-ons/accelerants/radeon_hd/atombios/atombios-types.h b/src/add-ons/accelerants/radeon_hd/atombios/atombios-types.h new file mode 100644 index 0000000..cea6ff2 --- /dev/null +++ b/src/add-ons/accelerants/radeon_hd/atombios/atombios-types.h @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2014, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Alexander von Gluck, kallisti5@xxxxxxxxxxx + */ +#ifndef _ATOMBIOS_TYPES_H +#define _ATOMBIOS_TYPES_H + + +#include <SupportDefs.h> + + +#if defined(__POWERPC__) +#define ATOM_BIG_ENDIAN 1 +#else +#define ATOM_BIG_ENDIAN 0 +#endif + + +// Align types to Haiku's types +typedef uint16 USHORT; +typedef uint32 ULONG; +typedef uint8 UCHAR; + + +#endif /* _ATOMBIOS_TYPES_H */ diff --git a/src/add-ons/accelerants/radeon_hd/atombios/atombios.h b/src/add-ons/accelerants/radeon_hd/atombios/atombios.h index 19bf54f..dedc25d 100644 --- a/src/add-ons/accelerants/radeon_hd/atombios/atombios.h +++ b/src/add-ons/accelerants/radeon_hd/atombios/atombios.h @@ -29,33 +29,35 @@ #ifndef _ATOMBIOS_H #define _ATOMBIOS_H +// Types for Haiku +#include "atombios-types.h" + #define ATOM_VERSION_MAJOR 0x00020000 #define ATOM_VERSION_MINOR 0x00000002 #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR) -#if defined(__POWERPC__) -#define ATOM_BIG_ENDIAN 1 -#else -#define ATOM_BIG_ENDIAN 0 -#endif - +/* Endianness should be specified before inclusion, + * default to little endian + */ #ifndef ATOM_BIG_ENDIAN #error Endian not specified #endif -#ifndef ULONG -typedef unsigned long ULONG; -#endif +#ifdef _H2INC + #ifndef ULONG + typedef unsigned long ULONG; + #endif -#ifndef UCHAR -typedef unsigned char UCHAR; -#endif + #ifndef UCHAR + typedef unsigned char UCHAR; + #endif -#ifndef USHORT -typedef unsigned short USHORT; + #ifndef USHORT + typedef unsigned short USHORT; + #endif #endif - + #define ATOM_DAC_A 0 #define ATOM_DAC_B 1 #define ATOM_EXT_DAC 2 diff --git a/src/add-ons/accelerants/radeon_hd/atombios/pptable.h b/src/add-ons/accelerants/radeon_hd/atombios/pptable.h index cb0ab0b..2d53299 100644 --- a/src/add-ons/accelerants/radeon_hd/atombios/pptable.h +++ b/src/add-ons/accelerants/radeon_hd/atombios/pptable.h @@ -23,8 +23,6 @@ #ifndef _PPTABLE_H #define _PPTABLE_H -// Haiku GCC2 fix -//#pragma pack(push, 1) #pragma pack(1) typedef struct _ATOM_PPLIB_THERMALCONTROLLER @@ -679,9 +677,6 @@ typedef struct _ATOM_PPLIB_PPM_Table ULONG ulTjmax; } ATOM_PPLIB_PPM_Table; -// Haiku GCC2 fix -//#pragma pack(pop) #pragma pack() - #endif