1 /* 2 * Copyright 2006-2009, 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 * Alexander von Gluck IV, kallisti5@unixzen.com 8 */ 9 10 11 #include "accelerant.h" 12 #include "accelerant_protos.h" 13 14 15 extern "C" void* 16 get_accelerant_hook(uint32 feature, void* data) 17 { 18 switch (feature) { 19 /* general */ 20 case B_INIT_ACCELERANT: 21 return (void*)radeon_init_accelerant; 22 case B_UNINIT_ACCELERANT: 23 return (void*)radeon_uninit_accelerant; 24 /*case B_CLONE_ACCELERANT: 25 return (void*)radeon_clone_accelerant; 26 case B_ACCELERANT_CLONE_INFO_SIZE: 27 return (void*)radeon_accelerant_clone_info_size; 28 case B_GET_ACCELERANT_CLONE_INFO: 29 return (void*)radeon_get_accelerant_clone_info; 30 case B_ACCELERANT_RETRACE_SEMAPHORE: 31 return (void*)radeon_accelerant_retrace_semaphore; 32 */ 33 case B_GET_ACCELERANT_DEVICE_INFO: 34 return (void*)radeon_get_accelerant_device_info; 35 36 /* DPMS */ 37 case B_DPMS_CAPABILITIES: 38 return (void*)radeon_dpms_capabilities; 39 case B_DPMS_MODE: 40 return (void*)radeon_dpms_mode; 41 case B_SET_DPMS_MODE: 42 return (void*)radeon_dpms_set_hook; 43 44 /* mode configuration */ 45 case B_ACCELERANT_MODE_COUNT: 46 return (void*)radeon_accelerant_mode_count; 47 case B_GET_EDID_INFO: 48 return (void*)radeon_get_edid_info; 49 case B_GET_MODE_LIST: 50 return (void*)radeon_get_mode_list; 51 case B_GET_PREFERRED_DISPLAY_MODE: 52 return (void*)radeon_get_preferred_mode; 53 case B_SET_DISPLAY_MODE: 54 return (void*)radeon_set_display_mode; 55 case B_GET_DISPLAY_MODE: 56 return (void*)radeon_get_display_mode; 57 case B_GET_BRIGHTNESS: 58 return (void*)radeon_get_brightness; 59 case B_SET_BRIGHTNESS: 60 return (void*)radeon_set_brightness; 61 62 /* memory controller */ 63 case B_GET_FRAME_BUFFER_CONFIG: 64 return (void*)radeon_get_frame_buffer_config; 65 case B_GET_PIXEL_CLOCK_LIMITS: 66 return (void*)radeon_get_pixel_clock_limits; 67 68 /* engine */ 69 case B_ACCELERANT_ENGINE_COUNT: 70 return (void*)radeon_accelerant_engine_count; 71 case B_ACQUIRE_ENGINE: 72 return (void*)radeon_acquire_engine; 73 case B_RELEASE_ENGINE: 74 return (void*)radeon_release_engine; 75 76 /* 2D acceleration */ 77 /* 78 case B_SCREEN_TO_SCREEN_BLIT: 79 return (void*)radeon_screen_to_screen_blit; 80 case B_FILL_RECTANGLE: 81 return (void*)radeon_fill_rectangle; 82 case B_INVERT_RECTANGLE: 83 return (void*)radeon_invert_rectangle; 84 case B_FILL_SPAN: 85 return (void*)radeon_fill_span; 86 */ 87 } 88 89 return NULL; 90 } 91 92