1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 1997-2002 ELTEC Elektronik AG
4 * Frank Gottschling <fgottschling@eltec.de>
9 * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator
12 * modification history
13 * --------------------
14 * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>.
21 * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
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
30 /******************************************************************************/
31 /* Export Graphic Driver Control */
32 /******************************************************************************/
34 typedef struct graphic_device {
40 unsigned int frameAdrs;
43 unsigned int gdfIndex;
44 unsigned int gdfBytesPP;
47 unsigned int plnSizeX;
48 unsigned int plnSizeY;
49 unsigned int winSizeX;
50 unsigned int winSizeY;
55 /******************************************************************************/
56 /* Export Graphic Functions */
57 /******************************************************************************/
59 void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
61 #ifdef VIDEO_HW_BITBLT
62 void 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 */
73 #ifdef VIDEO_HW_RECTFILL
74 void 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 */
85 unsigned int index, /* color number */
86 unsigned char r, /* red */
87 unsigned char g, /* green */
88 unsigned char b /* blue */
91 #endif /*_VIDEO_FB_H_ */