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
4104007ebaSmrgextern "C" {
42f29dbc25Smrg#endif
43f29dbc25Smrg
44f29dbc25Smrg/*--------------------------*/
45f29dbc25Smrg/* CIMARRON MEMORY POINTERS */
46f29dbc25Smrg/*--------------------------*/
47f29dbc25Smrg
48f29dbc25Smrg    extern unsigned char *cim_gp_ptr;
49f29dbc25Smrg    extern unsigned char *cim_fb_ptr;
50f29dbc25Smrg    extern unsigned char *cim_cmd_base_ptr;
51f29dbc25Smrg    extern unsigned char *cim_cmd_ptr;
52f29dbc25Smrg    extern unsigned char *cim_vid_ptr;
53f29dbc25Smrg    extern unsigned char *cim_vip_ptr;
54f29dbc25Smrg    extern unsigned char *cim_vg_ptr;
55f29dbc25Smrg
56f29dbc25Smrg/*----------------------------------------*/
57f29dbc25Smrg/* INITIALIZATION ROUTINE DEFINITIONS     */
58f29dbc25Smrg/*----------------------------------------*/
59f29dbc25Smrg
60f29dbc25Smrg    int init_detect_cpu(unsigned long *cpu_revision,
6104007ebaSmrg                        unsigned long *companion_revision);
62f29dbc25Smrg    unsigned long init_read_pci(unsigned long address);
63f29dbc25Smrg    int init_read_base_addresses(INIT_BASE_ADDRESSES * base_addresses);
64f29dbc25Smrg    int init_read_cpu_frequency(unsigned long *cpu_frequency);
65f29dbc25Smrg
66f29dbc25Smrg/*----------------------------------------*/
67f29dbc25Smrg/* GRAPHICS PROCESSOR ROUTINE DEFINITIONS */
68f29dbc25Smrg/*----------------------------------------*/
69f29dbc25Smrg
70f29dbc25Smrg    void gp_set_limit_on_buffer_lead(unsigned long lead);
71f29dbc25Smrg    void gp_set_command_buffer_base(unsigned long address,
7204007ebaSmrg                                    unsigned long start, unsigned long stop);
73f29dbc25Smrg    void gp_set_frame_buffer_base(unsigned long address, unsigned long size);
74f29dbc25Smrg    void gp_set_bpp(int bpp);
75f29dbc25Smrg    void gp_declare_blt(unsigned long flags);
76f29dbc25Smrg    void gp_declare_vector(unsigned long flags);
77f29dbc25Smrg    void gp_write_parameters(void);
78f29dbc25Smrg    void gp_set_raster_operation(unsigned char ROP);
79f29dbc25Smrg    void gp_set_alpha_operation(int alpha_operation, int alpha_type,
8004007ebaSmrg                                int channel, int apply_alpha,
8104007ebaSmrg                                unsigned char alpha);
82f29dbc25Smrg    void gp_set_solid_pattern(unsigned long color);
83f29dbc25Smrg    void gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
8404007ebaSmrg                             unsigned long data0, unsigned long data1,
8504007ebaSmrg                             int transparent, int x, int y);
86f29dbc25Smrg    void gp_set_pattern_origin(int x, int y);
8704007ebaSmrg    void gp_set_color_pattern(unsigned long *pattern, int format, int x, int y);
88f29dbc25Smrg    void gp_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
8904007ebaSmrg                            int transparent);
90f29dbc25Smrg    void gp_set_solid_source(unsigned long color);
91f29dbc25Smrg    void gp_set_source_transparency(unsigned long color, unsigned long mask);
92f29dbc25Smrg    void gp_program_lut(unsigned long *colors, int full_lut);
93f29dbc25Smrg    void gp_set_vector_pattern(unsigned long pattern, unsigned long color,
9404007ebaSmrg                               int length);
95f29dbc25Smrg    void gp_set_strides(unsigned long dst_stride, unsigned long src_stride);
96f29dbc25Smrg    void gp_set_source_format(int format);
97f29dbc25Smrg    void gp_pattern_fill(unsigned long dstoffset, unsigned long width,
9804007ebaSmrg                         unsigned long height);
99f29dbc25Smrg    void gp_screen_to_screen_blt(unsigned long dstoffset,
10004007ebaSmrg                                 unsigned long srcoffset, unsigned long width,
10104007ebaSmrg                                 unsigned long height, int flags);
102f29dbc25Smrg    void gp_screen_to_screen_convert(unsigned long dstoffset,
10304007ebaSmrg                                     unsigned long srcoffset,
10404007ebaSmrg                                     unsigned long width, unsigned long height,
10504007ebaSmrg                                     int nibble);
106f29dbc25Smrg    void gp_color_bitmap_to_screen_blt(unsigned long dstoffset,
10704007ebaSmrg                                       unsigned long srcx, unsigned long width,
10804007ebaSmrg                                       unsigned long height,
10904007ebaSmrg                                       unsigned char *data, long pitch);
110f29dbc25Smrg    void gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx,
11104007ebaSmrg                              unsigned long width, unsigned long height,
11204007ebaSmrg                              unsigned char *data, long pitch);
113f29dbc25Smrg    void gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx,
11404007ebaSmrg                               unsigned long width, unsigned long height,
11504007ebaSmrg                               unsigned char *data, long pitch);
116f29dbc25Smrg    void gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset,
11704007ebaSmrg                       unsigned long width, unsigned long height, int degrees);
118f29dbc25Smrg    void gp_mono_bitmap_to_screen_blt(unsigned long dstoffset,
11904007ebaSmrg                                      unsigned long srcx, unsigned long width,
12004007ebaSmrg                                      unsigned long height, unsigned char *data,
12104007ebaSmrg                                      long stride);
122f29dbc25Smrg    void gp_text_blt(unsigned long dstoffset, unsigned long width,
12304007ebaSmrg                     unsigned long height, unsigned char *data);
124f29dbc25Smrg    void gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset,
12504007ebaSmrg                            unsigned long srcx, unsigned long width,
12604007ebaSmrg                            unsigned long height, int byte_packed);
127f29dbc25Smrg    void gp_antialiased_text(unsigned long dstoffset, unsigned long srcx,
12804007ebaSmrg                             unsigned long width, unsigned long height,
12904007ebaSmrg                             unsigned char *data, long stride, int fourbpp);
13004007ebaSmrg    void gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx,
13104007ebaSmrg                           unsigned long width, unsigned long height,
13204007ebaSmrg                           unsigned long, long stride, int operation,
13304007ebaSmrg                           int fourbpp);
13404007ebaSmrg    void gp_masked_blt(unsigned long dstoffset, unsigned long width,
13504007ebaSmrg                       unsigned long height, unsigned long mono_srcx,
13604007ebaSmrg                       unsigned long color_srcx, unsigned char *mono_mask,
13704007ebaSmrg                       unsigned char *color_data, long mono_pitch,
13804007ebaSmrg                       long color_pitch);
139f29dbc25Smrg    void gp_screen_to_screen_masked(unsigned long dstoffset,
14004007ebaSmrg                                    unsigned long srcoffset,
14104007ebaSmrg                                    unsigned long width, unsigned long height,
14204007ebaSmrg                                    unsigned long mono_srcx,
14304007ebaSmrg                                    unsigned char *mono_mask, long mono_pitch);
144f29dbc25Smrg    void gp_bresenham_line(unsigned long dstoffset, unsigned short length,
14504007ebaSmrg                           unsigned short initerr, unsigned short axialerr,
14604007ebaSmrg                           unsigned short diagerr, unsigned long flags);
147f29dbc25Smrg    void gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0,
14804007ebaSmrg                                unsigned long y0, unsigned long x1,
14904007ebaSmrg                                unsigned long y1, int inclusive);
150f29dbc25Smrg
151f29dbc25Smrg    int gp_test_blt_pending(void);
152f29dbc25Smrg    void gp_wait_blt_pending(void);
153f29dbc25Smrg    void gp_wait_until_idle(void);
154f29dbc25Smrg    int gp_test_blt_busy(void);
155f29dbc25Smrg    void gp_save_state(GP_SAVE_RESTORE * gp_state);
156f29dbc25Smrg    void gp_restore_state(GP_SAVE_RESTORE * gp_state);
157f29dbc25Smrg
158f29dbc25Smrg/*----------------------------------------*/
159f29dbc25Smrg/* VIDEO GENERATOR ROUTINE DEFINITIONS    */
160f29dbc25Smrg/*----------------------------------------*/
161f29dbc25Smrg
162f29dbc25Smrg    int vg_delay_milliseconds(unsigned long ms);
163f29dbc25Smrg    int vg_set_display_mode(unsigned long src_width, unsigned long src_height,
16404007ebaSmrg                            unsigned long dst_width, unsigned long dst_height,
16504007ebaSmrg                            int bpp, int hz, unsigned long flags);
166f29dbc25Smrg    int vg_set_panel_mode(unsigned long src_width, unsigned long src_height,
16704007ebaSmrg                          unsigned long dst_width, unsigned long dst_height,
16804007ebaSmrg                          unsigned long panel_width, unsigned long panel_height,
16904007ebaSmrg                          int bpp, unsigned long flags);
170f29dbc25Smrg    int vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height,
17104007ebaSmrg                       unsigned long encoder, unsigned long tvres, int bpp,
17204007ebaSmrg                       unsigned long flags, unsigned long h_overscan,
17304007ebaSmrg                       unsigned long v_overscan);
174f29dbc25Smrg    int vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp);
175f29dbc25Smrg    int vg_set_display_bpp(int bpp);
176f29dbc25Smrg    int vg_get_display_mode_index(VG_QUERY_MODE * query);
177f29dbc25Smrg    int vg_get_display_mode_information(unsigned int index,
17804007ebaSmrg                                        VG_DISPLAY_MODE * vg_mode);
179f29dbc25Smrg    int vg_get_display_mode_count(void);
180f29dbc25Smrg    int vg_get_current_display_mode(VG_DISPLAY_MODE * current_display,
18104007ebaSmrg                                    int *bpp);
182f29dbc25Smrg    int vg_set_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]);
183f29dbc25Smrg    int vg_configure_flicker_filter(unsigned long flicker_strength,
18404007ebaSmrg                                    int flicker_alpha);
185f29dbc25Smrg    int vg_set_clock_frequency(unsigned long frequency,
18604007ebaSmrg                               unsigned long pll_flags);
187f29dbc25Smrg    int vg_set_border_color(unsigned long border_color);
188f29dbc25Smrg    int vg_set_cursor_enable(int enable);
18904007ebaSmrg    int vg_set_mono_cursor_colors(unsigned long bkcolor, unsigned long fgcolor);
190f29dbc25Smrg    int vg_set_cursor_position(long xpos, long ypos,
19104007ebaSmrg                               VG_PANNING_COORDINATES * panning);
192f29dbc25Smrg    int vg_set_mono_cursor_shape32(unsigned long memoffset,
19304007ebaSmrg                                   unsigned long *andmask,
19404007ebaSmrg                                   unsigned long *xormask,
19504007ebaSmrg                                   unsigned long x_hotspot,
19604007ebaSmrg                                   unsigned long y_hotspot);
197f29dbc25Smrg    int vg_set_mono_cursor_shape64(unsigned long memoffset,
19804007ebaSmrg                                   unsigned long *andmask,
19904007ebaSmrg                                   unsigned long *xormask,
20004007ebaSmrg                                   unsigned long x_hotspot,
20104007ebaSmrg                                   unsigned long y_hotspot);
20204007ebaSmrg    int vg_set_color_cursor_shape(unsigned long memoffset, unsigned char *data,
20304007ebaSmrg                                  unsigned long width, unsigned long height,
20404007ebaSmrg                                  long pitch, unsigned long x_hotspot,
20504007ebaSmrg                                  unsigned long y_hotspot);
206f29dbc25Smrg    int vg_pan_desktop(unsigned long x, unsigned long y,
20704007ebaSmrg                       VG_PANNING_COORDINATES * panning);
208f29dbc25Smrg    int vg_set_display_offset(unsigned long address);
209f29dbc25Smrg    int vg_set_display_pitch(unsigned long pitch);
210f29dbc25Smrg    int vg_set_display_palette_entry(unsigned long index,
21104007ebaSmrg                                     unsigned long palette);
212f29dbc25Smrg    int vg_set_display_palette(unsigned long *palette);
213f29dbc25Smrg    int vg_set_compression_enable(int enable);
214f29dbc25Smrg    int vg_configure_compression(VG_COMPRESSION_DATA * comp_data);
215f29dbc25Smrg    int vg_test_timing_active(void);
216f29dbc25Smrg    int vg_test_vertical_active(void);
217f29dbc25Smrg    int vg_wait_vertical_blank(void);
218f29dbc25Smrg    int vg_test_even_field(void);
219f29dbc25Smrg    int vg_configure_line_interrupt(VG_INTERRUPT_PARAMS * interrupt_info);
220f29dbc25Smrg    unsigned long vg_test_and_clear_interrupt(void);
221f29dbc25Smrg    unsigned long vg_test_flip_status(void);
222f29dbc25Smrg    int vg_save_state(VG_SAVE_RESTORE * vg_state);
223f29dbc25Smrg    int vg_restore_state(VG_SAVE_RESTORE * vg_state);
224f29dbc25Smrg
225f29dbc25Smrg/*----------------------------------------*/
226f29dbc25Smrg/* VIDEO GENERATOR READ ROUTINES          */
227f29dbc25Smrg/*----------------------------------------*/
228f29dbc25Smrg
229f29dbc25Smrg    unsigned long vg_read_graphics_crc(int crc_source);
230f29dbc25Smrg    unsigned long vg_read_window_crc(int crc_source, unsigned long x,
23104007ebaSmrg                                     unsigned long y, unsigned long width,
23204007ebaSmrg                                     unsigned long height);
233f29dbc25Smrg    int vg_get_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]);
234f29dbc25Smrg    int vg_get_flicker_filter_configuration(unsigned long *strength,
23504007ebaSmrg                                            int *flicker_alpha);
236f29dbc25Smrg    unsigned long vg_get_display_pitch(void);
237f29dbc25Smrg    unsigned long vg_get_frame_buffer_line_size(void);
238f29dbc25Smrg    unsigned long vg_get_current_vline(void);
239f29dbc25Smrg    unsigned long vg_get_display_offset(void);
240f29dbc25Smrg    int vg_get_cursor_info(VG_CURSOR_DATA * cursor_data);
24104007ebaSmrg    int vg_get_display_palette_entry(unsigned long index, unsigned long *entry);
242f29dbc25Smrg    unsigned long vg_get_border_color(void);
243f29dbc25Smrg    int vg_get_display_palette(unsigned long *palette);
244f29dbc25Smrg    int vg_get_compression_info(VG_COMPRESSION_DATA * comp_data);
245f29dbc25Smrg    int vg_get_compression_enable(void);
246f29dbc25Smrg    int vg_get_valid_bit(int line);
247f29dbc25Smrg
248f29dbc25Smrg/*----------------------------------------*/
249f29dbc25Smrg/* DISPLAY FILTER ROUTINE DEFINITIONS     */
250f29dbc25Smrg/*----------------------------------------*/
251f29dbc25Smrg
252f29dbc25Smrg    int df_set_crt_enable(int crt_output);
253f29dbc25Smrg    int df_set_panel_enable(int panel_output);
254f29dbc25Smrg    int df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd,
25504007ebaSmrg                                  DF_VIDEO_SOURCE_PARAMS * video_source_even);
256f29dbc25Smrg    int df_set_video_offsets(int even, unsigned long y_offset,
25704007ebaSmrg                             unsigned long u_offset, unsigned long v_offset);
258f29dbc25Smrg    int df_set_video_scale(unsigned long src_width, unsigned long src_height,
25904007ebaSmrg                           unsigned long dst_width, unsigned long dst_height,
26004007ebaSmrg                           unsigned long flags);
261f29dbc25Smrg    int df_set_video_position(DF_VIDEO_POSITION * video_window);
262f29dbc25Smrg    int df_set_video_filter_coefficients(long taps[][4], int phase256);
263f29dbc25Smrg    int df_set_video_enable(int enable, unsigned long flags);
264f29dbc25Smrg    int df_set_video_color_key(unsigned long key, unsigned long mask,
26504007ebaSmrg                               int graphics);
266f29dbc25Smrg    int df_set_video_palette(unsigned long *palette);
26704007ebaSmrg    int df_set_video_palette_entry(unsigned long index, unsigned long palette);
268f29dbc25Smrg    int df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *
26904007ebaSmrg                                            cursor_color_key);
270f29dbc25Smrg    int df_set_video_cursor_color_key_enable(int enable);
271f29dbc25Smrg    int df_configure_alpha_window(int window,
27204007ebaSmrg                                  DF_ALPHA_REGION_PARAMS * alpha_data);
273f29dbc25Smrg    int df_set_alpha_window_enable(int window, int enable);
274f29dbc25Smrg    int df_set_no_ck_outside_alpha(int enable);
275f29dbc25Smrg    int df_set_video_request(unsigned long x, unsigned long y);
276f29dbc25Smrg    int df_set_output_color_space(int color_space);
277f29dbc25Smrg    int df_set_output_path(int format);
278f29dbc25Smrg    unsigned long df_test_video_flip_status(void);
279f29dbc25Smrg    int df_save_state(DF_SAVE_RESTORE * gp_state);
280f29dbc25Smrg    int df_restore_state(DF_SAVE_RESTORE * gp_state);
281f29dbc25Smrg
282f29dbc25Smrg/*----------------------------------------*/
283f29dbc25Smrg/*    DISPLAY FILTER READ ROUTINES        */
284f29dbc25Smrg/*----------------------------------------*/
285f29dbc25Smrg
286f29dbc25Smrg    unsigned long df_read_composite_crc(int crc_source);
287f29dbc25Smrg    unsigned long df_read_composite_window_crc(unsigned long x,
28804007ebaSmrg                                               unsigned long y,
28904007ebaSmrg                                               unsigned long width,
29004007ebaSmrg                                               unsigned long height,
29104007ebaSmrg                                               int source);
292f29dbc25Smrg    unsigned long df_read_panel_crc(void);
293f29dbc25Smrg    int df_get_video_enable(int *enable, unsigned long *flags);
294f29dbc25Smrg    int df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS *
29504007ebaSmrg                                          video_source_odd,
29604007ebaSmrg                                          DF_VIDEO_SOURCE_PARAMS *
29704007ebaSmrg                                          video_source_even);
298f29dbc25Smrg    int df_get_video_position(DF_VIDEO_POSITION * video_window);
299f29dbc25Smrg    int df_get_video_scale(unsigned long *x_scale, unsigned long *y_scale);
300f29dbc25Smrg    int df_get_video_filter_coefficients(long taps[][4], int *phase256);
301f29dbc25Smrg    int df_get_video_color_key(unsigned long *key, unsigned long *mask,
30204007ebaSmrg                               int *graphics);
30304007ebaSmrg    int df_get_video_palette_entry(unsigned long index, unsigned long *palette);
304f29dbc25Smrg    int df_get_video_palette(unsigned long *palette);
305f29dbc25Smrg    int df_get_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *
30604007ebaSmrg                                      cursor_color_key);
307f29dbc25Smrg    int df_get_video_cursor_color_key_enable(void);
308f29dbc25Smrg    int df_get_alpha_window_configuration(int window,
30904007ebaSmrg                                          DF_ALPHA_REGION_PARAMS * alpha_data);
310f29dbc25Smrg    int df_get_alpha_window_enable(int window);
311f29dbc25Smrg    int df_get_video_request(unsigned long *x, unsigned long *y);
312f29dbc25Smrg    int df_get_output_color_space(int *color_space);
313f29dbc25Smrg
314f29dbc25Smrg/*----------------------------------------*/
315f29dbc25Smrg/*        MSR ROUTINE DEFINITIONS         */
316f29dbc25Smrg/*----------------------------------------*/
317f29dbc25Smrg
318f29dbc25Smrg    int msr_init_table(void);
319f29dbc25Smrg    int msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes);
320f29dbc25Smrg    int msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices);
321f29dbc25Smrg    int msr_read64(unsigned long device, unsigned long msr_register,
32204007ebaSmrg                   Q_WORD * msr_value);
323f29dbc25Smrg    int msr_write64(unsigned long device, unsigned long msr_register,
32404007ebaSmrg                    Q_WORD * msr_value);
325f29dbc25Smrg
326f29dbc25Smrg/*----------------------------------------*/
327f29dbc25Smrg/*        VIP ROUTINE DEFINITIONS         */
328f29dbc25Smrg/*----------------------------------------*/
329f29dbc25Smrg
330f29dbc25Smrg    int vip_initialize(VIPSETMODEBUFFER * buffer);
331f29dbc25Smrg    int vip_update_601_params(VIP_601PARAMS * buffer);
332f29dbc25Smrg    int vip_terminate(void);
33304007ebaSmrg    int vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer);
334f29dbc25Smrg    int vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER * buffer);
335f29dbc25Smrg    int vip_max_address_enable(unsigned long max_address, int enable);
336f29dbc25Smrg    int vip_set_interrupt_enable(unsigned long mask, int enable);
337f29dbc25Smrg    unsigned long vip_get_interrupt_state(void);
338f29dbc25Smrg    int vip_set_capture_state(unsigned long state);
339f29dbc25Smrg    int vip_set_vsync_error(unsigned long vertical_count,
34004007ebaSmrg                            unsigned long window_before,
34104007ebaSmrg                            unsigned long window_after, int enable);
342f29dbc25Smrg    int vip_configure_fifo(unsigned long fifo_type, unsigned long fifo_size);
343f29dbc25Smrg    int vip_set_loopback_enable(int bEnable);
344f29dbc25Smrg    int vip_configure_genlock(VIPGENLOCKBUFFER * buffer);
345f29dbc25Smrg    int vip_set_genlock_enable(int bEnable);
346f29dbc25Smrg    int vip_configure_pages(int page_count, unsigned long page_offset);
347f29dbc25Smrg    int vip_set_interrupt_line(int line);
348f29dbc25Smrg    int vip_reset(void);
349f29dbc25Smrg    int vip_set_subwindow_enable(VIPSUBWINDOWBUFFER * buffer);
350f29dbc25Smrg    int vip_reset_interrupt_state(unsigned long interrupt_mask);
351f29dbc25Smrg
352f29dbc25Smrg    int vip_save_state(VIPSTATEBUFFER * save_buffer);
353f29dbc25Smrg    int vip_restore_state(VIPSTATEBUFFER * restore_buffer);
354f29dbc25Smrg    int vip_set_power_characteristics(VIPPOWERBUFFER * buffer);
355f29dbc25Smrg    int vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer);
356f29dbc25Smrg    int vip_set_debug_characteristics(VIPDEBUGBUFFER * buffer);
357f29dbc25Smrg    int vip_test_genlock_active(void);
358f29dbc25Smrg    int vip_test_signal_status(void);
359f29dbc25Smrg    unsigned long vip_get_current_field(void);
360f29dbc25Smrg
361f29dbc25Smrg/*----------------------------------------*/
362f29dbc25Smrg/*        VIP READ ROUTINES               */
363f29dbc25Smrg/*----------------------------------------*/
364f29dbc25Smrg
365f29dbc25Smrg    int vip_get_current_mode(VIPSETMODEBUFFER * buffer);
366f29dbc25Smrg    int vip_get_601_configuration(VIP_601PARAMS * buffer);
36704007ebaSmrg    int vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer);
368f29dbc25Smrg    int vip_get_genlock_configuration(VIPGENLOCKBUFFER * buffer);
369f29dbc25Smrg    int vip_get_genlock_enable(void);
370f29dbc25Smrg    int vip_is_buffer_update_latched(void);
371f29dbc25Smrg    unsigned long vip_get_capture_state(void);
372f29dbc25Smrg    unsigned long vip_get_current_line(void);
373f29dbc25Smrg    unsigned long vip_read_fifo(unsigned long fifo_address);
374f29dbc25Smrg    int vip_write_fifo(unsigned long fifo_address, unsigned long fifo_data);
375f29dbc25Smrg    int vip_enable_fifo_access(int enable);
376f29dbc25Smrg    int vip_get_capability_characteristics(VIPCAPABILITIESBUFFER * buffer);
377f29dbc25Smrg    int vip_get_power_characteristics(VIPPOWERBUFFER * buffer);
378f29dbc25Smrg    int vip_get_priority_characteristics(VIPPRIORITYBUFFER * buffer);
379f29dbc25Smrg
380f29dbc25Smrg/*----------------------------------------*/
381f29dbc25Smrg/*        VOP ROUTINE DEFINITIONS         */
382f29dbc25Smrg/*----------------------------------------*/
383f29dbc25Smrg
384f29dbc25Smrg    int vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer);
385f29dbc25Smrg    int vop_enable_vbi_output(int enable);
386f29dbc25Smrg    int vop_set_configuration(VOPCONFIGURATIONBUFFER * config);
387f29dbc25Smrg    int vop_save_state(VOPSTATEBUFFER * save_buffer);
388f29dbc25Smrg    int vop_restore_state(VOPSTATEBUFFER * save_buffer);
389f29dbc25Smrg
390f29dbc25Smrg/*----------------------------------------*/
391f29dbc25Smrg/*        VOP READ ROUTINES               */
392f29dbc25Smrg/*----------------------------------------*/
393f29dbc25Smrg
394f29dbc25Smrg    int vop_get_current_mode(VOPCONFIGURATIONBUFFER * config);
395f29dbc25Smrg    int vop_get_vbi_configuration(VOPVBIWINDOWBUFFER * buffer);
396f29dbc25Smrg    int vop_get_vbi_enable(void);
397f29dbc25Smrg    unsigned long vop_get_crc(void);
398f29dbc25Smrg    unsigned long vop_read_vbi_crc(void);
399f29dbc25Smrg
400f29dbc25Smrg/* CLOSE BRACKET FOR C++ COMPLILATION */
401f29dbc25Smrg
402f29dbc25Smrg#ifdef __cplusplus
403f29dbc25Smrg}
404f29dbc25Smrg#endif
405f29dbc25Smrg#endif
406