2 * (C) Copyright 1997-2002 ELTEC Elektronik AG
3 * Frank Gottschling <fgottschling@eltec.de>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator
29 * modification history
30 * --------------------
31 * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>.
37 #define CONSOLE_BG_COL 0x00
38 #define CONSOLE_FG_COL 0xa0
41 * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
43 #define GDF__8BIT_INDEX 0
44 #define GDF_15BIT_555RGB 1
45 #define GDF_16BIT_565RGB 2
46 #define GDF_32BIT_X888RGB 3
47 #define GDF_24BIT_888RGB 4
48 #define GDF__8BIT_332RGB 5
50 /******************************************************************************/
51 /* Export Graphic Driver Control */
52 /******************************************************************************/
60 unsigned int frameAdrs;
63 unsigned int gdfIndex;
64 unsigned int gdfBytesPP;
67 unsigned int plnSizeX;
68 unsigned int plnSizeY;
69 unsigned int winSizeX;
70 unsigned int winSizeY;
75 /******************************************************************************/
76 /* Export Graphic Functions */
77 /******************************************************************************/
79 void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
81 #ifdef VIDEO_HW_BITBLT
82 void video_hw_bitblt (
83 unsigned int bpp, /* bytes per pixel */
84 unsigned int src_x, /* source pos x */
85 unsigned int src_y, /* source pos y */
86 unsigned int dst_x, /* dest pos x */
87 unsigned int dst_y, /* dest pos y */
88 unsigned int dim_x, /* frame width */
89 unsigned int dim_y /* frame height */
93 #ifdef VIDEO_HW_RECTFILL
94 void video_hw_rectfill (
95 unsigned int bpp, /* bytes per pixel */
96 unsigned int dst_x, /* dest pos x */
97 unsigned int dst_y, /* dest pos y */
98 unsigned int dim_x, /* frame width */
99 unsigned int dim_y, /* frame height */
100 unsigned int color /* fill color */
105 unsigned int index, /* color number */
106 unsigned char r, /* red */
107 unsigned char g, /* green */
108 unsigned char b /* blue */
110 #ifdef CONFIG_VIDEO_HW_CURSOR
111 void video_set_hw_cursor(int x, int y); /* x y in pixel */
112 void video_init_hw_cursor(int font_width, int font_height);
115 #endif /*_VIDEO_FB_H_ */