]>
Commit | Line | Data |
---|---|---|
7c050f81 | 1 | /* |
c609719b WD |
2 | * (C) Copyright 1997-2002 ELTEC Elektronik AG |
3 | * Frank Gottschling <fgottschling@eltec.de> | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
c609719b WD |
6 | */ |
7 | ||
8 | /* | |
9 | * smiLynxEM.h | |
10 | * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator | |
11 | * | |
12 | * | |
13 | * modification history | |
14 | * -------------------- | |
15 | * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>. | |
16 | */ | |
17 | ||
18 | #ifndef _VIDEO_FB_H_ | |
19 | #define _VIDEO_FB_H_ | |
20 | ||
21 | #define CONSOLE_BG_COL 0x00 | |
22 | #define CONSOLE_FG_COL 0xa0 | |
23 | ||
24 | /* | |
25 | * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT | |
26 | */ | |
27 | #define GDF__8BIT_INDEX 0 | |
28 | #define GDF_15BIT_555RGB 1 | |
29 | #define GDF_16BIT_565RGB 2 | |
30 | #define GDF_32BIT_X888RGB 3 | |
31 | #define GDF_24BIT_888RGB 4 | |
32 | #define GDF__8BIT_332RGB 5 | |
33 | ||
34 | /******************************************************************************/ | |
35 | /* Export Graphic Driver Control */ | |
36 | /******************************************************************************/ | |
37 | ||
38 | typedef struct { | |
39 | unsigned int isaBase; | |
40 | unsigned int pciBase; | |
41 | unsigned int dprBase; | |
42 | unsigned int vprBase; | |
43 | unsigned int cprBase; | |
44 | unsigned int frameAdrs; | |
45 | unsigned int memSize; | |
46 | unsigned int mode; | |
47 | unsigned int gdfIndex; | |
48 | unsigned int gdfBytesPP; | |
49 | unsigned int fg; | |
50 | unsigned int bg; | |
51 | unsigned int plnSizeX; | |
52 | unsigned int plnSizeY; | |
53 | unsigned int winSizeX; | |
54 | unsigned int winSizeY; | |
55 | char modeIdent[80]; | |
56 | } GraphicDevice; | |
57 | ||
58 | ||
59 | /******************************************************************************/ | |
60 | /* Export Graphic Functions */ | |
61 | /******************************************************************************/ | |
62 | ||
63 | void *video_hw_init (void); /* returns GraphicDevice struct or NULL */ | |
64 | ||
65 | #ifdef VIDEO_HW_BITBLT | |
66 | void video_hw_bitblt ( | |
67 | unsigned int bpp, /* bytes per pixel */ | |
68 | unsigned int src_x, /* source pos x */ | |
69 | unsigned int src_y, /* source pos y */ | |
70 | unsigned int dst_x, /* dest pos x */ | |
71 | unsigned int dst_y, /* dest pos y */ | |
72 | unsigned int dim_x, /* frame width */ | |
73 | unsigned int dim_y /* frame height */ | |
74 | ); | |
75 | #endif | |
76 | ||
77 | #ifdef VIDEO_HW_RECTFILL | |
78 | void video_hw_rectfill ( | |
79 | unsigned int bpp, /* bytes per pixel */ | |
80 | unsigned int dst_x, /* dest pos x */ | |
81 | unsigned int dst_y, /* dest pos y */ | |
82 | unsigned int dim_x, /* frame width */ | |
83 | unsigned int dim_y, /* frame height */ | |
84 | unsigned int color /* fill color */ | |
85 | ); | |
86 | #endif | |
87 | ||
88 | void video_set_lut ( | |
89 | unsigned int index, /* color number */ | |
90 | unsigned char r, /* red */ | |
91 | unsigned char g, /* green */ | |
92 | unsigned char b /* blue */ | |
93 | ); | |
94 | #ifdef CONFIG_VIDEO_HW_CURSOR | |
95 | void video_set_hw_cursor(int x, int y); /* x y in pixel */ | |
96 | void video_init_hw_cursor(int font_width, int font_height); | |
97 | #endif | |
98 | ||
99 | #endif /*_VIDEO_FB_H_ */ |