ddp_info.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #ifndef _H_DDP_INFO_
  2. #define _H_DDP_INFO_
  3. //#include <linux/types.h>
  4. #include "ddp_hal.h"
  5. #include "mt_typedefs.h"
  6. #include "ddp_data_type.h"
  7. #include "lcm_drv.h"
  8. #include "ddp_reg.h"
  9. #include "disp_event.h"
  10. typedef struct _OVL_CONFIG_STRUCT
  11. {
  12. unsigned int ovl_index;
  13. unsigned int layer;
  14. unsigned int layer_en;
  15. enum OVL_LAYER_SOURCE source;
  16. unsigned int fmt;
  17. unsigned int addr;
  18. unsigned int vaddr;
  19. unsigned int src_x;
  20. unsigned int src_y;
  21. unsigned int src_w;
  22. unsigned int src_h;
  23. unsigned int src_pitch;
  24. unsigned int dst_x;
  25. unsigned int dst_y;
  26. unsigned int dst_w;
  27. unsigned int dst_h; // clip region
  28. unsigned int keyEn;
  29. unsigned int key;
  30. unsigned int aen;
  31. unsigned char alpha;
  32. unsigned int isTdshp;
  33. unsigned int isDirty;
  34. unsigned int buff_idx;
  35. unsigned int identity;
  36. unsigned int connected_type;
  37. unsigned int security;
  38. }OVL_CONFIG_STRUCT;
  39. typedef struct _RDMA_CONFIG_STRUCT
  40. {
  41. unsigned idx; // instance index
  42. DpColorFormat inputFormat;
  43. unsigned address;
  44. unsigned pitch;
  45. unsigned width;
  46. unsigned height;
  47. }RDMA_CONFIG_STRUCT;
  48. typedef struct _WDMA_CONFIG_STRUCT
  49. {
  50. unsigned srcWidth;
  51. unsigned srcHeight; // input
  52. unsigned clipX;
  53. unsigned clipY;
  54. unsigned clipWidth;
  55. unsigned clipHeight; // clip
  56. DpColorFormat outputFormat;
  57. unsigned dstAddress;
  58. unsigned dstWidth; // output
  59. unsigned int useSpecifiedAlpha;
  60. unsigned char alpha;
  61. }WDMA_CONFIG_STRUCT;
  62. typedef struct
  63. {
  64. // for ovl
  65. unsigned int ovl_dirty;
  66. unsigned int rdma_dirty;
  67. unsigned int wdma_dirty;
  68. unsigned int dst_dirty;
  69. OVL_CONFIG_STRUCT ovl_config[4];
  70. RDMA_CONFIG_STRUCT rdma_config;
  71. WDMA_CONFIG_STRUCT wdma_config;
  72. LCM_DSI_PARAMS dsi_config;
  73. LCM_DPI_PARAMS dpi_config;
  74. unsigned int lcm_bpp;
  75. unsigned int dst_w;
  76. unsigned int dst_h;
  77. }disp_ddp_path_config;
  78. typedef int (*ddp_module_notify)(DISP_MODULE_ENUM, DISP_PATH_EVENT);
  79. typedef struct
  80. {
  81. DISP_MODULE_ENUM module;
  82. int (*init)(DISP_MODULE_ENUM module, void *handle);
  83. int (*deinit)(DISP_MODULE_ENUM module, void *handle);
  84. int (*config)(DISP_MODULE_ENUM module, disp_ddp_path_config *config, void *handle);
  85. int (*start)(DISP_MODULE_ENUM module, void *handle);
  86. int (*trigger)(DISP_MODULE_ENUM module, void *cmdq_handle);
  87. int (*stop)(DISP_MODULE_ENUM module, void *handle);
  88. int (*reset)(DISP_MODULE_ENUM module, void *handle);
  89. int (*power_on)(DISP_MODULE_ENUM module, void *handle);
  90. int (*power_off)(DISP_MODULE_ENUM module, void *handle);
  91. int (*is_idle)(DISP_MODULE_ENUM module);
  92. int (*is_busy)(DISP_MODULE_ENUM module);
  93. int (*dump_info)(DISP_MODULE_ENUM module, int level);
  94. int (*bypass)(DISP_MODULE_ENUM module, int bypass);
  95. int (*build_cmdq)(DISP_MODULE_ENUM module, void *cmdq_handle, CMDQ_STATE state);
  96. int (*set_lcm_utils)(DISP_MODULE_ENUM module, LCM_DRIVER *lcm_drv);
  97. int (*set_listener)(DISP_MODULE_ENUM module,ddp_module_notify notify);
  98. int (*polling_irq)(DISP_MODULE_ENUM module, int bit, int timeout);
  99. } DDP_MODULE_DRIVER;
  100. char* ddp_get_module_name(DISP_MODULE_ENUM module);
  101. int ddp_get_module_max_irq_bit(DISP_MODULE_ENUM module);
  102. #endif