]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/video_fb.h
usb: add support for generic EHCI devices
[people/ms/u-boot.git] / include / video_fb.h
CommitLineData
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
45ae2546
HS
21#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
c609719b
WD
25#define CONSOLE_BG_COL 0x00
26#define CONSOLE_FG_COL 0xa0
45ae2546 27#endif
c609719b
WD
28
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
6854f87c 43typedef struct graphic_device {
c609719b
WD
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_ */