2 * (C) Copyright 1997-2002 ELTEC Elektronik AG
3 * Frank Gottschling <fgottschling@eltec.de>
5 * SPDX-License-Identifier: GPL-2.0+
10 * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator
13 * modification history
14 * --------------------
15 * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>.
22 * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
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
31 /******************************************************************************/
32 /* Export Graphic Driver Control */
33 /******************************************************************************/
35 typedef struct graphic_device {
41 unsigned int frameAdrs;
44 unsigned int gdfIndex;
45 unsigned int gdfBytesPP;
48 unsigned int plnSizeX;
49 unsigned int plnSizeY;
50 unsigned int winSizeX;
51 unsigned int winSizeY;
56 /******************************************************************************/
57 /* Export Graphic Functions */
58 /******************************************************************************/
60 void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
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 */
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 */
86 unsigned int index, /* color number */
87 unsigned char r, /* red */
88 unsigned char g, /* green */
89 unsigned char b /* blue */
92 #endif /*_VIDEO_FB_H_ */