171d7fec4Smrg/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/gfx_rtns.h,v 1.1 2002/12/10 15:12:25 alanh Exp $ */
271d7fec4Smrg/*
371d7fec4Smrg * $Workfile: gfx_rtns.h $
471d7fec4Smrg *
571d7fec4Smrg * This header file defines the Durango routines and variables used
671d7fec4Smrg * to access the memory mapped regions.
771d7fec4Smrg *
871d7fec4Smrg * NSC_LIC_ALTERNATIVE_PREAMBLE
971d7fec4Smrg *
1071d7fec4Smrg * Revision 1.0
1171d7fec4Smrg *
1271d7fec4Smrg * National Semiconductor Alternative GPL-BSD License
1371d7fec4Smrg *
1471d7fec4Smrg * National Semiconductor Corporation licenses this software
1571d7fec4Smrg * ("Software"):
1671d7fec4Smrg *
1771d7fec4Smrg *      Durango
1871d7fec4Smrg *
1971d7fec4Smrg * under one of the two following licenses, depending on how the
2071d7fec4Smrg * Software is received by the Licensee.
2171d7fec4Smrg *
2271d7fec4Smrg * If this Software is received as part of the Linux Framebuffer or
2371d7fec4Smrg * other GPL licensed software, then the GPL license designated
2471d7fec4Smrg * NSC_LIC_GPL applies to this Software; in all other circumstances
2571d7fec4Smrg * then the BSD-style license designated NSC_LIC_BSD shall apply.
2671d7fec4Smrg *
2771d7fec4Smrg * END_NSC_LIC_ALTERNATIVE_PREAMBLE */
2871d7fec4Smrg
2971d7fec4Smrg/* NSC_LIC_BSD
3071d7fec4Smrg *
3171d7fec4Smrg * National Semiconductor Corporation Open Source License for Durango
3271d7fec4Smrg *
3371d7fec4Smrg * (BSD License with Export Notice)
3471d7fec4Smrg *
3571d7fec4Smrg * Copyright (c) 1999-2001
3671d7fec4Smrg * National Semiconductor Corporation.
3771d7fec4Smrg * All rights reserved.
3871d7fec4Smrg *
3971d7fec4Smrg * Redistribution and use in source and binary forms, with or without
4071d7fec4Smrg * modification, are permitted provided that the following conditions
4171d7fec4Smrg * are met:
4271d7fec4Smrg *
4371d7fec4Smrg *   * Redistributions of source code must retain the above copyright
4471d7fec4Smrg *     notice, this list of conditions and the following disclaimer.
4571d7fec4Smrg *
4671d7fec4Smrg *   * Redistributions in binary form must reproduce the above
4771d7fec4Smrg *     copyright notice, this list of conditions and the following
4871d7fec4Smrg *     disclaimer in the documentation and/or other materials provided
4971d7fec4Smrg *     with the distribution.
5071d7fec4Smrg *
5171d7fec4Smrg *   * Neither the name of the National Semiconductor Corporation nor
5271d7fec4Smrg *     the names of its contributors may be used to endorse or promote
5371d7fec4Smrg *     products derived from this software without specific prior
5471d7fec4Smrg *     written permission.
5571d7fec4Smrg *
5671d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5771d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5871d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5971d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
6071d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
6171d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6271d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
6371d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
6471d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
6571d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
6671d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
6771d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
6871d7fec4Smrg * OF SUCH DAMAGE.
6971d7fec4Smrg *
7071d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
7171d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with
7271d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under
7371d7fec4Smrg * CURRENT (2001) U.S. export regulations this software
7471d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or
7571d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
7671d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
7771d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S.
7871d7fec4Smrg * has embargoed goods and services.
7971d7fec4Smrg *
8071d7fec4Smrg * END_NSC_LIC_BSD */
8171d7fec4Smrg
8271d7fec4Smrg/* NSC_LIC_GPL
8371d7fec4Smrg *
8471d7fec4Smrg * National Semiconductor Corporation Gnu General Public License for Durango
8571d7fec4Smrg *
8671d7fec4Smrg * (GPL License with Export Notice)
8771d7fec4Smrg *
8871d7fec4Smrg * Copyright (c) 1999-2001
8971d7fec4Smrg * National Semiconductor Corporation.
9071d7fec4Smrg * All rights reserved.
9171d7fec4Smrg *
9271d7fec4Smrg * Redistribution and use in source and binary forms, with or without
9371d7fec4Smrg * modification, are permitted under the terms of the GNU General
9471d7fec4Smrg * Public License as published by the Free Software Foundation; either
9571d7fec4Smrg * version 2 of the License, or (at your option) any later version
9671d7fec4Smrg *
9771d7fec4Smrg * In addition to the terms of the GNU General Public License, neither
9871d7fec4Smrg * the name of the National Semiconductor Corporation nor the names of
9971d7fec4Smrg * its contributors may be used to endorse or promote products derived
10071d7fec4Smrg * from this software without specific prior written permission.
10171d7fec4Smrg *
10271d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10371d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10471d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
10571d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
10671d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
10771d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10871d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
10971d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
11071d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
11171d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
11271d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
11371d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
11471d7fec4Smrg * OF SUCH DAMAGE. See the GNU General Public License for more details.
11571d7fec4Smrg *
11671d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
11771d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with
11871d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under
11971d7fec4Smrg * CURRENT (2001) U.S. export regulations this software
12071d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or
12171d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
12271d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
12371d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S.
12471d7fec4Smrg * has embargoed goods and services.
12571d7fec4Smrg *
12671d7fec4Smrg * You should have received a copy of the GNU General Public License
12771d7fec4Smrg * along with this file; if not, write to the Free Software Foundation,
12871d7fec4Smrg * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12971d7fec4Smrg *
13071d7fec4Smrg * END_NSC_LIC_GPL */
13171d7fec4Smrg
13271d7fec4Smrg#ifndef _gfx_rtns_h
13371d7fec4Smrg#define _gfx_rtns_h
13471d7fec4Smrg
13571d7fec4Smrg/* INCLUDE DURANGO DEFINITIONS */
13671d7fec4Smrg/* These definitions are placed in another file to allow their inclusion      */
13771d7fec4Smrg/* in a user application.  Such applications generally work through driver    */
13871d7fec4Smrg/* shell routines that simply pass their parameters to Durango routines.      */
13971d7fec4Smrg/* An external file provides an easy way to provide the definitions for these */
14071d7fec4Smrg/* parameters without the applications gaining any Durango visisbility.       */
14171d7fec4Smrg
14271d7fec4Smrg#include "gfx_type.h"
14371d7fec4Smrg
14471d7fec4Smrg/* COMPILER OPTION FOR C++ PROGRAMS */
14571d7fec4Smrg
14671d7fec4Smrg#ifdef __cplusplus
14771d7fec4Smrgextern "C"
14871d7fec4Smrg{
14971d7fec4Smrg#endif
15071d7fec4Smrg
15171d7fec4Smrg/* DURANGO MEMORY POINTERS */
15271d7fec4Smrg
15371d7fec4Smrg   extern unsigned char *gfx_virt_regptr;
15471d7fec4Smrg   extern unsigned char *gfx_virt_fbptr;
15571d7fec4Smrg   extern unsigned char *gfx_virt_vidptr;
15671d7fec4Smrg   extern unsigned char *gfx_virt_vipptr;
15771d7fec4Smrg   extern unsigned char *gfx_virt_spptr;
15871d7fec4Smrg   extern unsigned char *gfx_virt_gpptr;
15971d7fec4Smrg
16071d7fec4Smrg   extern unsigned char *gfx_phys_regptr;
16171d7fec4Smrg   extern unsigned char *gfx_phys_fbptr;
16271d7fec4Smrg   extern unsigned char *gfx_phys_vidptr;
16371d7fec4Smrg   extern unsigned char *gfx_phys_vipptr;
16471d7fec4Smrg   extern unsigned char *gfx_phys_spptr;
16571d7fec4Smrg   extern unsigned char *gfx_phys_gpptr;
16671d7fec4Smrg
16771d7fec4Smrg/* DURANGO VARIBLES FOR RUNTIME SELECTION AND POSSIBLE VALUES */
16871d7fec4Smrg
16971d7fec4Smrg   extern int gfx_display_type;
17071d7fec4Smrg#define GFX_DISPLAY_TYPE_GU1		0x0001
17171d7fec4Smrg#define GFX_DISPLAY_TYPE_GU2		0x0002
17271d7fec4Smrg
17371d7fec4Smrg   extern int gfx_init_type;
17471d7fec4Smrg#define GFX_INIT_TYPE_GU1           0x0001
17571d7fec4Smrg#define GFX_INIT_TYPE_GU2           0x0002
17671d7fec4Smrg
17771d7fec4Smrg   extern int gfx_msr_type;
17871d7fec4Smrg#define GFX_MSR_TYPE_REDCLOUD       0x0001
17971d7fec4Smrg
18071d7fec4Smrg   extern int gfx_2daccel_type;
18171d7fec4Smrg#define GFX_2DACCEL_TYPE_GU1		0x0001
18271d7fec4Smrg#define GFX_2DACCEL_TYPE_GU2		0x0002
18371d7fec4Smrg
18471d7fec4Smrg   extern int gfx_video_type;
18571d7fec4Smrg#define GFX_VIDEO_TYPE_CS5530		0x0001
18671d7fec4Smrg#define GFX_VIDEO_TYPE_SC1200		0x0002
18771d7fec4Smrg#define GFX_VIDEO_TYPE_REDCLOUD     0x0004
18871d7fec4Smrg
18971d7fec4Smrg   extern int gfx_vip_type;
19071d7fec4Smrg#define GFX_VIP_TYPE_SC1200			0x0001
19171d7fec4Smrg
19271d7fec4Smrg   extern int gfx_decoder_type;
19371d7fec4Smrg#define GFX_DECODER_TYPE_SAA7114	0x0001
19471d7fec4Smrg
19571d7fec4Smrg   extern int gfx_tv_type;
19671d7fec4Smrg#define GFX_TV_TYPE_SC1200			0x0001
19771d7fec4Smrg#define GFX_TV_TYPE_FS451			0x0002
19871d7fec4Smrg
19971d7fec4Smrg   extern int gfx_i2c_type;
20071d7fec4Smrg#define GFX_I2C_TYPE_ACCESS			0x0001
20171d7fec4Smrg#define GFX_I2C_TYPE_GPIO			0x0002
20271d7fec4Smrg
20371d7fec4Smrg/* GLOBAL CPU INFORMATION */
20471d7fec4Smrg
20571d7fec4Smrg   extern unsigned long gfx_cpu_version;
20671d7fec4Smrg   extern unsigned long gfx_cpu_frequency;
20771d7fec4Smrg   extern unsigned long gfx_vid_version;
20871d7fec4Smrg   extern ChipType gfx_chip_revision;
20971d7fec4Smrg
21071d7fec4Smrg/* ROUTINES IN GFX_INIT.C */
21171d7fec4Smrg
21271d7fec4Smrg   unsigned long gfx_pci_config_read(unsigned long address);
21371d7fec4Smrg   void gfx_pci_config_write(unsigned long address, unsigned long data);
21471d7fec4Smrg   unsigned long gfx_get_core_freq(void);
21571d7fec4Smrg   unsigned long gfx_detect_cpu(void);
21671d7fec4Smrg   unsigned long gfx_detect_video(void);
21771d7fec4Smrg   unsigned long gfx_get_cpu_register_base(void);
21871d7fec4Smrg   unsigned long gfx_get_graphics_register_base(void);
21971d7fec4Smrg   unsigned long gfx_get_frame_buffer_base(void);
22071d7fec4Smrg   unsigned long gfx_get_frame_buffer_size(void);
22171d7fec4Smrg   unsigned long gfx_get_vid_register_base(void);
22271d7fec4Smrg   unsigned long gfx_get_vip_register_base(void);
22371d7fec4Smrg
22471d7fec4Smrg/* ROUTINES IN GFX_MSR.C */
22571d7fec4Smrg
22671d7fec4Smrg   int gfx_msr_init(void);
22771d7fec4Smrg   DEV_STATUS gfx_id_msr_device(MSR * pDev, unsigned long address);
22871d7fec4Smrg   DEV_STATUS gfx_get_msr_dev_address(unsigned int device,
22971d7fec4Smrg				      unsigned long *address);
23071d7fec4Smrg   DEV_STATUS gfx_get_glink_id_at_address(unsigned int *device,
23171d7fec4Smrg					  unsigned long address);
23271d7fec4Smrg   DEV_STATUS gfx_msr_read(unsigned int device, unsigned int msrRegister,
23371d7fec4Smrg			   Q_WORD * msrValue);
23471d7fec4Smrg   DEV_STATUS gfx_msr_write(unsigned int device, unsigned int msrRegister,
23571d7fec4Smrg			    Q_WORD * msrValue);
23671d7fec4Smrg
23771d7fec4Smrg/* ROUTINES IN GFX_DISP.C */
23871d7fec4Smrg
23971d7fec4Smrg   int gfx_set_display_bpp(unsigned short bpp);
24071d7fec4Smrg   int gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz);
24171d7fec4Smrg   int gfx_set_display_mode(int xres, int yres, int bpp, int hz);
24271d7fec4Smrg   int gfx_set_display_timings(unsigned short bpp, unsigned short flags,
24371d7fec4Smrg			       unsigned short hactive,
24471d7fec4Smrg			       unsigned short hblank_start,
24571d7fec4Smrg			       unsigned short hsync_start,
24671d7fec4Smrg			       unsigned short hsync_end,
24771d7fec4Smrg			       unsigned short hblank_end,
24871d7fec4Smrg			       unsigned short htotal, unsigned short vactive,
24971d7fec4Smrg			       unsigned short vblank_start,
25071d7fec4Smrg			       unsigned short vsync_start,
25171d7fec4Smrg			       unsigned short vsync_end,
25271d7fec4Smrg			       unsigned short vblank_end,
25371d7fec4Smrg			       unsigned short vtotal,
25471d7fec4Smrg			       unsigned long frequency);
25571d7fec4Smrg   int gfx_set_vtotal(unsigned short vtotal);
25671d7fec4Smrg   void gfx_set_display_pitch(unsigned short pitch);
25771d7fec4Smrg   void gfx_set_display_offset(unsigned long offset);
25871d7fec4Smrg   int gfx_set_display_palette_entry(unsigned long index,
25971d7fec4Smrg				     unsigned long palette);
26071d7fec4Smrg   int gfx_set_display_palette(unsigned long *palette);
26171d7fec4Smrg   void gfx_video_shutdown(void);
26271d7fec4Smrg   void gfx_set_clock_frequency(unsigned long frequency);
26371d7fec4Smrg   int gfx_set_crt_enable(int enable);
26471d7fec4Smrg   void gfx_set_cursor_enable(int enable);
26571d7fec4Smrg   void gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor);
26671d7fec4Smrg   void gfx_set_cursor_position(unsigned long memoffset,
26771d7fec4Smrg				unsigned short xpos, unsigned short ypos,
26871d7fec4Smrg				unsigned short xhotspot,
26971d7fec4Smrg				unsigned short yhotspot);
27071d7fec4Smrg   void gfx_set_cursor_shape32(unsigned long memoffset,
27171d7fec4Smrg			       unsigned long *andmask,
27271d7fec4Smrg			       unsigned long *xormask);
27371d7fec4Smrg   void gfx_set_cursor_shape64(unsigned long memoffset,
27471d7fec4Smrg			       unsigned long *andmask,
27571d7fec4Smrg			       unsigned long *xormask);
27671d7fec4Smrg   void gfx_set_icon_enable(int enable);
27771d7fec4Smrg   void gfx_set_icon_colors(unsigned long color0, unsigned long color1,
27871d7fec4Smrg			    unsigned long color2);
27971d7fec4Smrg   void gfx_set_icon_position(unsigned long memoffset, unsigned short xpos);
28071d7fec4Smrg   void gfx_set_icon_shape64(unsigned long memoffset, unsigned long *andmask,
28171d7fec4Smrg			     unsigned long *xormask, unsigned int lines);
28271d7fec4Smrg
28371d7fec4Smrg   int gfx_set_compression_enable(int enable);
28471d7fec4Smrg   int gfx_set_compression_offset(unsigned long offset);
28571d7fec4Smrg   int gfx_set_compression_pitch(unsigned short pitch);
28671d7fec4Smrg   int gfx_set_compression_size(unsigned short size);
28771d7fec4Smrg   void gfx_set_display_priority_high(int enable);
28871d7fec4Smrg   int gfx_test_timing_active(void);
28971d7fec4Smrg   int gfx_test_vertical_active(void);
29071d7fec4Smrg   int gfx_wait_vertical_blank(void);
29171d7fec4Smrg   void gfx_delay_milliseconds(unsigned long milliseconds);
29271d7fec4Smrg   void gfx_delay_microseconds(unsigned long microseconds);
29371d7fec4Smrg   void gfx_enable_panning(int x, int y);
29471d7fec4Smrg   int gfx_set_fixed_timings(int panelResX, int panelResY,
29571d7fec4Smrg			     unsigned short width, unsigned short height,
29671d7fec4Smrg			     unsigned short bpp);
29771d7fec4Smrg   int gfx_set_panel_present(int panelResX, int panelResY,
29871d7fec4Smrg			     unsigned short width, unsigned short height,
29971d7fec4Smrg			     unsigned short bpp);
30071d7fec4Smrg   void gfx_reset_timing_lock(void);
30171d7fec4Smrg
30271d7fec4Smrg/* "READ" ROUTINES IN GFX_DISP.C */
30371d7fec4Smrg
30471d7fec4Smrg   int gfx_get_display_details(unsigned int mode, int *xres, int *yres,
30571d7fec4Smrg			       int *hz);
30671d7fec4Smrg   unsigned short gfx_get_display_pitch(void);
30771d7fec4Smrg   int gfx_get_vsa2_softvga_enable(void);
30871d7fec4Smrg   int gfx_get_sync_polarities(void);
30971d7fec4Smrg   unsigned long gfx_get_clock_frequency(void);
31071d7fec4Smrg   unsigned long gfx_get_max_supported_pixel_clock(void);
31171d7fec4Smrg   int gfx_mode_frequency_supported(int xres, int yres, int bpp,
31271d7fec4Smrg				    unsigned long frequency);
31371d7fec4Smrg   int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp,
31471d7fec4Smrg					  int *hz, unsigned long frequency);
31571d7fec4Smrg   int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz,
31671d7fec4Smrg				     unsigned long frequency);
31771d7fec4Smrg   int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz,
31871d7fec4Smrg					  int *frequency);
31971d7fec4Smrg   int gfx_get_display_mode_count(void);
32071d7fec4Smrg   int gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz);
32171d7fec4Smrg   unsigned long gfx_get_frame_buffer_line_size(void);
32271d7fec4Smrg   unsigned short gfx_get_hactive(void);
32371d7fec4Smrg   unsigned short gfx_get_hblank_start(void);
32471d7fec4Smrg   unsigned short gfx_get_hsync_start(void);
32571d7fec4Smrg   unsigned short gfx_get_hsync_end(void);
32671d7fec4Smrg   unsigned short gfx_get_hblank_end(void);
32771d7fec4Smrg   unsigned short gfx_get_htotal(void);
32871d7fec4Smrg   unsigned short gfx_get_vactive(void);
32971d7fec4Smrg   unsigned short gfx_get_vline(void);
33071d7fec4Smrg   unsigned short gfx_get_vblank_start(void);
33171d7fec4Smrg   unsigned short gfx_get_vsync_start(void);
33271d7fec4Smrg   unsigned short gfx_get_vsync_end(void);
33371d7fec4Smrg   unsigned short gfx_get_vblank_end(void);
33471d7fec4Smrg   unsigned short gfx_get_vtotal(void);
33571d7fec4Smrg   unsigned short gfx_get_display_bpp(void);
33671d7fec4Smrg   unsigned long gfx_get_display_offset(void);
33771d7fec4Smrg   int gfx_get_display_palette_entry(unsigned long index,
33871d7fec4Smrg				     unsigned long *palette);
33971d7fec4Smrg   void gfx_get_display_palette(unsigned long *palette);
34071d7fec4Smrg   unsigned long gfx_get_cursor_enable(void);
34171d7fec4Smrg   unsigned long gfx_get_cursor_offset(void);
34271d7fec4Smrg   unsigned long gfx_get_cursor_position(void);
34371d7fec4Smrg   unsigned long gfx_get_cursor_clip(void);
34471d7fec4Smrg   unsigned long gfx_get_cursor_color(int color);
34571d7fec4Smrg   unsigned long gfx_get_icon_enable(void);
34671d7fec4Smrg   unsigned long gfx_get_icon_offset(void);
34771d7fec4Smrg   unsigned long gfx_get_icon_position(void);
34871d7fec4Smrg   unsigned long gfx_get_icon_color(int color);
34971d7fec4Smrg   int gfx_get_compression_enable(void);
35071d7fec4Smrg   unsigned long gfx_get_compression_offset(void);
35171d7fec4Smrg   unsigned short gfx_get_compression_pitch(void);
35271d7fec4Smrg   unsigned short gfx_get_compression_size(void);
35371d7fec4Smrg   int gfx_get_display_priority_high(void);
35471d7fec4Smrg   int gfx_get_valid_bit(int line);
35571d7fec4Smrg
35671d7fec4Smrg/* ROUTINES IN GFX_RNDR.C */
35771d7fec4Smrg
35871d7fec4Smrg   void gfx_set_bpp(unsigned short bpp);
35971d7fec4Smrg   void gfx_set_solid_pattern(unsigned long color);
36071d7fec4Smrg   void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor,
36171d7fec4Smrg			     unsigned long data0, unsigned long data1,
36271d7fec4Smrg			     unsigned char transparency);
36371d7fec4Smrg   void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor,
36471d7fec4Smrg			      unsigned long data0, unsigned long data1,
36571d7fec4Smrg			      unsigned long data2, unsigned long data3,
36671d7fec4Smrg			      unsigned char transparency);
36771d7fec4Smrg   void gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8);
36871d7fec4Smrg   void gfx_set_solid_source(unsigned long color);
36971d7fec4Smrg   void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor,
37071d7fec4Smrg			    unsigned short transparent);
37171d7fec4Smrg   void gfx_set_pattern_flags(unsigned short flags);
37271d7fec4Smrg   void gfx_set_raster_operation(unsigned char rop);
37371d7fec4Smrg   void gfx_pattern_fill(unsigned short x, unsigned short y,
37471d7fec4Smrg			 unsigned short width, unsigned short height);
37571d7fec4Smrg   void gfx_color_pattern_fill(unsigned short x, unsigned short y,
37671d7fec4Smrg			       unsigned short width, unsigned short height,
37771d7fec4Smrg			       unsigned long *pattern);
37871d7fec4Smrg   void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
37971d7fec4Smrg				 unsigned short dstx, unsigned short dsty,
38071d7fec4Smrg				 unsigned short width, unsigned short height);
38171d7fec4Smrg   void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
38271d7fec4Smrg				  unsigned short dstx, unsigned short dsty,
38371d7fec4Smrg				  unsigned short width, unsigned short height,
38471d7fec4Smrg				  unsigned long color);
38571d7fec4Smrg   void gfx_color_bitmap_to_screen_blt(unsigned short srcx,
38671d7fec4Smrg				       unsigned short srcy,
38771d7fec4Smrg				       unsigned short dstx,
38871d7fec4Smrg				       unsigned short dsty,
38971d7fec4Smrg				       unsigned short width,
39071d7fec4Smrg				       unsigned short height,
39171d7fec4Smrg				       unsigned char *data, long pitch);
39271d7fec4Smrg   void gfx_color_bitmap_to_screen_xblt(unsigned short srcx,
39371d7fec4Smrg					unsigned short srcy,
39471d7fec4Smrg					unsigned short dstx,
39571d7fec4Smrg					unsigned short dsty,
39671d7fec4Smrg					unsigned short width,
39771d7fec4Smrg					unsigned short height,
39871d7fec4Smrg					unsigned char *data, long pitch,
39971d7fec4Smrg					unsigned long color);
40071d7fec4Smrg   void gfx_mono_bitmap_to_screen_blt(unsigned short srcx,
40171d7fec4Smrg				      unsigned short srcy,
40271d7fec4Smrg				      unsigned short dstx,
40371d7fec4Smrg				      unsigned short dsty,
40471d7fec4Smrg				      unsigned short width,
40571d7fec4Smrg				      unsigned short height,
40671d7fec4Smrg				      unsigned char *data, short pitch);
40771d7fec4Smrg   void gfx_text_blt(unsigned short dstx, unsigned short dsty,
40871d7fec4Smrg		     unsigned short width, unsigned short height,
40971d7fec4Smrg		     unsigned char *data);
41071d7fec4Smrg   void gfx_bresenham_line(unsigned short x, unsigned short y,
41171d7fec4Smrg			   unsigned short length, unsigned short initerr,
41271d7fec4Smrg			   unsigned short axialerr, unsigned short diagerr,
41371d7fec4Smrg			   unsigned short flags);
41471d7fec4Smrg   void gfx_wait_until_idle(void);
41571d7fec4Smrg   int gfx_test_blt_pending(void);
41671d7fec4Smrg
41771d7fec4Smrg/* SECOND GENERATION RENDERING ROUTINES */
41871d7fec4Smrg
41971d7fec4Smrg   void gfx2_set_source_stride(unsigned short stride);
42071d7fec4Smrg   void gfx2_set_destination_stride(unsigned short stride);
42171d7fec4Smrg   void gfx2_set_pattern_origin(int x, int y);
42271d7fec4Smrg   void gfx2_set_source_transparency(unsigned long color, unsigned long mask);
42371d7fec4Smrg   void gfx2_set_alpha_mode(int mode);
42471d7fec4Smrg   void gfx2_set_alpha_value(unsigned char value);
42571d7fec4Smrg   void gfx2_pattern_fill(unsigned long dstoffset, unsigned short width,
42671d7fec4Smrg			  unsigned short height);
42771d7fec4Smrg   void gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width,
42871d7fec4Smrg				unsigned short height,
42971d7fec4Smrg				unsigned long *pattern);
43071d7fec4Smrg   void gfx2_screen_to_screen_blt(unsigned long srcoffset,
43171d7fec4Smrg				  unsigned long dstoffset,
43271d7fec4Smrg				  unsigned short width, unsigned short height,
43371d7fec4Smrg				  int flags);
43471d7fec4Smrg   void gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx,
43571d7fec4Smrg			     unsigned short srcy, unsigned long dstoffset,
43671d7fec4Smrg			     unsigned short width, unsigned short height,
43771d7fec4Smrg			     int byte_packed);
43871d7fec4Smrg   void gfx2_color_bitmap_to_screen_blt(unsigned short srcx,
43971d7fec4Smrg					unsigned short srcy,
44071d7fec4Smrg					unsigned long dstoffset,
44171d7fec4Smrg					unsigned short width,
44271d7fec4Smrg					unsigned short height,
44371d7fec4Smrg					unsigned char *data, short pitch);
44471d7fec4Smrg   void gfx2_mono_bitmap_to_screen_blt(unsigned short srcx,
44571d7fec4Smrg				       unsigned short srcy,
44671d7fec4Smrg				       unsigned long dstoffset,
44771d7fec4Smrg				       unsigned short width,
44871d7fec4Smrg				       unsigned short height,
44971d7fec4Smrg				       unsigned char *data, short pitch);
45071d7fec4Smrg   void gfx2_text_blt(unsigned long dstoffset, unsigned short width,
45171d7fec4Smrg		      unsigned short height, unsigned char *data);
45271d7fec4Smrg   void gfx2_bresenham_line(unsigned long dstoffset, unsigned short length,
45371d7fec4Smrg			    unsigned short initerr, unsigned short axialerr,
45471d7fec4Smrg			    unsigned short diagerr, unsigned short flags);
45571d7fec4Smrg   void gfx2_sync_to_vblank(void);
45671d7fec4Smrg
45771d7fec4Smrg/* ROUTINES IN GFX_VID.C */
45871d7fec4Smrg
45971d7fec4Smrg   int gfx_set_video_enable(int enable);
46071d7fec4Smrg   int gfx_set_video_format(unsigned long format);
46171d7fec4Smrg   int gfx_set_video_size(unsigned short width, unsigned short height);
46271d7fec4Smrg   int gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch);
46371d7fec4Smrg   int gfx_set_video_offset(unsigned long offset);
46471d7fec4Smrg   int gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
46571d7fec4Smrg				 unsigned long voffset);
46671d7fec4Smrg   int gfx_set_video_window(short x, short y, unsigned short w,
46771d7fec4Smrg			    unsigned short h);
46871d7fec4Smrg   int gfx_set_video_left_crop(unsigned short x);
46971d7fec4Smrg   int gfx_set_video_upscale(unsigned short srcw, unsigned short srch,
47071d7fec4Smrg			     unsigned short dstw, unsigned short dsth);
47171d7fec4Smrg   int gfx_set_video_scale(unsigned short srcw, unsigned short srch,
47271d7fec4Smrg			   unsigned short dstw, unsigned short dsth);
47371d7fec4Smrg   int gfx_set_video_vertical_downscale(unsigned short srch,
47471d7fec4Smrg					unsigned short dsth);
47571d7fec4Smrg   void gfx_set_video_vertical_downscale_enable(int enable);
47671d7fec4Smrg   int gfx_set_video_downscale_config(unsigned short type, unsigned short m);
47771d7fec4Smrg   int gfx_set_video_color_key(unsigned long key, unsigned long mask,
47871d7fec4Smrg			       int bluescreen);
47971d7fec4Smrg   int gfx_set_video_filter(int xfilter, int yfilter);
48071d7fec4Smrg   int gfx_set_video_palette(unsigned long *palette);
48171d7fec4Smrg   int gfx_set_video_palette_entry(unsigned long index, unsigned long color);
48271d7fec4Smrg   int gfx_set_video_downscale_coefficients(unsigned short coef1,
48371d7fec4Smrg					    unsigned short coef2,
48471d7fec4Smrg					    unsigned short coef3,
48571d7fec4Smrg					    unsigned short coef4);
48671d7fec4Smrg   int gfx_set_video_downscale_enable(int enable);
48771d7fec4Smrg   int gfx_set_video_source(VideoSourceType source);
48871d7fec4Smrg   int gfx_set_vbi_source(VbiSourceType source);
48971d7fec4Smrg   int gfx_set_vbi_lines(unsigned long even, unsigned long odd);
49071d7fec4Smrg   int gfx_set_vbi_total(unsigned long even, unsigned long odd);
49171d7fec4Smrg   int gfx_set_video_interlaced(int enable);
49271d7fec4Smrg   int gfx_set_color_space_YUV(int enable);
49371d7fec4Smrg   int gfx_set_vertical_scaler_offset(char offset);
49471d7fec4Smrg   int gfx_set_top_line_in_odd(int enable);
49571d7fec4Smrg   int gfx_set_genlock_delay(unsigned long delay);
49671d7fec4Smrg   int gfx_set_genlock_enable(int flags);
49771d7fec4Smrg   int gfx_set_video_cursor(unsigned long key, unsigned long mask,
49871d7fec4Smrg			    unsigned short select_color2,
49971d7fec4Smrg			    unsigned long color1, unsigned long color2);
50071d7fec4Smrg   int gfx_set_video_cursor_enable(int enable);
50171d7fec4Smrg   int gfx_set_video_request(short x, short y);
50271d7fec4Smrg
50371d7fec4Smrg   int gfx_select_alpha_region(int region);
50471d7fec4Smrg   int gfx_set_alpha_enable(int enable);
50571d7fec4Smrg   int gfx_set_alpha_window(short x, short y,
50671d7fec4Smrg			    unsigned short width, unsigned short height);
50771d7fec4Smrg   int gfx_set_alpha_value(unsigned char alpha, char delta);
50871d7fec4Smrg   int gfx_set_alpha_priority(int priority);
50971d7fec4Smrg   int gfx_set_alpha_color(unsigned long color);
51071d7fec4Smrg   int gfx_set_alpha_color_enable(int enable);
51171d7fec4Smrg   int gfx_set_no_ck_outside_alpha(int enable);
51271d7fec4Smrg   int gfx_disable_softvga(void);
51371d7fec4Smrg   int gfx_enable_softvga(void);
51471d7fec4Smrg   int gfx_set_macrovision_enable(int enable);
51571d7fec4Smrg
51671d7fec4Smrg/* READ ROUTINES IN GFX_VID.C */
51771d7fec4Smrg
51871d7fec4Smrg   int gfx_get_video_enable(void);
51971d7fec4Smrg   int gfx_get_video_format(void);
52071d7fec4Smrg   unsigned long gfx_get_video_src_size(void);
52171d7fec4Smrg   unsigned long gfx_get_video_line_size(void);
52271d7fec4Smrg   unsigned long gfx_get_video_xclip(void);
52371d7fec4Smrg   unsigned long gfx_get_video_offset(void);
52471d7fec4Smrg   void gfx_get_video_yuv_offsets(unsigned long *yoffset,
52571d7fec4Smrg				  unsigned long *uoffset,
52671d7fec4Smrg				  unsigned long *voffset);
52771d7fec4Smrg   void gfx_get_video_yuv_pitch(unsigned long *ypitch,
52871d7fec4Smrg				unsigned long *uvpitch);
52971d7fec4Smrg   unsigned long gfx_get_video_upscale(void);
53071d7fec4Smrg   unsigned long gfx_get_video_scale(void);
53171d7fec4Smrg   unsigned long gfx_get_video_downscale_delta(void);
53271d7fec4Smrg   int gfx_get_video_vertical_downscale_enable(void);
53371d7fec4Smrg   int gfx_get_video_downscale_config(unsigned short *type,
53471d7fec4Smrg				      unsigned short *m);
53571d7fec4Smrg   void gfx_get_video_downscale_coefficients(unsigned short *coef1,
53671d7fec4Smrg					     unsigned short *coef2,
53771d7fec4Smrg					     unsigned short *coef3,
53871d7fec4Smrg					     unsigned short *coef4);
53971d7fec4Smrg   void gfx_get_video_downscale_enable(int *enable);
54071d7fec4Smrg   unsigned long gfx_get_video_dst_size(void);
54171d7fec4Smrg   unsigned long gfx_get_video_position(void);
54271d7fec4Smrg   unsigned long gfx_get_video_color_key(void);
54371d7fec4Smrg   unsigned long gfx_get_video_color_key_mask(void);
54471d7fec4Smrg   int gfx_get_video_palette_entry(unsigned long index,
54571d7fec4Smrg				   unsigned long *palette);
54671d7fec4Smrg   int gfx_get_video_color_key_src(void);
54771d7fec4Smrg   int gfx_get_video_filter(void);
54871d7fec4Smrg   int gfx_get_video_request(short *x, short *y);
54971d7fec4Smrg   int gfx_get_video_source(VideoSourceType * source);
55071d7fec4Smrg   int gfx_get_vbi_source(VbiSourceType * source);
55171d7fec4Smrg   unsigned long gfx_get_vbi_lines(int odd);
55271d7fec4Smrg   unsigned long gfx_get_vbi_total(int odd);
55371d7fec4Smrg   int gfx_get_video_interlaced(void);
55471d7fec4Smrg   int gfx_get_color_space_YUV(void);
55571d7fec4Smrg   int gfx_get_vertical_scaler_offset(char *offset);
55671d7fec4Smrg   unsigned long gfx_get_genlock_delay(void);
55771d7fec4Smrg   int gfx_get_genlock_enable(void);
55871d7fec4Smrg   int gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
55971d7fec4Smrg			    unsigned short *select_color2,
56071d7fec4Smrg			    unsigned long *color1, unsigned short *color2);
56171d7fec4Smrg   unsigned long gfx_read_crc(void);
56271d7fec4Smrg   unsigned long gfx_read_crc32(void);
56371d7fec4Smrg   unsigned long gfx_read_window_crc(int source, unsigned short x,
56471d7fec4Smrg				     unsigned short y, unsigned short width,
56571d7fec4Smrg				     unsigned short height, int crc32);
56671d7fec4Smrg   int gfx_get_macrovision_enable(void);
56771d7fec4Smrg
56871d7fec4Smrg   void gfx_get_alpha_enable(int *enable);
56971d7fec4Smrg   void gfx_get_alpha_size(unsigned short *x, unsigned short *y,
57071d7fec4Smrg			   unsigned short *width, unsigned short *height);
57171d7fec4Smrg   void gfx_get_alpha_value(unsigned char *alpha, char *delta);
57271d7fec4Smrg   void gfx_get_alpha_priority(int *priority);
57371d7fec4Smrg   void gfx_get_alpha_color(unsigned long *color);
57471d7fec4Smrg
57571d7fec4Smrg/* ROUTINES IN GFX_VIP.C */
57671d7fec4Smrg
57771d7fec4Smrg   int gfx_set_vip_enable(int enable);
57871d7fec4Smrg   int gfx_set_vip_capture_run_mode(int mode);
57971d7fec4Smrg   int gfx_set_vip_base(unsigned long even, unsigned long odd);
58071d7fec4Smrg   int gfx_set_vip_pitch(unsigned long pitch);
58171d7fec4Smrg   int gfx_set_vip_mode(int mode);
58271d7fec4Smrg   int gfx_set_vbi_enable(int enable);
58371d7fec4Smrg   int gfx_set_vbi_mode(int mode);
58471d7fec4Smrg   int gfx_set_vbi_base(unsigned long even, unsigned long odd);
58571d7fec4Smrg   int gfx_set_vbi_pitch(unsigned long pitch);
58671d7fec4Smrg   int gfx_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines);
58771d7fec4Smrg   int gfx_set_vbi_interrupt(int enable);
58871d7fec4Smrg   int gfx_set_vip_bus_request_threshold_high(int enable);
58971d7fec4Smrg   int gfx_set_vip_last_line(int last_line);
59071d7fec4Smrg   int gfx_test_vip_odd_field(void);
59171d7fec4Smrg   int gfx_test_vip_bases_updated(void);
59271d7fec4Smrg   int gfx_test_vip_fifo_overflow(void);
59371d7fec4Smrg   int gfx_get_vip_line(void);
59471d7fec4Smrg
59571d7fec4Smrg/* READ ROUTINES IN GFX_VIP.C */
59671d7fec4Smrg
59771d7fec4Smrg   int gfx_get_vip_enable(void);
59871d7fec4Smrg   unsigned long gfx_get_vip_base(int odd);
59971d7fec4Smrg   unsigned long gfx_get_vip_pitch(void);
60071d7fec4Smrg   int gfx_get_vip_mode(void);
60171d7fec4Smrg   int gfx_get_vbi_enable(void);
60271d7fec4Smrg   int gfx_get_vbi_mode(void);
60371d7fec4Smrg   unsigned long gfx_get_vbi_base(int odd);
60471d7fec4Smrg   unsigned long gfx_get_vbi_pitch(void);
60571d7fec4Smrg   unsigned long gfx_get_vbi_direct(int odd);
60671d7fec4Smrg   int gfx_get_vbi_interrupt(void);
60771d7fec4Smrg   int gfx_get_vip_bus_request_threshold_high(void);
60871d7fec4Smrg
60971d7fec4Smrg/* ROUTINES IN GFX_DCDR.C */
61071d7fec4Smrg
61171d7fec4Smrg   int gfx_set_decoder_defaults(void);
61271d7fec4Smrg   int gfx_set_decoder_analog_input(unsigned char input);
61371d7fec4Smrg   int gfx_set_decoder_brightness(unsigned char brightness);
61471d7fec4Smrg   int gfx_set_decoder_contrast(unsigned char contrast);
61571d7fec4Smrg   int gfx_set_decoder_hue(char hue);
61671d7fec4Smrg   int gfx_set_decoder_saturation(unsigned char saturation);
61771d7fec4Smrg   int gfx_set_decoder_input_offset(unsigned short x, unsigned short y);
61871d7fec4Smrg   int gfx_set_decoder_input_size(unsigned short width,
61971d7fec4Smrg				  unsigned short height);
62071d7fec4Smrg   int gfx_set_decoder_output_size(unsigned short width,
62171d7fec4Smrg				   unsigned short height);
62271d7fec4Smrg   int gfx_set_decoder_scale(unsigned short srcw, unsigned short srch,
62371d7fec4Smrg			     unsigned short dstw, unsigned short dsth);
62471d7fec4Smrg   int gfx_set_decoder_vbi_format(int start, int end, int format);
62571d7fec4Smrg   int gfx_set_decoder_vbi_enable(int enable);
62671d7fec4Smrg   int gfx_set_decoder_vbi_upscale(void);
62771d7fec4Smrg   int gfx_set_decoder_TV_standard(TVStandardType TVStandard);
62871d7fec4Smrg   int gfx_set_decoder_luminance_filter(unsigned char lufi);
62971d7fec4Smrg   int gfx_decoder_software_reset(void);
63071d7fec4Smrg   int gfx_decoder_detect_macrovision(void);
63171d7fec4Smrg   int gfx_decoder_detect_video(void);
63271d7fec4Smrg
63371d7fec4Smrg/* READ ROUTINES IN GFX_DCDR.C */
63471d7fec4Smrg
63571d7fec4Smrg   unsigned char gfx_get_decoder_brightness(void);
63671d7fec4Smrg   unsigned char gfx_get_decoder_contrast(void);
63771d7fec4Smrg   char gfx_get_decoder_hue(void);
63871d7fec4Smrg   unsigned char gfx_get_decoder_saturation(void);
63971d7fec4Smrg   unsigned long gfx_get_decoder_input_offset(void);
64071d7fec4Smrg   unsigned long gfx_get_decoder_input_size(void);
64171d7fec4Smrg   unsigned long gfx_get_decoder_output_size(void);
64271d7fec4Smrg   int gfx_get_decoder_vbi_format(int line);
64371d7fec4Smrg
64471d7fec4Smrg/* ROUTINES IN GFX_I2C.C */
64571d7fec4Smrg
64671d7fec4Smrg   int gfx_i2c_reset(unsigned char busnum, short adr, char freq);
64771d7fec4Smrg   int gfx_i2c_write(unsigned char busnum, unsigned char chipadr,
64871d7fec4Smrg		     unsigned char subadr, unsigned char bytes,
64971d7fec4Smrg		     unsigned char *data);
65071d7fec4Smrg   int gfx_i2c_read(unsigned char busnum, unsigned char chipadr,
65171d7fec4Smrg		    unsigned char subadr, unsigned char bytes,
65271d7fec4Smrg		    unsigned char *data);
65371d7fec4Smrg   int gfx_i2c_select_gpio(int clock, int data);
65471d7fec4Smrg   int gfx_i2c_init(void);
65571d7fec4Smrg   void gfx_i2c_cleanup(void);
65671d7fec4Smrg
65771d7fec4Smrg/* ROUTINES IN GFX_TV.C */
65871d7fec4Smrg
65971d7fec4Smrg   int gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution);
66071d7fec4Smrg   int gfx_set_tv_output(int output);
66171d7fec4Smrg   int gfx_set_tv_enable(int enable);
66271d7fec4Smrg   int gfx_set_tv_flicker_filter(int ff);
66371d7fec4Smrg   int gfx_set_tv_sub_carrier_reset(int screset);
66471d7fec4Smrg   int gfx_set_tv_vphase(int vphase);
66571d7fec4Smrg   int gfx_set_tv_YC_delay(int delay);
66671d7fec4Smrg   int gfx_set_tvenc_reset_interval(int interval);
66771d7fec4Smrg   int gfx_set_tv_cc_enable(int enable);
66871d7fec4Smrg   int gfx_set_tv_cc_data(unsigned char data1, unsigned char data2);
66971d7fec4Smrg   int gfx_set_tv_display(int width, int height);
67071d7fec4Smrg   int gfx_test_tvout_odd_field(void);
67171d7fec4Smrg   int gfx_test_tvenc_odd_field(void);
67271d7fec4Smrg   int gfx_set_tv_field_status_invert(int enable);
67371d7fec4Smrg   int gfx_get_tv_vphase(void);
67471d7fec4Smrg   int gfx_get_tv_enable(unsigned int *p_on);
67571d7fec4Smrg   int gfx_get_tv_output(void);
67671d7fec4Smrg   int gfx_get_tv_mode_count(TVStandardType format);
67771d7fec4Smrg   int gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz);
67871d7fec4Smrg   int gfx_get_tv_display_mode_frequency(unsigned short width,
67971d7fec4Smrg					 unsigned short height,
68071d7fec4Smrg					 TVStandardType format,
68171d7fec4Smrg					 int *frequency);
68271d7fec4Smrg   int gfx_is_tv_display_mode_supported(unsigned short width,
68371d7fec4Smrg					unsigned short height,
68471d7fec4Smrg					TVStandardType format);
68571d7fec4Smrg
68671d7fec4Smrg   int gfx_get_tv_standard(unsigned long *p_standard);
68771d7fec4Smrg   int gfx_get_available_tv_standards(unsigned long *p_standards);
68871d7fec4Smrg   int gfx_set_tv_standard(unsigned long standard);
68971d7fec4Smrg   int gfx_get_tv_vga_mode(unsigned long *p_vga_mode);
69071d7fec4Smrg   int gfx_get_available_tv_vga_modes(unsigned long *p_vga_modes);
69171d7fec4Smrg   int gfx_set_tv_vga_mode(unsigned long vga_mode);
69271d7fec4Smrg   int gfx_get_tvout_mode(unsigned long *p_tvout_mode);
69371d7fec4Smrg   int gfx_set_tvout_mode(unsigned long tvout_mode);
69471d7fec4Smrg   int gfx_get_sharpness(int *p_sharpness);
69571d7fec4Smrg   int gfx_set_sharpness(int sharpness);
69671d7fec4Smrg   int gfx_get_flicker_filter(int *p_flicker);
69771d7fec4Smrg   int gfx_set_flicker_filter(int flicker);
69871d7fec4Smrg   int gfx_get_overscan(int *p_x, int *p_y);
69971d7fec4Smrg   int gfx_set_overscan(int x, int y);
70071d7fec4Smrg   int gfx_get_position(int *p_x, int *p_y);
70171d7fec4Smrg   int gfx_set_position(int x, int y);
70271d7fec4Smrg   int gfx_get_color(int *p_color);
70371d7fec4Smrg   int gfx_set_color(int color);
70471d7fec4Smrg   int gfx_get_brightness(int *p_brightness);
70571d7fec4Smrg   int gfx_set_brightness(int brightness);
70671d7fec4Smrg   int gfx_get_contrast(int *p_contrast);
70771d7fec4Smrg   int gfx_set_contrast(int constrast);
70871d7fec4Smrg   int gfx_get_yc_filter(unsigned int *p_yc_filter);
70971d7fec4Smrg   int gfx_set_yc_filter(unsigned int yc_filter);
71071d7fec4Smrg   int gfx_get_aps_trigger_bits(unsigned int *p_trigger_bits);
71171d7fec4Smrg   int gfx_set_aps_trigger_bits(unsigned int trigger_bits);
71271d7fec4Smrg
71371d7fec4Smrg/* ROUTINES IN GFX_VGA.C */
71471d7fec4Smrg
71571d7fec4Smrg   int gfx_get_softvga_active(void);
71671d7fec4Smrg   int gfx_vga_test_pci(void);
71771d7fec4Smrg   unsigned char gfx_vga_get_pci_command(void);
71871d7fec4Smrg   int gfx_vga_set_pci_command(unsigned char command);
71971d7fec4Smrg   int gfx_vga_seq_reset(int reset);
72071d7fec4Smrg   int gfx_vga_set_graphics_bits(void);
72171d7fec4Smrg   int gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp,
72271d7fec4Smrg		    int hz);
72371d7fec4Smrg   int gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch);
72471d7fec4Smrg   int gfx_vga_save(gfx_vga_struct * vga, int flags);
72571d7fec4Smrg   int gfx_vga_restore(gfx_vga_struct * vga, int flags);
72671d7fec4Smrg   int gfx_vga_mode_switch(int active);
72771d7fec4Smrg   void gfx_vga_clear_extended(void);
72871d7fec4Smrg
72971d7fec4Smrg/* CLOSE BRACKET FOR C++ COMPLILATION */
73071d7fec4Smrg
73171d7fec4Smrg#ifdef __cplusplus
73271d7fec4Smrg}
73371d7fec4Smrg#endif
73471d7fec4Smrg
73571d7fec4Smrg#endif					/* !_gfx_rtns_h */
73671d7fec4Smrg
73771d7fec4Smrg/* END OF FILE */
73871d7fec4Smrg
739