video_fb.h 2.7 KB

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