xref: /haiku/src/add-ons/accelerants/intel_extreme/accelerant_protos.h (revision 9642f7705b27e5c270c15fa526d14e1848c2c27d)
1 /*
2  * Copyright 2006-2007, 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 ACCELERANT_PROTOS_H
9 #define ACCELERANT_PROTOS_H
10 
11 
12 #include <Accelerant.h>
13 #include "video_overlay.h"
14 
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 void spin(bigtime_t delay);
21 
22 // general
23 status_t intel_init_accelerant(int fd);
24 ssize_t intel_accelerant_clone_info_size(void);
25 void intel_get_accelerant_clone_info(void* data);
26 status_t intel_clone_accelerant(void* data);
27 void intel_uninit_accelerant(void);
28 status_t intel_get_accelerant_device_info(accelerant_device_info* info);
29 sem_id intel_accelerant_retrace_semaphore(void);
30 
31 // modes & constraints
32 uint32 intel_accelerant_mode_count(void);
33 status_t intel_get_mode_list(display_mode* dm);
34 status_t intel_propose_display_mode(display_mode* target,
35 	const display_mode* low, const display_mode* high);
36 status_t intel_set_display_mode(display_mode* mode);
37 status_t intel_get_display_mode(display_mode* currentMode);
38 status_t intel_get_edid_info(void* info, size_t size, uint32* _version);
39 status_t intel_set_brightness(float brightness);
40 status_t intel_get_brightness(float* brightness);
41 status_t intel_get_frame_buffer_config(frame_buffer_config* config);
42 status_t intel_get_pixel_clock_limits(display_mode* mode, uint32* low,
43 	uint32* high);
44 status_t intel_move_display(uint16 hDisplayStart, uint16 vDisplayStart);
45 status_t intel_get_timing_constraints(display_timing_constraints* constraints);
46 void intel_set_indexed_colors(uint count, uint8 first, uint8* colorData,
47 	uint32 flags);
48 
49 // DPMS
50 uint32 intel_dpms_capabilities(void);
51 uint32 intel_dpms_mode(void);
52 status_t intel_set_dpms_mode(uint32 flags);
53 
54 // cursor
55 status_t intel_set_cursor_shape(uint16 width, uint16 height, uint16 hotX,
56 	uint16 hotY, uint8* andMask, uint8* xorMask);
57 void intel_move_cursor(uint16 x, uint16 y);
58 void intel_show_cursor(bool isVisible);
59 
60 // accelerant engine
61 uint32 intel_accelerant_engine_count(void);
62 status_t intel_acquire_engine(uint32 capabilities, uint32 maxWait,
63 			sync_token* syncToken, engine_token** _engineToken);
64 status_t intel_release_engine(engine_token* engineToken, sync_token* syncToken);
65 void intel_wait_engine_idle(void);
66 status_t intel_get_sync_token(engine_token* engineToken, sync_token* syncToken);
67 status_t intel_sync_to_token(sync_token* syncToken);
68 
69 // 2D acceleration
70 void intel_screen_to_screen_blit(engine_token* engineToken,
71 	blit_params* list, uint32 count);
72 void intel_fill_rectangle(engine_token* engineToken, uint32 color,
73 	fill_rect_params* list, uint32 count);
74 void intel_invert_rectangle(engine_token* engineToken, fill_rect_params* list,
75 	uint32 count);
76 void intel_fill_span(engine_token* engineToken, uint32 color, uint16* list,
77 	uint32 count);
78 
79 // overlay
80 uint32 intel_overlay_count(const display_mode* mode);
81 const uint32* intel_overlay_supported_spaces(const display_mode* mode);
82 uint32 intel_overlay_supported_features(uint32 colorSpace);
83 const overlay_buffer* intel_allocate_overlay_buffer(color_space space,
84 	uint16 width, uint16 height);
85 status_t intel_release_overlay_buffer(const overlay_buffer* buffer);
86 status_t intel_get_overlay_constraints(const display_mode* mode,
87 	const overlay_buffer* buffer, overlay_constraints* constraints);
88 overlay_token intel_allocate_overlay(void);
89 status_t intel_release_overlay(overlay_token overlayToken);
90 status_t intel_configure_overlay(overlay_token overlayToken,
91 	const overlay_buffer* buffer, const overlay_window* window,
92 	const overlay_view* view);
93 status_t i965_configure_overlay(overlay_token overlayToken,
94 	const overlay_buffer* buffer, const overlay_window* window,
95 	const overlay_view* view);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif	/* ACCELERANT_PROTOS_H */
102