blob: 6cd4e377c20cc99a066035ead783bb83e8cc59ed [file] [log] [blame]
Anatolij Gustschin794b25c2010-06-19 20:41:56 +02001/*
wdenkc6097192002-11-03 00:24:07 +00002 * (C) Copyright 1997-2002 ELTEC Elektronik AG
3 * Frank Gottschling <fgottschling@eltec.de>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc6097192002-11-03 00:24:07 +00006 */
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
Heiko Schocher62759562013-10-22 11:06:06 +020021#if defined(CONFIG_SYS_CONSOLE_FG_COL) && defined(CONFIG_SYS_CONSOLE_BG_COL)
22#define CONSOLE_BG_COL CONFIG_SYS_CONSOLE_BG_COL
23#define CONSOLE_FG_COL CONFIG_SYS_CONSOLE_FG_COL
24#else
wdenkc6097192002-11-03 00:24:07 +000025#define CONSOLE_BG_COL 0x00
26#define CONSOLE_FG_COL 0xa0
Heiko Schocher62759562013-10-22 11:06:06 +020027#endif
wdenkc6097192002-11-03 00:24:07 +000028
29/*
30 * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
31 */
32#define GDF__8BIT_INDEX 0
33#define GDF_15BIT_555RGB 1
34#define GDF_16BIT_565RGB 2
35#define GDF_32BIT_X888RGB 3
36#define GDF_24BIT_888RGB 4
37#define GDF__8BIT_332RGB 5
38
39/******************************************************************************/
40/* Export Graphic Driver Control */
41/******************************************************************************/
42
43typedef struct {
44 unsigned int isaBase;
45 unsigned int pciBase;
46 unsigned int dprBase;
47 unsigned int vprBase;
48 unsigned int cprBase;
49 unsigned int frameAdrs;
50 unsigned int memSize;
51 unsigned int mode;
52 unsigned int gdfIndex;
53 unsigned int gdfBytesPP;
54 unsigned int fg;
55 unsigned int bg;
56 unsigned int plnSizeX;
57 unsigned int plnSizeY;
58 unsigned int winSizeX;
59 unsigned int winSizeY;
60 char modeIdent[80];
61} GraphicDevice;
62
63
64/******************************************************************************/
65/* Export Graphic Functions */
66/******************************************************************************/
67
68void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
69
70#ifdef VIDEO_HW_BITBLT
71void video_hw_bitblt (
72 unsigned int bpp, /* bytes per pixel */
73 unsigned int src_x, /* source pos x */
74 unsigned int src_y, /* source pos y */
75 unsigned int dst_x, /* dest pos x */
76 unsigned int dst_y, /* dest pos y */
77 unsigned int dim_x, /* frame width */
78 unsigned int dim_y /* frame height */
79 );
80#endif
81
82#ifdef VIDEO_HW_RECTFILL
83void video_hw_rectfill (
84 unsigned int bpp, /* bytes per pixel */
85 unsigned int dst_x, /* dest pos x */
86 unsigned int dst_y, /* dest pos y */
87 unsigned int dim_x, /* frame width */
88 unsigned int dim_y, /* frame height */
89 unsigned int color /* fill color */
90 );
91#endif
92
93void video_set_lut (
94 unsigned int index, /* color number */
95 unsigned char r, /* red */
96 unsigned char g, /* green */
97 unsigned char b /* blue */
98 );
99#ifdef CONFIG_VIDEO_HW_CURSOR
100void video_set_hw_cursor(int x, int y); /* x y in pixel */
101void video_init_hw_cursor(int font_width, int font_height);
102#endif
103
104#endif /*_VIDEO_FB_H_ */