1 /* 2 * Copyright 2006-2008, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Axel Dörfler, axeld@pinc-software.de 7 */ 8 #ifndef RADEON_HD_ACCELERANT_H 9 #define RADEON_HD_ACCELERANT_H 10 11 12 #include "radeon_hd.h" 13 14 15 #include <edid.h> 16 17 18 struct accelerant_info { 19 vuint8 *regs; 20 area_id regs_area; 21 22 radeon_shared_info *shared_info; 23 area_id shared_info_area; 24 25 display_mode *mode_list; // cloned list of standard display modes 26 area_id mode_list_area; 27 28 edid1_info edid_info; 29 bool has_edid; 30 31 int device; 32 bool is_clone; 33 34 // LVDS panel mode passed from the bios/startup. 35 display_mode lvds_panel_mode; 36 }; 37 38 #define HEAD_MODE_A_ANALOG 0x01 39 #define HEAD_MODE_B_DIGITAL 0x02 40 #define HEAD_MODE_CLONE 0x03 41 #define HEAD_MODE_LVDS_PANEL 0x08 42 43 extern accelerant_info *gInfo; 44 45 // register access 46 47 inline uint32 48 read32(uint32 offset) 49 { 50 return *(volatile uint32 *)(gInfo->regs + offset); 51 } 52 53 inline void 54 write32(uint32 offset, uint32 value) 55 { 56 *(volatile uint32 *)(gInfo->regs + offset) = value; 57 } 58 59 // modes.cpp 60 extern status_t create_mode_list(void); 61 62 #endif /* RADEON_HD_ACCELERANT_H */ 63