2 * Copyright (c) 2002, Thomas Kurschel
3 * Distributed under the terms of the MIT License.
7 Contains entry point to get public functions.
8 (directly copied from sample driver)
15 The standard entry point. Given a uint32 feature identifier, this routine
16 returns a pointer to the function that implements the feature. Some features
17 require more information than just the identifier to select the proper
18 function. The extra information (which is specific to the feature) is
19 pointed at by the void *data parameter. By default, no extra information
20 is available. Any extra information available to choose the function will be
21 noted on a case by case below.
25 get_accelerant_hook(uint32 feature
, void *data
)
31 These definitions are out of pure lazyness.
33 #define HOOK(x) case B_##x: return (void *)x
34 #define ZERO(x) case B_##x: return (void *)0
37 One of either B_INIT_ACCELERANT or B_CLONE_ACCELERANT will be requested and
38 subsequently called before any other hook is requested. All other feature
39 hook selections can be predicated on variables assigned during the accelerant
40 initialization process.
43 HOOK(INIT_ACCELERANT
);
44 HOOK(CLONE_ACCELERANT
);
46 HOOK(ACCELERANT_CLONE_INFO_SIZE
);
47 HOOK(GET_ACCELERANT_CLONE_INFO
);
48 HOOK(UNINIT_ACCELERANT
);
49 HOOK(GET_ACCELERANT_DEVICE_INFO
);
50 HOOK(ACCELERANT_RETRACE_SEMAPHORE
);
52 /* mode configuration */
53 HOOK(ACCELERANT_MODE_COUNT
);
55 HOOK(PROPOSE_DISPLAY_MODE
);
56 HOOK(SET_DISPLAY_MODE
);
57 HOOK(GET_DISPLAY_MODE
);
58 HOOK(GET_FRAME_BUFFER_CONFIG
);
59 HOOK(GET_PIXEL_CLOCK_LIMITS
);
61 HOOK(SET_INDEXED_COLORS
);
62 //HOOK(GET_TIMING_CONSTRAINTS);
64 case B_GET_PREFERRED_DISPLAY_MODE
:
65 return (void*)radeon_get_preferred_display_mode
;
67 return (void*)radeon_get_edid_info
;
70 HOOK(DPMS_CAPABILITIES
);
74 /* cursor managment */
76 // HOOK(SET_CURSOR_SHAPE);
81 HOOK(ACCELERANT_ENGINE_COUNT
);
84 HOOK(WAIT_ENGINE_IDLE
);
89 When requesting an acceleration hook, the calling application provides a
90 pointer to the display_mode for which the acceleration function will be used.
91 Depending on the engine architecture, you may choose to provide a different
92 function to be used with each bit-depth. In the sample driver we return
93 the same function all the time.
96 HOOK(SCREEN_TO_SCREEN_BLIT
);
98 HOOK(INVERT_RECTANGLE
);
103 HOOK(OVERLAY_SUPPORTED_SPACES
);
104 HOOK(OVERLAY_SUPPORTED_FEATURES
);
105 HOOK(ALLOCATE_OVERLAY_BUFFER
);
106 HOOK(RELEASE_OVERLAY_BUFFER
);
107 HOOK(GET_OVERLAY_CONSTRAINTS
);
108 HOOK(ALLOCATE_OVERLAY
);
109 HOOK(RELEASE_OVERLAY
);
110 HOOK(CONFIGURE_OVERLAY
);