blob: b008853f3098b21ec029e6de52049618f6501b0f [file] [log] [blame]
Anatolij Gustschin7c050f82010-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 Denk1a459662013-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
wdenkc6097192002-11-03 00:24:07 +000021/*
22 * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
23 */
24#define GDF__8BIT_INDEX 0
25#define GDF_15BIT_555RGB 1
26#define GDF_16BIT_565RGB 2
27#define GDF_32BIT_X888RGB 3
28#define GDF_24BIT_888RGB 4
29#define GDF__8BIT_332RGB 5
30
31/******************************************************************************/
32/* Export Graphic Driver Control */
33/******************************************************************************/
34
Simon Glass6854f872014-11-14 20:56:33 -070035typedef struct graphic_device {
wdenkc6097192002-11-03 00:24:07 +000036 unsigned int isaBase;
37 unsigned int pciBase;
38 unsigned int dprBase;
39 unsigned int vprBase;
40 unsigned int cprBase;
41 unsigned int frameAdrs;
42 unsigned int memSize;
43 unsigned int mode;
44 unsigned int gdfIndex;
45 unsigned int gdfBytesPP;
46 unsigned int fg;
47 unsigned int bg;
48 unsigned int plnSizeX;
49 unsigned int plnSizeY;
50 unsigned int winSizeX;
51 unsigned int winSizeY;
52 char modeIdent[80];
53} GraphicDevice;
54
55
56/******************************************************************************/
57/* Export Graphic Functions */
58/******************************************************************************/
59
60void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
61
62#ifdef VIDEO_HW_BITBLT
63void video_hw_bitblt (
64 unsigned int bpp, /* bytes per pixel */
65 unsigned int src_x, /* source pos x */
66 unsigned int src_y, /* source pos y */
67 unsigned int dst_x, /* dest pos x */
68 unsigned int dst_y, /* dest pos y */
69 unsigned int dim_x, /* frame width */
70 unsigned int dim_y /* frame height */
71 );
72#endif
73
74#ifdef VIDEO_HW_RECTFILL
75void video_hw_rectfill (
76 unsigned int bpp, /* bytes per pixel */
77 unsigned int dst_x, /* dest pos x */
78 unsigned int dst_y, /* dest pos y */
79 unsigned int dim_x, /* frame width */
80 unsigned int dim_y, /* frame height */
81 unsigned int color /* fill color */
82 );
83#endif
84
85void video_set_lut (
86 unsigned int index, /* color number */
87 unsigned char r, /* red */
88 unsigned char g, /* green */
89 unsigned char b /* blue */
90 );
wdenkc6097192002-11-03 00:24:07 +000091
92#endif /*_VIDEO_FB_H_ */