xref: /openbmc/u-boot/include/video_fb.h (revision baefb63a)
1 /*
2  * (C) Copyright 1997-2002 ELTEC Elektronik AG
3  * Frank Gottschling <fgottschling@eltec.de>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
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 /*
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 
35 typedef struct graphic_device {
36     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 
60 void *video_hw_init (void);       /* returns GraphicDevice struct or NULL */
61 
62 #ifdef VIDEO_HW_BITBLT
63 void 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
75 void 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 
85 void 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     );
91 
92 #endif /*_VIDEO_FB_H_ */
93