xref: /haiku/src/add-ons/accelerants/radeon_hd/hooks.cpp (revision 9829800d2c60d6aba146af7fde09601929161730)
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  */
8 
9 
10 #include "accelerant_protos.h"
11 #include "accelerant.h"
12 
13 
14 extern "C" void *
15 get_accelerant_hook(uint32 feature, void *data)
16 {
17 	switch (feature) {
18 		/* general */
19 		case B_INIT_ACCELERANT:
20 			return (void*)radeon_init_accelerant;
21 		case B_UNINIT_ACCELERANT:
22 			return (void*)radeon_uninit_accelerant;
23 		/*case B_CLONE_ACCELERANT:
24 			return (void*)radeon_clone_accelerant;
25 		case B_ACCELERANT_CLONE_INFO_SIZE:
26 			return (void*)radeon_accelerant_clone_info_size;
27 		case B_GET_ACCELERANT_CLONE_INFO:
28 			return (void*)radeon_get_accelerant_clone_info;
29 		*/
30 		case B_GET_ACCELERANT_DEVICE_INFO:
31 			return (void*)radeon_get_accelerant_device_info;
32 		/*
33 		case B_ACCELERANT_RETRACE_SEMAPHORE:
34 			return (void*)radeon_accelerant_retrace_semaphore;
35 		*/
36 
37 		/* DPMS */
38 		case B_DPMS_CAPABILITIES:
39 			return (void*)radeon_dpms_capabilities;
40 		case B_DPMS_MODE:
41 			return (void*)radeon_dpms_mode;
42 		case B_SET_DPMS_MODE:
43 			return (void*)radeon_dpms_set;
44 
45 		/* mode configuration */
46 		case B_ACCELERANT_MODE_COUNT:
47 			return (void*)radeon_accelerant_mode_count;
48 		case B_GET_MODE_LIST:
49 			return (void*)radeon_get_mode_list;
50 		case B_SET_DISPLAY_MODE:
51 			return (void*)radeon_set_display_mode;
52 		case B_GET_DISPLAY_MODE:
53 			return (void*)radeon_get_display_mode;
54 		case B_GET_EDID_INFO:
55 			return (void*)radeon_get_edid_info;
56 
57 		case B_GET_FRAME_BUFFER_CONFIG:
58 			return (void*)radeon_get_frame_buffer_config;
59 		case B_GET_PIXEL_CLOCK_LIMITS:
60 			return (void*)radeon_get_pixel_clock_limits;
61 
62 		case B_ACQUIRE_ENGINE:
63 			return (void*)radeon_acquire_engine;
64 		case B_RELEASE_ENGINE:
65 			return (void*)radeon_release_engine;
66 	}
67 
68 	return NULL;
69 }
70 
71