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