mdss_s6e8aa0a_panel.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* Copyright (c) 2008-2013, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef MDSS_MS01_PANEL_H
  14. #define MDSS_MS01_PANEL_H
  15. #include "mdss_panel.h"
  16. #include "smart_mtp_s6e8aa0x01.h"
  17. #include "smart_dimming.h"
  18. #define MAX_BRIGHTNESS_LEVEL 255
  19. #define MID_BRIGHTNESS_LEVEL 143
  20. #define LOW_BRIGHTNESS_LEVEL 20
  21. #define DIM_BRIGHTNESS_LEVEL 30
  22. #define BL_MIN_BRIGHTNESS 6
  23. #define BL_MAX_BRIGHTNESS_LEVEL 192
  24. #define BL_MID_BRIGHTNESS_LEVEL 94
  25. #define BL_LOW_BRIGHTNESS_LEVEL 7
  26. #define BL_DIM_BRIGHTNESS_LEVEL 13
  27. #define BL_DEFAULT_BRIGHTNESS BL_MID_BRIGHTNESS_LEVEL
  28. enum {
  29. MIPI_RESUME_STATE,
  30. MIPI_SUSPEND_STATE,
  31. };
  32. #define SmartDimming_CANDELA_UPPER_LIMIT (300)
  33. #define MTP_DATA_SIZE (24)
  34. #define MTP_DATA_SIZE_S6E63M0 (21)
  35. #define MTP_DATA_SIZE_EA8868 (21)
  36. #define ELVSS_DATA_SIZE (24)
  37. #define MTP_REGISTER (0xD3)
  38. #define ELVSS_REGISTER (0xD4)
  39. #define SmartDimming_GammaUpdate_Pos (2)
  40. struct display_status{
  41. unsigned char auto_brightness;
  42. int bright_level;
  43. int siop_status;
  44. unsigned char acl_on;
  45. unsigned char gamma_mode; /* 1: 1.9 gamma, 0: 2.2 gamma */
  46. unsigned char is_smart_dim_loaded;
  47. unsigned char is_elvss_loaded;
  48. };
  49. struct mdss_samsung_driver_data{
  50. struct dsi_buf samsung_tx_buf;
  51. struct msm_fb_data_type *mfd;
  52. struct dsi_buf samsung_rx_buf;
  53. struct mdss_panel_common_pdata *mdss_samsung_disp_pdata;
  54. struct mdss_panel_data *mpd;
  55. struct mutex lock;
  56. struct mdss_dsi_ctrl_pdata *ctrl_pdata;
  57. #if defined(CONFIG_LCD_CLASS_DEVICE)
  58. struct platform_device *msm_pdev;
  59. #endif
  60. #if defined(CONFIG_HAS_EARLYSUSPEND)
  61. struct early_suspend early_suspend;
  62. #endif
  63. struct display_status dstat;
  64. };
  65. struct dsi_cmd_desc_LCD {
  66. int lux;
  67. char strID[8];
  68. struct dsi_cmd_desc *cmd;
  69. };
  70. enum {
  71. GAMMA_20CD,
  72. GAMMA_30CD,
  73. GAMMA_40CD,
  74. GAMMA_50CD,
  75. GAMMA_60CD,
  76. GAMMA_70CD,
  77. GAMMA_80CD,
  78. GAMMA_90CD,
  79. GAMMA_100CD,
  80. GAMMA_102CD,
  81. GAMMA_104CD,
  82. GAMMA_106CD,
  83. GAMMA_108CD,
  84. GAMMA_110CD,
  85. GAMMA_120CD,
  86. GAMMA_130CD,
  87. GAMMA_140CD,
  88. GAMMA_150CD,
  89. GAMMA_160CD,
  90. GAMMA_170CD,
  91. GAMMA_180CD,
  92. GAMMA_182CD,
  93. GAMMA_184CD,
  94. GAMMA_186CD,
  95. GAMMA_188CD,
  96. GAMMA_190CD,
  97. GAMMA_200CD,
  98. GAMMA_210CD,
  99. GAMMA_220CD,
  100. GAMMA_230CD,
  101. GAMMA_240CD,
  102. GAMMA_250CD,
  103. GAMMA_260CD,
  104. GAMMA_270CD,
  105. GAMMA_280CD,
  106. GAMMA_290CD,
  107. GAMMA_300CD,
  108. };
  109. enum mipi_samsung_cmd_list {
  110. PANEL_READY_TO_ON,
  111. PANEL_DISP_OFF,
  112. PANEL_DISPLAY_ON,
  113. PANEL_DISPLAY_OFF,
  114. PANEL_DISPLAY_UNBLANK,
  115. PANEL_DISPLAY_BLANK,
  116. PANEL_ALL_PIXEL_OFF,
  117. PANEL_BRIGHT_CTRL,
  118. PANEL_MTP_ENABLE,
  119. PANEL_MTP_DISABLE,
  120. PANEL_NEED_FLIP,
  121. PANEL_ACL_OFF,
  122. PANEL_ACL_ON,
  123. PANEL_ACL_UPDATE,
  124. PANEL_LATE_ON,
  125. PANEL_EARLY_OFF,
  126. PANEL_TOUCHSENSING_ON,
  127. PANEL_TOUCHSENSING_OFF,
  128. PANEL_TEAR_ON,
  129. PANEL_TEAR_OFF,
  130. PANEL_LDI_FPS_CHANGE,
  131. PANEL_LDI_SET_VDDM_OFFSET, /*LDI_ADJ_VDDM_OFFSET*/
  132. PANEL_PARTIAL_ON,
  133. PANEL_PARTIAL_OFF
  134. };
  135. void mdnie_lite_tuning_init(struct mdss_samsung_driver_data* msd);
  136. void mdss_dsi_cmds_send(struct mdss_dsi_ctrl_pdata *ctrl, struct dsi_cmd_desc *cmds, int cnt,int flag);
  137. #endif