video_fb.h 2.7 KB

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