wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 1 | /* |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 2 | * (C) Copyright 1997-2002 ELTEC Elektronik AG |
| 3 | * Frank Gottschling <fgottschling@eltec.de> |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 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. |
| 12 | * |
| 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. |
| 17 | * |
| 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, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | * smiLynxEM.h |
| 26 | * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator |
| 27 | * |
| 28 | * |
| 29 | * modification history |
| 30 | * -------------------- |
| 31 | * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>. |
| 32 | */ |
| 33 | |
| 34 | #ifndef _VIDEO_FB_H_ |
| 35 | #define _VIDEO_FB_H_ |
| 36 | |
| 37 | #define CONSOLE_BG_COL 0x00 |
| 38 | #define CONSOLE_FG_COL 0xa0 |
| 39 | |
| 40 | /* |
| 41 | * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT |
| 42 | */ |
| 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 |
| 49 | |
| 50 | /******************************************************************************/ |
| 51 | /* Export Graphic Driver Control */ |
| 52 | /******************************************************************************/ |
| 53 | |
| 54 | typedef struct { |
| 55 | unsigned int isaBase; |
| 56 | unsigned int pciBase; |
| 57 | unsigned int dprBase; |
| 58 | unsigned int vprBase; |
| 59 | unsigned int cprBase; |
| 60 | unsigned int frameAdrs; |
| 61 | unsigned int memSize; |
| 62 | unsigned int mode; |
| 63 | unsigned int gdfIndex; |
| 64 | unsigned int gdfBytesPP; |
| 65 | unsigned int fg; |
| 66 | unsigned int bg; |
| 67 | unsigned int plnSizeX; |
| 68 | unsigned int plnSizeY; |
| 69 | unsigned int winSizeX; |
| 70 | unsigned int winSizeY; |
| 71 | char modeIdent[80]; |
| 72 | } GraphicDevice; |
| 73 | |
| 74 | |
| 75 | /******************************************************************************/ |
| 76 | /* Export Graphic Functions */ |
| 77 | /******************************************************************************/ |
| 78 | |
| 79 | void *video_hw_init (void); /* returns GraphicDevice struct or NULL */ |
| 80 | |
| 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 */ |
| 90 | ); |
| 91 | #endif |
| 92 | |
| 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 */ |
| 101 | ); |
| 102 | #endif |
| 103 | |
| 104 | void video_set_lut ( |
| 105 | unsigned int index, /* color number */ |
| 106 | unsigned char r, /* red */ |
| 107 | unsigned char g, /* green */ |
| 108 | unsigned char b /* blue */ |
| 109 | ); |
| 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); |
| 113 | #endif |
| 114 | |
| 115 | #endif /*_VIDEO_FB_H_ */ |