xref: /haiku/src/add-ons/accelerants/framebuffer/accelerant_protos.h (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1 /*
2  * Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de.
3  * Copyright 2016, Jessica Hamilton, jessica.l.hamilton@gmail.com.
4  * All rights reserved. Distributed under the terms of the MIT License.
5  */
6 #ifndef _ACCELERANT_PROTOS_H
7 #define _ACCELERANT_PROTOS_H
8 
9 
10 #include <Accelerant.h>
11 #include "video_overlay.h"
12 
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 // general
19 status_t framebuffer_init_accelerant(int fd);
20 ssize_t framebuffer_accelerant_clone_info_size(void);
21 void framebuffer_get_accelerant_clone_info(void *data);
22 status_t framebuffer_clone_accelerant(void *data);
23 void framebuffer_uninit_accelerant(void);
24 status_t framebuffer_get_accelerant_device_info(accelerant_device_info *adi);
25 sem_id framebuffer_accelerant_retrace_semaphore(void);
26 
27 // modes & constraints
28 uint32 framebuffer_accelerant_mode_count(void);
29 status_t framebuffer_get_mode_list(display_mode *dm);
30 status_t framebuffer_set_display_mode(display_mode *modeToSet);
31 status_t framebuffer_get_display_mode(display_mode *currentMode);
32 status_t framebuffer_get_frame_buffer_config(frame_buffer_config *config);
33 status_t framebuffer_get_pixel_clock_limits(display_mode *dm, uint32 *low,
34 	uint32 *high);
35 
36 // accelerant engine
37 uint32 framebuffer_accelerant_engine_count(void);
38 status_t framebuffer_acquire_engine(uint32 capabilities, uint32 maxWait,
39 	sync_token *st, engine_token **et);
40 status_t framebuffer_release_engine(engine_token *et, sync_token *st);
41 void framebuffer_wait_engine_idle(void);
42 status_t framebuffer_get_sync_token(engine_token *et, sync_token *st);
43 status_t framebuffer_sync_to_token(sync_token *st);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif	/* _ACCELERANT_PROTOS_H */
50