video_fb.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * (C) Copyright 1997-2002 ELTEC Elektronik AG
  3. * Frank Gottschling <fgottschling@eltec.de>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /*
  24. * smiLynxEM.h
  25. * Silicon Motion graphic interface for sm810/sm710/sm712 accelerator
  26. *
  27. *
  28. * modification history
  29. * --------------------
  30. * 04-18-2002 Rewritten for U-Boot <fgottschling@eltec.de>.
  31. */
  32. #ifndef _VIDEO_FB_H_
  33. #define _VIDEO_FB_H_
  34. #define CONSOLE_BG_COL 0x00
  35. #define CONSOLE_FG_COL 0xa0
  36. /*
  37. * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT
  38. */
  39. #define GDF__8BIT_INDEX 0
  40. #define GDF_15BIT_555RGB 1
  41. #define GDF_16BIT_565RGB 2
  42. #define GDF_32BIT_X888RGB 3
  43. #define GDF_24BIT_888RGB 4
  44. #define GDF__8BIT_332RGB 5
  45. /******************************************************************************/
  46. /* Export Graphic Driver Control */
  47. /******************************************************************************/
  48. typedef struct {
  49. unsigned int isaBase;
  50. unsigned int pciBase;
  51. unsigned int dprBase;
  52. unsigned int vprBase;
  53. unsigned int cprBase;
  54. unsigned int frameAdrs;
  55. unsigned int memSize;
  56. unsigned int mode;
  57. unsigned int gdfIndex;
  58. unsigned int gdfBytesPP;
  59. unsigned int fg;
  60. unsigned int bg;
  61. unsigned int plnSizeX;
  62. unsigned int plnSizeY;
  63. unsigned int winSizeX;
  64. unsigned int winSizeY;
  65. char modeIdent[80];
  66. } GraphicDevice;
  67. /******************************************************************************/
  68. /* Export Graphic Functions */
  69. /******************************************************************************/
  70. void *video_hw_init (void); /* returns GraphicDevice struct or NULL */
  71. #ifdef VIDEO_HW_BITBLT
  72. void video_hw_bitblt (
  73. unsigned int bpp, /* bytes per pixel */
  74. unsigned int src_x, /* source pos x */
  75. unsigned int src_y, /* source pos y */
  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. );
  81. #endif
  82. #ifdef VIDEO_HW_RECTFILL
  83. void video_hw_rectfill (
  84. unsigned int bpp, /* bytes per pixel */
  85. unsigned int dst_x, /* dest pos x */
  86. unsigned int dst_y, /* dest pos y */
  87. unsigned int dim_x, /* frame width */
  88. unsigned int dim_y, /* frame height */
  89. unsigned int color /* fill color */
  90. );
  91. #endif
  92. void video_set_lut (
  93. unsigned int index, /* color number */
  94. unsigned char r, /* red */
  95. unsigned char g, /* green */
  96. unsigned char b /* blue */
  97. );
  98. #ifdef CONFIG_VIDEO_HW_CURSOR
  99. void video_set_hw_cursor(int x, int y); /* x y in pixel */
  100. void video_init_hw_cursor(int font_width, int font_height);
  101. #endif
  102. #endif /*_VIDEO_FB_H_ */