cim_rtns.h revision f29dbc25
1f29dbc25Smrg/*
2f29dbc25Smrg * Copyright (c) 2006 Advanced Micro Devices, Inc.
3f29dbc25Smrg *
4f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a
5f29dbc25Smrg * copy of this software and associated documentation files (the "Software"),
6f29dbc25Smrg * to deal in the Software without restriction, including without limitation
7f29dbc25Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8f29dbc25Smrg * and/or sell copies of the Software, and to permit persons to whom the
9f29dbc25Smrg * Software is furnished to do so, subject to the following conditions:
10f29dbc25Smrg *
11f29dbc25Smrg * The above copyright notice and this permission notice shall be included in
12f29dbc25Smrg * all copies or substantial portions of the Software.
13f29dbc25Smrg *
14f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20f29dbc25Smrg * DEALINGS IN THE SOFTWARE.
21f29dbc25Smrg *
22f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
23f29dbc25Smrg * contributors may be used to endorse or promote products derived from this
24f29dbc25Smrg * software without specific prior written permission.
25f29dbc25Smrg */
26f29dbc25Smrg
27f29dbc25Smrg /*
28f29dbc25Smrg  * Cimarron function prototypes.
29f29dbc25Smrg  */
30f29dbc25Smrg
31f29dbc25Smrg#ifndef _cim_rtns_h
32f29dbc25Smrg#define _cim_rtns_h
33f29dbc25Smrg
34f29dbc25Smrg/* INCLUDE USER PARAMETER DEFINITIONS */
35f29dbc25Smrg
36f29dbc25Smrg#include "cim_parm.h"
37f29dbc25Smrg
38f29dbc25Smrg/* COMPILER OPTION FOR C++ PROGRAMS */
39f29dbc25Smrg
40f29dbc25Smrg#ifdef __cplusplus
41f29dbc25Smrgextern "C"
42f29dbc25Smrg{
43f29dbc25Smrg#endif
44f29dbc25Smrg
45f29dbc25Smrg/*--------------------------*/
46f29dbc25Smrg/* CIMARRON MEMORY POINTERS */
47f29dbc25Smrg/*--------------------------*/
48f29dbc25Smrg
49f29dbc25Smrg    extern unsigned char *cim_gp_ptr;
50f29dbc25Smrg    extern unsigned char *cim_fb_ptr;
51f29dbc25Smrg    extern unsigned char *cim_cmd_base_ptr;
52f29dbc25Smrg    extern unsigned char *cim_cmd_ptr;
53f29dbc25Smrg    extern unsigned char *cim_vid_ptr;
54f29dbc25Smrg    extern unsigned char *cim_vip_ptr;
55f29dbc25Smrg    extern unsigned char *cim_vg_ptr;
56f29dbc25Smrg
57f29dbc25Smrg/*----------------------------------------*/
58f29dbc25Smrg/* INITIALIZATION ROUTINE DEFINITIONS     */
59f29dbc25Smrg/*----------------------------------------*/
60f29dbc25Smrg
61f29dbc25Smrg    int init_detect_cpu(unsigned long *cpu_revision,
62f29dbc25Smrg        unsigned long *companion_revision);
63f29dbc25Smrg    unsigned long init_read_pci(unsigned long address);
64f29dbc25Smrg    int init_read_base_addresses(INIT_BASE_ADDRESSES * base_addresses);
65f29dbc25Smrg    int init_read_cpu_frequency(unsigned long *cpu_frequency);
66f29dbc25Smrg
67f29dbc25Smrg/*----------------------------------------*/
68f29dbc25Smrg/* GRAPHICS PROCESSOR ROUTINE DEFINITIONS */
69f29dbc25Smrg/*----------------------------------------*/
70f29dbc25Smrg
71f29dbc25Smrg    void gp_set_limit_on_buffer_lead(unsigned long lead);
72f29dbc25Smrg    void gp_set_command_buffer_base(unsigned long address,
73f29dbc25Smrg        unsigned long start, unsigned long stop);
74f29dbc25Smrg    void gp_set_frame_buffer_base(unsigned long address, unsigned long size);
75f29dbc25Smrg    void gp_set_bpp(int bpp);
76f29dbc25Smrg    void gp_declare_blt(unsigned long flags);
77f29dbc25Smrg    void gp_declare_vector(unsigned long flags);
78f29dbc25Smrg    void gp_write_parameters(void);
79f29dbc25Smrg    void gp_set_raster_operation(unsigned char ROP);
80f29dbc25Smrg    void gp_set_alpha_operation(int alpha_operation, int alpha_type,
81f29dbc25Smrg        int channel, int apply_alpha, unsigned char alpha);
82f29dbc25Smrg    void gp_set_solid_pattern(unsigned long color);
83f29dbc25Smrg    void gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
84f29dbc25Smrg        unsigned long data0, unsigned long data1, int transparent, int x,
85f29dbc25Smrg        int y);
86f29dbc25Smrg    void gp_set_pattern_origin(int x, int y);
87f29dbc25Smrg    void gp_set_color_pattern(unsigned long *pattern, int format, int x,
88f29dbc25Smrg        int y);
89f29dbc25Smrg    void gp_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
90f29dbc25Smrg        int transparent);
91f29dbc25Smrg    void gp_set_solid_source(unsigned long color);
92f29dbc25Smrg    void gp_set_source_transparency(unsigned long color, unsigned long mask);
93f29dbc25Smrg    void gp_program_lut(unsigned long *colors, int full_lut);
94f29dbc25Smrg    void gp_set_vector_pattern(unsigned long pattern, unsigned long color,
95f29dbc25Smrg        int length);
96f29dbc25Smrg    void gp_set_strides(unsigned long dst_stride, unsigned long src_stride);
97f29dbc25Smrg    void gp_set_source_format(int format);
98f29dbc25Smrg    void gp_pattern_fill(unsigned long dstoffset, unsigned long width,
99f29dbc25Smrg        unsigned long height);
100f29dbc25Smrg    void gp_screen_to_screen_blt(unsigned long dstoffset,
101f29dbc25Smrg        unsigned long srcoffset, unsigned long width,
102f29dbc25Smrg        unsigned long height, int flags);
103f29dbc25Smrg    void gp_screen_to_screen_convert(unsigned long dstoffset,
104f29dbc25Smrg        unsigned long srcoffset, unsigned long width,
105f29dbc25Smrg        unsigned long height, int nibble);
106f29dbc25Smrg    void gp_color_bitmap_to_screen_blt(unsigned long dstoffset,
107f29dbc25Smrg        unsigned long srcx, unsigned long width, unsigned long height,
108f29dbc25Smrg        unsigned char *data, long pitch);
109f29dbc25Smrg    void gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx,
110f29dbc25Smrg        unsigned long width, unsigned long height, unsigned char *data,
111f29dbc25Smrg        long pitch);
112f29dbc25Smrg    void gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx,
113f29dbc25Smrg        unsigned long width, unsigned long height, unsigned char *data,
114f29dbc25Smrg        long pitch);
115f29dbc25Smrg    void gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset,
116f29dbc25Smrg        unsigned long width, unsigned long height, int degrees);
117f29dbc25Smrg    void gp_mono_bitmap_to_screen_blt(unsigned long dstoffset,
118f29dbc25Smrg        unsigned long srcx, unsigned long width, unsigned long height,
119f29dbc25Smrg        unsigned char *data, long stride);
120f29dbc25Smrg    void gp_text_blt(unsigned long dstoffset, unsigned long width,
121f29dbc25Smrg        unsigned long height, unsigned char *data);
122f29dbc25Smrg    void gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset,
123f29dbc25Smrg        unsigned long srcx, unsigned long width, unsigned long height,
124f29dbc25Smrg        int byte_packed);
125f29dbc25Smrg    void gp_antialiased_text(unsigned long dstoffset, unsigned long srcx,
126f29dbc25Smrg        unsigned long width, unsigned long height, unsigned char *data,
127f29dbc25Smrg        long stride, int fourbpp);
128f29dbc25Smrg  void gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx,
129f29dbc25Smrg	unsigned long width, unsigned long height, unsigned long,
130f29dbc25Smrg        long stride, int operation, int fourbpp);
131f29dbc25Smrg  void gp_masked_blt(unsigned long dstoffset, unsigned long width,
132f29dbc25Smrg        unsigned long height, unsigned long mono_srcx,
133f29dbc25Smrg        unsigned long color_srcx, unsigned char *mono_mask,
134f29dbc25Smrg        unsigned char *color_data, long mono_pitch, long color_pitch);
135f29dbc25Smrg    void gp_screen_to_screen_masked(unsigned long dstoffset,
136f29dbc25Smrg        unsigned long srcoffset, unsigned long width,
137f29dbc25Smrg        unsigned long height, unsigned long mono_srcx,
138f29dbc25Smrg        unsigned char *mono_mask, long mono_pitch);
139f29dbc25Smrg    void gp_bresenham_line(unsigned long dstoffset, unsigned short length,
140f29dbc25Smrg        unsigned short initerr, unsigned short axialerr,
141f29dbc25Smrg        unsigned short diagerr, unsigned long flags);
142f29dbc25Smrg    void gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0,
143f29dbc25Smrg        unsigned long y0, unsigned long x1, unsigned long y1, int inclusive);
144f29dbc25Smrg
145f29dbc25Smrg    int gp_test_blt_pending(void);
146f29dbc25Smrg    void gp_wait_blt_pending(void);
147f29dbc25Smrg    void gp_wait_until_idle(void);
148f29dbc25Smrg    int gp_test_blt_busy(void);
149f29dbc25Smrg    void gp_save_state(GP_SAVE_RESTORE * gp_state);
150f29dbc25Smrg    void gp_restore_state(GP_SAVE_RESTORE * gp_state);
151f29dbc25Smrg
152f29dbc25Smrg/*----------------------------------------*/
153f29dbc25Smrg/* VIDEO GENERATOR ROUTINE DEFINITIONS    */
154f29dbc25Smrg/*----------------------------------------*/
155f29dbc25Smrg
156f29dbc25Smrg    int vg_delay_milliseconds(unsigned long ms);
157f29dbc25Smrg    int vg_set_display_mode(unsigned long src_width, unsigned long src_height,
158f29dbc25Smrg        unsigned long dst_width, unsigned long dst_height, int bpp, int hz,
159f29dbc25Smrg        unsigned long flags);
160f29dbc25Smrg    int vg_set_panel_mode(unsigned long src_width, unsigned long src_height,
161f29dbc25Smrg        unsigned long dst_width, unsigned long dst_height,
162f29dbc25Smrg        unsigned long panel_width, unsigned long panel_height,
163f29dbc25Smrg        int bpp, unsigned long flags);
164f29dbc25Smrg    int vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height,
165f29dbc25Smrg        unsigned long encoder, unsigned long tvres, int bpp,
166f29dbc25Smrg        unsigned long flags, unsigned long h_overscan,
167f29dbc25Smrg        unsigned long v_overscan);
168f29dbc25Smrg    int vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp);
169f29dbc25Smrg    int vg_set_display_bpp(int bpp);
170f29dbc25Smrg    int vg_get_display_mode_index(VG_QUERY_MODE * query);
171f29dbc25Smrg    int vg_get_display_mode_information(unsigned int index,
172f29dbc25Smrg        VG_DISPLAY_MODE * vg_mode);
173f29dbc25Smrg    int vg_get_display_mode_count(void);
174f29dbc25Smrg    int vg_get_current_display_mode(VG_DISPLAY_MODE * current_display,
175f29dbc25Smrg        int *bpp);
176f29dbc25Smrg    int vg_set_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]);
177f29dbc25Smrg    int vg_configure_flicker_filter(unsigned long flicker_strength,
178f29dbc25Smrg        int flicker_alpha);
179f29dbc25Smrg    int vg_set_clock_frequency(unsigned long frequency,
180f29dbc25Smrg        unsigned long pll_flags);
181f29dbc25Smrg    int vg_set_border_color(unsigned long border_color);
182f29dbc25Smrg    int vg_set_cursor_enable(int enable);
183f29dbc25Smrg    int vg_set_mono_cursor_colors(unsigned long bkcolor,
184f29dbc25Smrg        unsigned long fgcolor);
185f29dbc25Smrg    int vg_set_cursor_position(long xpos, long ypos,
186f29dbc25Smrg        VG_PANNING_COORDINATES * panning);
187f29dbc25Smrg    int vg_set_mono_cursor_shape32(unsigned long memoffset,
188f29dbc25Smrg        unsigned long *andmask, unsigned long *xormask,
189f29dbc25Smrg        unsigned long x_hotspot, unsigned long y_hotspot);
190f29dbc25Smrg    int vg_set_mono_cursor_shape64(unsigned long memoffset,
191f29dbc25Smrg        unsigned long *andmask, unsigned long *xormask,
192f29dbc25Smrg        unsigned long x_hotspot, unsigned long y_hotspot);
193f29dbc25Smrg    int vg_set_color_cursor_shape(unsigned long memoffset,
194f29dbc25Smrg        unsigned char *data, unsigned long width, unsigned long height,
195f29dbc25Smrg        long pitch, unsigned long x_hotspot, unsigned long y_hotspot);
196f29dbc25Smrg    int vg_pan_desktop(unsigned long x, unsigned long y,
197f29dbc25Smrg        VG_PANNING_COORDINATES * panning);
198f29dbc25Smrg    int vg_set_display_offset(unsigned long address);
199f29dbc25Smrg    int vg_set_display_pitch(unsigned long pitch);
200f29dbc25Smrg    int vg_set_display_palette_entry(unsigned long index,
201f29dbc25Smrg        unsigned long palette);
202f29dbc25Smrg    int vg_set_display_palette(unsigned long *palette);
203f29dbc25Smrg    int vg_set_compression_enable(int enable);
204f29dbc25Smrg    int vg_configure_compression(VG_COMPRESSION_DATA * comp_data);
205f29dbc25Smrg    int vg_test_timing_active(void);
206f29dbc25Smrg    int vg_test_vertical_active(void);
207f29dbc25Smrg    int vg_wait_vertical_blank(void);
208f29dbc25Smrg    int vg_test_even_field(void);
209f29dbc25Smrg    int vg_configure_line_interrupt(VG_INTERRUPT_PARAMS * interrupt_info);
210f29dbc25Smrg    unsigned long vg_test_and_clear_interrupt(void);
211f29dbc25Smrg    unsigned long vg_test_flip_status(void);
212f29dbc25Smrg    int vg_save_state(VG_SAVE_RESTORE * vg_state);
213f29dbc25Smrg    int vg_restore_state(VG_SAVE_RESTORE * vg_state);
214f29dbc25Smrg
215f29dbc25Smrg/*----------------------------------------*/
216f29dbc25Smrg/* VIDEO GENERATOR READ ROUTINES          */
217f29dbc25Smrg/*----------------------------------------*/
218f29dbc25Smrg
219f29dbc25Smrg    unsigned long vg_read_graphics_crc(int crc_source);
220f29dbc25Smrg    unsigned long vg_read_window_crc(int crc_source, unsigned long x,
221f29dbc25Smrg        unsigned long y, unsigned long width, unsigned long height);
222f29dbc25Smrg    int vg_get_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]);
223f29dbc25Smrg    int vg_get_flicker_filter_configuration(unsigned long *strength,
224f29dbc25Smrg        int *flicker_alpha);
225f29dbc25Smrg    unsigned long vg_get_display_pitch(void);
226f29dbc25Smrg    unsigned long vg_get_frame_buffer_line_size(void);
227f29dbc25Smrg    unsigned long vg_get_current_vline(void);
228f29dbc25Smrg    unsigned long vg_get_display_offset(void);
229f29dbc25Smrg    int vg_get_cursor_info(VG_CURSOR_DATA * cursor_data);
230f29dbc25Smrg    int vg_get_display_palette_entry(unsigned long index,
231f29dbc25Smrg        unsigned long *entry);
232f29dbc25Smrg    unsigned long vg_get_border_color(void);
233f29dbc25Smrg    int vg_get_display_palette(unsigned long *palette);
234f29dbc25Smrg    int vg_get_compression_info(VG_COMPRESSION_DATA * comp_data);
235f29dbc25Smrg    int vg_get_compression_enable(void);
236f29dbc25Smrg    int vg_get_valid_bit(int line);
237f29dbc25Smrg
238f29dbc25Smrg/*----------------------------------------*/
239f29dbc25Smrg/* DISPLAY FILTER ROUTINE DEFINITIONS     */
240f29dbc25Smrg/*----------------------------------------*/
241f29dbc25Smrg
242f29dbc25Smrg    int df_set_crt_enable(int crt_output);
243f29dbc25Smrg    int df_set_panel_enable(int panel_output);
244f29dbc25Smrg    int df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd,
245f29dbc25Smrg        DF_VIDEO_SOURCE_PARAMS * video_source_even);
246f29dbc25Smrg    int df_set_video_offsets(int even, unsigned long y_offset,
247f29dbc25Smrg        unsigned long u_offset, unsigned long v_offset);
248f29dbc25Smrg    int df_set_video_scale(unsigned long src_width, unsigned long src_height,
249f29dbc25Smrg        unsigned long dst_width, unsigned long dst_height,
250f29dbc25Smrg        unsigned long flags);
251f29dbc25Smrg    int df_set_video_position(DF_VIDEO_POSITION * video_window);
252f29dbc25Smrg    int df_set_video_filter_coefficients(long taps[][4], int phase256);
253f29dbc25Smrg    int df_set_video_enable(int enable, unsigned long flags);
254f29dbc25Smrg    int df_set_video_color_key(unsigned long key, unsigned long mask,
255f29dbc25Smrg        int graphics);
256f29dbc25Smrg    int df_set_video_palette(unsigned long *palette);
257f29dbc25Smrg    int df_set_video_palette_entry(unsigned long index,
258f29dbc25Smrg        unsigned long palette);
259f29dbc25Smrg    int df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *
260f29dbc25Smrg        cursor_color_key);
261f29dbc25Smrg    int df_set_video_cursor_color_key_enable(int enable);
262f29dbc25Smrg    int df_configure_alpha_window(int window,
263f29dbc25Smrg        DF_ALPHA_REGION_PARAMS * alpha_data);
264f29dbc25Smrg    int df_set_alpha_window_enable(int window, int enable);
265f29dbc25Smrg    int df_set_no_ck_outside_alpha(int enable);
266f29dbc25Smrg    int df_set_video_request(unsigned long x, unsigned long y);
267f29dbc25Smrg    int df_set_output_color_space(int color_space);
268f29dbc25Smrg    int df_set_output_path(int format);
269f29dbc25Smrg    unsigned long df_test_video_flip_status(void);
270f29dbc25Smrg    int df_save_state(DF_SAVE_RESTORE * gp_state);
271f29dbc25Smrg    int df_restore_state(DF_SAVE_RESTORE * gp_state);
272f29dbc25Smrg
273f29dbc25Smrg/*----------------------------------------*/
274f29dbc25Smrg/*    DISPLAY FILTER READ ROUTINES        */
275f29dbc25Smrg/*----------------------------------------*/
276f29dbc25Smrg
277f29dbc25Smrg    unsigned long df_read_composite_crc(int crc_source);
278f29dbc25Smrg    unsigned long df_read_composite_window_crc(unsigned long x,
279f29dbc25Smrg        unsigned long y, unsigned long width, unsigned long height,
280f29dbc25Smrg        int source);
281f29dbc25Smrg    unsigned long df_read_panel_crc(void);
282f29dbc25Smrg    int df_get_video_enable(int *enable, unsigned long *flags);
283f29dbc25Smrg    int df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS *
284f29dbc25Smrg        video_source_odd, DF_VIDEO_SOURCE_PARAMS * video_source_even);
285f29dbc25Smrg    int df_get_video_position(DF_VIDEO_POSITION * video_window);
286f29dbc25Smrg    int df_get_video_scale(unsigned long *x_scale, unsigned long *y_scale);
287f29dbc25Smrg    int df_get_video_filter_coefficients(long taps[][4], int *phase256);
288f29dbc25Smrg    int df_get_video_color_key(unsigned long *key, unsigned long *mask,
289f29dbc25Smrg        int *graphics);
290f29dbc25Smrg    int df_get_video_palette_entry(unsigned long index,
291f29dbc25Smrg        unsigned long *palette);
292f29dbc25Smrg    int df_get_video_palette(unsigned long *palette);
293f29dbc25Smrg    int df_get_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *
294f29dbc25Smrg        cursor_color_key);
295f29dbc25Smrg    int df_get_video_cursor_color_key_enable(void);
296f29dbc25Smrg    int df_get_alpha_window_configuration(int window,
297f29dbc25Smrg        DF_ALPHA_REGION_PARAMS * alpha_data);
298f29dbc25Smrg    int df_get_alpha_window_enable(int window);
299f29dbc25Smrg    int df_get_video_request(unsigned long *x, unsigned long *y);
300f29dbc25Smrg    int df_get_output_color_space(int *color_space);
301f29dbc25Smrg
302f29dbc25Smrg/*----------------------------------------*/
303f29dbc25Smrg/*        MSR ROUTINE DEFINITIONS         */
304f29dbc25Smrg/*----------------------------------------*/
305f29dbc25Smrg
306f29dbc25Smrg    int msr_init_table(void);
307f29dbc25Smrg    int msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes);
308f29dbc25Smrg    int msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices);
309f29dbc25Smrg    int msr_read64(unsigned long device, unsigned long msr_register,
310f29dbc25Smrg        Q_WORD * msr_value);
311f29dbc25Smrg    int msr_write64(unsigned long device, unsigned long msr_register,
312f29dbc25Smrg        Q_WORD * msr_value);
313f29dbc25Smrg
314f29dbc25Smrg/*----------------------------------------*/
315f29dbc25Smrg/*        VIP ROUTINE DEFINITIONS         */
316f29dbc25Smrg/*----------------------------------------*/
317f29dbc25Smrg
318f29dbc25Smrg    int vip_initialize(VIPSETMODEBUFFER * buffer);
319f29dbc25Smrg    int vip_update_601_params(VIP_601PARAMS * buffer);
320f29dbc25Smrg    int vip_terminate(void);
321f29dbc25Smrg    int vip_configure_capture_buffers(int buffer_type,
322f29dbc25Smrg        VIPINPUTBUFFER * buffer);
323f29dbc25Smrg    int vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER * buffer);
324f29dbc25Smrg    int vip_max_address_enable(unsigned long max_address, int enable);
325f29dbc25Smrg    int vip_set_interrupt_enable(unsigned long mask, int enable);
326f29dbc25Smrg    unsigned long vip_get_interrupt_state(void);
327f29dbc25Smrg    int vip_set_capture_state(unsigned long state);
328f29dbc25Smrg    int vip_set_vsync_error(unsigned long vertical_count,
329f29dbc25Smrg        unsigned long window_before, unsigned long window_after, int enable);
330f29dbc25Smrg    int vip_configure_fifo(unsigned long fifo_type, unsigned long fifo_size);
331f29dbc25Smrg    int vip_set_loopback_enable(int bEnable);
332f29dbc25Smrg    int vip_configure_genlock(VIPGENLOCKBUFFER * buffer);
333f29dbc25Smrg    int vip_set_genlock_enable(int bEnable);
334f29dbc25Smrg    int vip_configure_pages(int page_count, unsigned long page_offset);
335f29dbc25Smrg    int vip_set_interrupt_line(int line);
336f29dbc25Smrg    int vip_reset(void);
337f29dbc25Smrg    int vip_set_subwindow_enable(VIPSUBWINDOWBUFFER * buffer);
338f29dbc25Smrg    int vip_reset_interrupt_state(unsigned long interrupt_mask);
339f29dbc25Smrg
340f29dbc25Smrg    int vip_save_state(VIPSTATEBUFFER * save_buffer);
341f29dbc25Smrg    int vip_restore_state(VIPSTATEBUFFER * restore_buffer);
342f29dbc25Smrg    int vip_set_power_characteristics(VIPPOWERBUFFER * buffer);
343f29dbc25Smrg    int vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer);
344f29dbc25Smrg    int vip_set_debug_characteristics(VIPDEBUGBUFFER * buffer);
345f29dbc25Smrg    int vip_test_genlock_active(void);
346f29dbc25Smrg    int vip_test_signal_status(void);
347f29dbc25Smrg    unsigned long vip_get_current_field(void);
348f29dbc25Smrg
349f29dbc25Smrg/*----------------------------------------*/
350f29dbc25Smrg/*        VIP READ ROUTINES               */
351f29dbc25Smrg/*----------------------------------------*/
352f29dbc25Smrg
353f29dbc25Smrg    int vip_get_current_mode(VIPSETMODEBUFFER * buffer);
354f29dbc25Smrg    int vip_get_601_configuration(VIP_601PARAMS * buffer);
355f29dbc25Smrg    int vip_get_buffer_configuration(int buffer_type,
356f29dbc25Smrg        VIPINPUTBUFFER * buffer);
357f29dbc25Smrg    int vip_get_genlock_configuration(VIPGENLOCKBUFFER * buffer);
358f29dbc25Smrg    int vip_get_genlock_enable(void);
359f29dbc25Smrg    int vip_is_buffer_update_latched(void);
360f29dbc25Smrg    unsigned long vip_get_capture_state(void);
361f29dbc25Smrg    unsigned long vip_get_current_line(void);
362f29dbc25Smrg    unsigned long vip_read_fifo(unsigned long fifo_address);
363f29dbc25Smrg    int vip_write_fifo(unsigned long fifo_address, unsigned long fifo_data);
364f29dbc25Smrg    int vip_enable_fifo_access(int enable);
365f29dbc25Smrg    int vip_get_capability_characteristics(VIPCAPABILITIESBUFFER * buffer);
366f29dbc25Smrg    int vip_get_power_characteristics(VIPPOWERBUFFER * buffer);
367f29dbc25Smrg    int vip_get_priority_characteristics(VIPPRIORITYBUFFER * buffer);
368f29dbc25Smrg
369f29dbc25Smrg/*----------------------------------------*/
370f29dbc25Smrg/*        VOP ROUTINE DEFINITIONS         */
371f29dbc25Smrg/*----------------------------------------*/
372f29dbc25Smrg
373f29dbc25Smrg    int vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer);
374f29dbc25Smrg    int vop_enable_vbi_output(int enable);
375f29dbc25Smrg    int vop_set_configuration(VOPCONFIGURATIONBUFFER * config);
376f29dbc25Smrg    int vop_save_state(VOPSTATEBUFFER * save_buffer);
377f29dbc25Smrg    int vop_restore_state(VOPSTATEBUFFER * save_buffer);
378f29dbc25Smrg
379f29dbc25Smrg/*----------------------------------------*/
380f29dbc25Smrg/*        VOP READ ROUTINES               */
381f29dbc25Smrg/*----------------------------------------*/
382f29dbc25Smrg
383f29dbc25Smrg    int vop_get_current_mode(VOPCONFIGURATIONBUFFER * config);
384f29dbc25Smrg    int vop_get_vbi_configuration(VOPVBIWINDOWBUFFER * buffer);
385f29dbc25Smrg    int vop_get_vbi_enable(void);
386f29dbc25Smrg    unsigned long vop_get_crc(void);
387f29dbc25Smrg    unsigned long vop_read_vbi_crc(void);
388f29dbc25Smrg
389f29dbc25Smrg/* CLOSE BRACKET FOR C++ COMPLILATION */
390f29dbc25Smrg
391f29dbc25Smrg#ifdef __cplusplus
392f29dbc25Smrg}
393f29dbc25Smrg#endif
394f29dbc25Smrg
395f29dbc25Smrg#endif
396