BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / accelerants / via / engine / proto.h
blobc4d990abaec00c32a516e16bcbb64a67398d5866
1 /* general card functions */
2 status_t eng_general_powerup(void);
3 status_t eng_set_cas_latency(void);
4 void setup_virtualized_heads(bool);
5 void set_crtc_owner(bool);
6 status_t eng_general_output_select(bool);
7 status_t eng_general_head_select(bool);
8 status_t eng_general_wait_retrace(void);
9 status_t eng_general_validate_pic_size (display_mode *target, uint32 *bytes_per_row, bool *acc_mode);
11 /* AGP functions */
12 status_t eng_agp_setup(void);
14 /* apsed: logging macros */
15 #define MSG(args) do { /* if needed or si->settings with si NULL */ \
16 eng_log args; \
17 } while (0)
18 #define LOG(level_bit, args) do { \
19 uint32 mod = (si->settings.logmask & 0xfffffff0) & MODULE_BIT; \
20 uint32 lev = (si->settings.logmask & ~0xfffffff0) & level_bit; \
21 if (mod && lev) eng_log args; \
22 } while (0)
24 /* support functions */
25 void delay(bigtime_t i);
26 void eng_log(char *format, ...);
28 /* i2c functions */
29 int i2c_maven_read(unsigned char address);
30 void i2c_maven_write(unsigned char address, unsigned char data);
31 status_t i2c_init(void);
32 status_t i2c_maven_probe(void);
34 /* card info functions */
35 status_t parse_pins(void);
36 void get_panel_modes(display_mode *p1, display_mode *p2, bool *pan1, bool *pan2);
37 void fake_panel_start(void);
38 void set_specs(void);
39 void dump_pins(void);
41 /* DAC functions */
42 bool eng_dac_crt_connected(void);
43 status_t eng_dac_mode(int,float);
44 status_t eng_dac_palette(uint8*,uint8*,uint8*);
45 status_t eng_dac_pix_pll_find(display_mode target,float * result,uint8 *,uint8 *,uint8 *, uint8);
46 status_t eng_dac_set_pix_pll(display_mode target);
47 status_t eng_dac_sys_pll_find(float, float*, uint8*, uint8*, uint8*, uint8);
49 /* DAC2 functions */
50 bool eng_dac2_crt_connected(void);
51 status_t eng_dac2_mode(int,float);
52 status_t eng_dac2_palette(uint8*,uint8*,uint8*);
53 status_t eng_dac2_pix_pll_find(display_mode target,float * result,uint8 *,uint8 *,uint8 *, uint8);
54 status_t eng_dac2_set_pix_pll(display_mode target);
56 /*MAVENTV functions*/
57 status_t g100_g400max_maventv_vid_pll_find(
58 display_mode target, unsigned int * ht_new, unsigned int * ht_last_line,
59 uint8 * m_result, uint8 * n_result, uint8 * p_result);
60 int maventv_init(display_mode target);
62 /* CRTC1 functions */
63 status_t eng_crtc_validate_timing(
64 uint16 *hd_e,uint16 *hs_s,uint16 *hs_e,uint16 *ht,
65 uint16 *vd_e,uint16 *vs_s,uint16 *vs_e,uint16 *vt
67 status_t eng_crtc_set_timing(display_mode target);
68 status_t eng_crtc_depth(int mode);
69 status_t eng_crtc_set_display_start(uint32 startadd,uint8 bpp);
70 status_t eng_crtc_set_display_pitch(void);
72 status_t eng_crtc_dpms(bool, bool, bool);
73 status_t eng_crtc_dpms_fetch(bool*, bool*, bool*);
74 status_t eng_crtc_mem_priority(uint8);
76 status_t eng_crtc_cursor_init(void); /*Yes, cursor follows CRTC1 - not the DAC!*/
77 status_t eng_crtc_cursor_define(uint8*,uint8*);
78 status_t eng_crtc_cursor_position(uint16 x ,uint16 y);
79 status_t eng_crtc_cursor_show(void);
80 status_t eng_crtc_cursor_hide(void);
82 /* CRTC2 functions */
83 status_t eng_crtc2_validate_timing(
84 uint16 *hd_e,uint16 *hs_s,uint16 *hs_e,uint16 *ht,
85 uint16 *vd_e,uint16 *vs_s,uint16 *vs_e,uint16 *vt
87 status_t eng_crtc2_set_timing(display_mode target);
88 status_t eng_crtc2_depth(int mode);
89 status_t eng_crtc2_set_display_start(uint32 startadd,uint8 bpp);
90 status_t eng_crtc2_set_display_pitch(void);
92 status_t eng_crtc2_dpms(bool, bool, bool);
93 status_t eng_crtc2_dpms_fetch(bool*, bool*, bool*);
94 status_t eng_crtc2_mem_priority(uint8);
96 status_t eng_crtc2_cursor_init(void);
97 status_t eng_crtc2_cursor_define(uint8*,uint8*);
98 status_t eng_crtc2_cursor_position(uint16 x ,uint16 y);
99 status_t eng_crtc2_cursor_show(void);
100 status_t eng_crtc2_cursor_hide(void);
102 /* acceleration functions */
103 status_t check_acc_capability(uint32 feature);
104 status_t eng_acc_init(void);
105 status_t eng_acc_setup_blit(void);
106 status_t eng_acc_blit(uint16,uint16,uint16, uint16,uint16,uint16 );
107 status_t eng_acc_setup_rectangle(uint32 color);
108 status_t eng_acc_rectangle(uint32 xs,uint32 xe,uint32 ys,uint32 yl);
109 status_t eng_acc_setup_rect_invert(void);
110 status_t eng_acc_rectangle_invert(uint32 xs,uint32 xe,uint32 ys,uint32 yl);
111 status_t eng_acc_transparent_blit(uint16,uint16,uint16, uint16,uint16,uint16, uint32);
112 status_t eng_acc_video_blit(uint16 xs,uint16 ys,uint16 ws, uint16 hs,
113 uint16 xd,uint16 yd,uint16 wd,uint16 hd);
114 status_t eng_acc_wait_idle(void);
116 /* backend scaler functions */
117 status_t check_overlay_capability(uint32 feature);
118 bool eng_bes_chk_bandwidth(void);
119 void eng_bes_move_overlay(void);
120 status_t eng_bes_to_crtc(bool crtc);
121 status_t eng_bes_init(void);
122 status_t eng_configure_bes
123 (const overlay_buffer *ob, const overlay_window *ow,const overlay_view *ov, int offset);
124 status_t eng_release_bes(void);
126 /* I2C functions */
127 status_t i2c_sec_tv_adapter(void);
129 /* driver structures and enums */
130 enum{BPP8 = 0, BPP15 = 1, BPP16 = 2, BPP24 = 3, BPP32 = 4};
131 enum{DS_CRTC1DAC_CRTC2MAVEN, DS_CRTC1MAVEN_CRTC2DAC, DS_CRTC1CON1_CRTC2CON2, DS_CRTC1CON2_CRTC2CON1};