Vishnuvardhan Prodduturi | 4aa8dc4 | 2015-10-20 21:20:43 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
Siddhartha Agrawal | 3e694ea | 2013-01-23 17:01:31 -0800 | [diff] [blame] | 12 | * * Neither the name of The Linux Foundation nor the names of its |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | #ifndef _PLATFORM_MSM_SHARED_MSM_PANEL_H_ |
| 31 | #define _PLATFORM_MSM_SHARED_MSM_PANEL_H_ |
| 32 | |
Channagoud Kadabi | fb6ff7e | 2015-07-13 20:13:05 -0700 | [diff] [blame] | 33 | #include <sys/types.h> |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 34 | #include <stdint.h> |
| 35 | #include <dev/fbcon.h> |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 36 | #include <sys/types.h> |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 37 | |
Padmanabhan Komanduru | eb5bf6c | 2016-02-29 18:54:35 +0530 | [diff] [blame] | 38 | #define DFPS_MAX_FRAME_RATE 20 |
Huaibin Yang | b9f15e5 | 2015-01-22 10:34:47 -0800 | [diff] [blame] | 39 | #define DFPS_PLL_CODES_SIZE 0x1000 /* One page */ |
Huaibin Yang | 88540b3 | 2014-11-07 13:59:54 -0800 | [diff] [blame] | 40 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 41 | /* panel type list */ |
| 42 | #define NO_PANEL 0xffff /* No Panel */ |
| 43 | #define MDDI_PANEL 1 /* MDDI */ |
| 44 | #define EBI2_PANEL 2 /* EBI2 */ |
| 45 | #define LCDC_PANEL 3 /* internal LCDC type */ |
| 46 | #define EXT_MDDI_PANEL 4 /* Ext.MDDI */ |
| 47 | #define TV_PANEL 5 /* TV */ |
| 48 | #define HDMI_PANEL 6 /* HDMI TV */ |
| 49 | #define DTV_PANEL 7 /* DTV */ |
| 50 | #define MIPI_VIDEO_PANEL 8 /* MIPI */ |
| 51 | #define MIPI_CMD_PANEL 9 /* MIPI */ |
| 52 | #define WRITEBACK_PANEL 10 /* Wifi display */ |
| 53 | #define LVDS_PANEL 11 /* LVDS */ |
Asaf Penso | b8f524c | 2013-05-20 12:32:31 +0300 | [diff] [blame] | 54 | #define EDP_PANEL 12 /* EDP */ |
Zohaib Alam | b7b677f | 2014-10-24 15:54:42 -0400 | [diff] [blame] | 55 | #define QPIC_PANEL 13 /* QPIC */ |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 56 | |
Aravind Venkateswaran | fec354c | 2014-12-04 18:10:14 -0800 | [diff] [blame] | 57 | #define DISPLAY_UNKNOWN 0 |
| 58 | #define DISPLAY_1 1 |
| 59 | #define DISPLAY_2 2 |
| 60 | |
Jayant Shekhar | 03e1a22 | 2014-05-22 11:03:53 +0530 | [diff] [blame] | 61 | enum mdss_mdp_pipe_type { |
| 62 | MDSS_MDP_PIPE_TYPE_VIG, |
| 63 | MDSS_MDP_PIPE_TYPE_RGB, |
| 64 | MDSS_MDP_PIPE_TYPE_DMA, |
| 65 | }; |
| 66 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 67 | enum msm_mdp_hw_revision { |
| 68 | MDP_REV_20 = 1, |
| 69 | MDP_REV_22, |
| 70 | MDP_REV_30, |
| 71 | MDP_REV_303, |
Terence Hampson | f49ff4e | 2013-06-18 15:11:31 -0400 | [diff] [blame] | 72 | MDP_REV_304, |
Shivaraj Shetty | f9e10c4 | 2014-09-17 04:21:15 +0530 | [diff] [blame] | 73 | MDP_REV_305, |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 74 | MDP_REV_31, |
| 75 | MDP_REV_40, |
| 76 | MDP_REV_41, |
| 77 | MDP_REV_42, |
| 78 | MDP_REV_43, |
| 79 | MDP_REV_44, |
Siddhartha Agrawal | 7e2e215 | 2013-01-23 17:06:58 -0800 | [diff] [blame] | 80 | MDP_REV_50, |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 81 | }; |
| 82 | |
| 83 | /* panel info type */ |
| 84 | struct lcd_panel_info { |
| 85 | uint32_t vsync_enable; |
| 86 | uint32_t refx100; |
| 87 | uint32_t v_back_porch; |
| 88 | uint32_t v_front_porch; |
| 89 | uint32_t v_pulse_width; |
| 90 | uint32_t hw_vsync_mode; |
| 91 | uint32_t vsync_notifier_period; |
| 92 | uint32_t rev; |
| 93 | }; |
| 94 | |
Ajay Singh Parmar | 7c1cd52 | 2013-02-13 20:33:49 +0530 | [diff] [blame] | 95 | struct hdmi_panel_info { |
| 96 | uint32_t h_back_porch; |
| 97 | uint32_t h_front_porch; |
| 98 | uint32_t h_pulse_width; |
| 99 | uint32_t v_back_porch; |
| 100 | uint32_t v_front_porch; |
| 101 | uint32_t v_pulse_width; |
| 102 | }; |
| 103 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 104 | struct lcdc_panel_info { |
| 105 | uint32_t h_back_porch; |
| 106 | uint32_t h_front_porch; |
| 107 | uint32_t h_pulse_width; |
| 108 | uint32_t v_back_porch; |
| 109 | uint32_t v_front_porch; |
| 110 | uint32_t v_pulse_width; |
| 111 | uint32_t border_clr; |
| 112 | uint32_t underflow_clr; |
| 113 | uint32_t hsync_skew; |
| 114 | /* Pad width */ |
| 115 | uint32_t xres_pad; |
| 116 | /* Pad height */ |
| 117 | uint32_t yres_pad; |
Siddhartha Agrawal | 547ce4a | 2013-05-23 14:10:43 -0700 | [diff] [blame] | 118 | uint8_t dual_pipe; |
Kuogee Hsieh | ad69c3c | 2013-08-01 14:34:29 -0700 | [diff] [blame] | 119 | uint8_t split_display; |
Siddhartha Agrawal | 6ef1e22 | 2013-06-12 18:24:58 -0700 | [diff] [blame] | 120 | uint8_t pipe_swap; |
Vineet Bajaj | 4effb13 | 2014-07-24 16:55:41 +0530 | [diff] [blame] | 121 | uint8_t dst_split; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 122 | }; |
| 123 | |
Kuogee Hsieh | d58c809 | 2015-07-07 10:31:34 -0700 | [diff] [blame] | 124 | enum { |
| 125 | COMPRESSION_NONE, |
| 126 | COMPRESSION_DSC, |
| 127 | COMPRESSION_FBC |
| 128 | }; |
| 129 | |
| 130 | #define DCS_HDR_LEN 4 |
| 131 | #define DSC_PPS_LEN 128 |
| 132 | |
| 133 | struct msm_panel_info; |
| 134 | |
| 135 | struct dsc_desc { |
Kuogee Hsieh | d58c809 | 2015-07-07 10:31:34 -0700 | [diff] [blame] | 136 | int initial_lines; |
| 137 | int slice_last_group_size; |
| 138 | int bpp; /* target bit per pixel */ |
| 139 | int bpc; /* bit per component */ |
| 140 | int line_buf_depth; |
| 141 | int config_by_manufacture_cmd; |
| 142 | int block_pred_enable; |
| 143 | int vbr_enable; |
| 144 | int enable_422; |
| 145 | int convert_rgb; |
| 146 | int input_10_bits; |
| 147 | int slice_per_pkt; |
| 148 | |
| 149 | int major; |
| 150 | int minor; |
| 151 | int pps_id; |
| 152 | |
| 153 | int pic_height; |
| 154 | int pic_width; |
| 155 | int slice_height; |
| 156 | int slice_width; |
| 157 | int chunk_size; |
| 158 | |
| 159 | int pkt_per_line; |
| 160 | int bytes_in_slice; |
| 161 | int bytes_per_pkt; |
| 162 | int eol_byte_num; |
| 163 | int pclk_per_line; /* width */ |
| 164 | |
| 165 | int initial_dec_delay; |
| 166 | int initial_xmit_delay; |
| 167 | |
| 168 | int initial_scale_value; |
| 169 | int scale_decrement_interval; |
| 170 | int scale_increment_interval; |
| 171 | |
| 172 | int first_line_bpg_offset; |
| 173 | int nfl_bpg_offset; |
| 174 | int slice_bpg_offset; |
| 175 | |
| 176 | int initial_offset; |
| 177 | int final_offset; |
| 178 | |
| 179 | int rc_model_size; /* rate_buffer_size */ |
| 180 | |
| 181 | int det_thresh_flatness; |
| 182 | int max_qp_flatness; |
| 183 | int min_qp_flatness; |
| 184 | int edge_factor; |
| 185 | int quant_incr_limit0; |
| 186 | int quant_incr_limit1; |
| 187 | int tgt_offset_hi; |
| 188 | int tgt_offset_lo; |
| 189 | char *buf_thresh; |
| 190 | char *range_min_qp; |
| 191 | char *range_max_qp; |
| 192 | char *range_bpg_offset; |
| 193 | char pps_buf[DCS_HDR_LEN + DSC_PPS_LEN]; |
| 194 | |
| 195 | void (*parameter_calc) (struct msm_panel_info *pinfo); |
| 196 | int (*dsc2buf) (struct msm_panel_info *pinfo); |
| 197 | void (*dsi_dsc_config) (uint32_t base, int mode, struct dsc_desc *dsc); |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 198 | void (*mdp_dsc_config) (struct msm_panel_info *pinfo, |
| 199 | unsigned int pp_base, unsigned int dsc_base, |
| 200 | bool mux, bool split_mode); |
Kuogee Hsieh | d58c809 | 2015-07-07 10:31:34 -0700 | [diff] [blame] | 201 | }; |
| 202 | |
Siddhartha Agrawal | fe64dcb | 2014-10-07 12:41:01 -0700 | [diff] [blame] | 203 | struct fbc_panel_info { |
| 204 | uint32_t enabled; |
| 205 | uint32_t comp_ratio; |
| 206 | uint32_t comp_mode; |
| 207 | uint32_t qerr_enable; |
| 208 | uint32_t cd_bias; |
| 209 | uint32_t pat_enable; |
| 210 | uint32_t vlc_enable; |
| 211 | uint32_t bflc_enable; |
| 212 | |
| 213 | uint32_t line_x_budget; |
| 214 | uint32_t block_x_budget; |
| 215 | uint32_t block_budget; |
| 216 | |
| 217 | uint32_t lossless_mode_thd; |
| 218 | uint32_t lossy_mode_thd; |
| 219 | uint32_t lossy_rgb_thd; |
| 220 | uint32_t lossy_mode_idx; |
Jeevan Shriram | 1b07e37 | 2014-11-30 22:03:50 -0800 | [diff] [blame] | 221 | |
| 222 | uint32_t slice_height; |
| 223 | uint32_t pred_mode; |
| 224 | uint32_t max_pred_err; |
Siddhartha Agrawal | fe64dcb | 2014-10-07 12:41:01 -0700 | [diff] [blame] | 225 | }; |
| 226 | |
Huaibin Yang | 88540b3 | 2014-11-07 13:59:54 -0800 | [diff] [blame] | 227 | |
| 228 | struct dfps_panel_info { |
| 229 | uint32_t enabled; |
| 230 | uint32_t frame_rate_cnt; |
| 231 | uint32_t frame_rate[DFPS_MAX_FRAME_RATE]; |
| 232 | }; |
| 233 | |
| 234 | struct dfps_pll_codes { |
| 235 | uint32_t codes[2]; |
| 236 | }; |
| 237 | |
| 238 | struct dfps_codes_info { |
| 239 | uint32_t is_valid; |
| 240 | uint32_t frame_rate; |
| 241 | uint32_t clk_rate; |
| 242 | struct dfps_pll_codes pll_codes; |
| 243 | }; |
| 244 | |
| 245 | struct dfps_info { |
| 246 | struct dfps_panel_info panel_dfps; |
| 247 | struct dfps_codes_info codes_dfps[DFPS_MAX_FRAME_RATE]; |
| 248 | void *dfps_fb_base; |
| 249 | }; |
| 250 | |
Siddhartha Agrawal | fe64dcb | 2014-10-07 12:41:01 -0700 | [diff] [blame] | 251 | /* intf timing settings */ |
| 252 | struct intf_timing_params { |
| 253 | uint32_t width; |
| 254 | uint32_t height; |
| 255 | uint32_t xres; |
| 256 | uint32_t yres; |
| 257 | |
| 258 | uint32_t h_back_porch; |
| 259 | uint32_t h_front_porch; |
| 260 | uint32_t v_back_porch; |
| 261 | uint32_t v_front_porch; |
| 262 | uint32_t hsync_pulse_width; |
| 263 | uint32_t vsync_pulse_width; |
| 264 | |
| 265 | uint32_t border_clr; |
| 266 | uint32_t underflow_clr; |
| 267 | uint32_t hsync_skew; |
| 268 | }; |
| 269 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 270 | struct mipi_panel_info { |
Siddhartha Agrawal | 007ea9e | 2014-10-14 15:02:48 -0700 | [diff] [blame] | 271 | char cmds_post_tg; /* send on commands after tg on */ |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 272 | char mode; /* video/cmd */ |
| 273 | char interleave_mode; |
Arpita Banerjee | f1a8ac9 | 2013-05-21 10:09:35 -0700 | [diff] [blame] | 274 | int eof_bllp_power; |
Arpita Banerjee | 2522bc6 | 2013-05-24 16:03:53 -0700 | [diff] [blame] | 275 | uint32_t bitclock; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 276 | char crc_check; |
| 277 | char ecc_check; |
| 278 | char dst_format; /* shared by video and command */ |
| 279 | char num_of_lanes; |
| 280 | char data_lane0; |
| 281 | char data_lane1; |
| 282 | char data_lane2; |
| 283 | char data_lane3; |
| 284 | char dlane_swap; /* data lane swap */ |
| 285 | char rgb_swap; |
| 286 | char b_sel; |
| 287 | char g_sel; |
| 288 | char r_sel; |
| 289 | char rx_eot_ignore; |
| 290 | char tx_eot_append; |
| 291 | char t_clk_post; /* 0xc0, DSI_CLKOUT_TIMING_CTRL */ |
| 292 | char t_clk_pre; /* 0xc0, DSI_CLKOUT_TIMING_CTRL */ |
| 293 | char vc; /* virtual channel */ |
| 294 | struct mipi_dsi_phy_ctrl *dsi_phy_db; |
Siddhartha Agrawal | 3e694ea | 2013-01-23 17:01:31 -0800 | [diff] [blame] | 295 | struct mdss_dsi_phy_ctrl *mdss_dsi_phy_db; |
Arpita Banerjee | 2522bc6 | 2013-05-24 16:03:53 -0700 | [diff] [blame] | 296 | struct mdss_dsi_pll_config *dsi_pll_config; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 297 | struct mipi_dsi_cmd *panel_on_cmds; |
| 298 | int num_of_panel_on_cmds; |
| 299 | struct mipi_dsi_cmd *panel_off_cmds; |
| 300 | int num_of_panel_off_cmds; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 301 | /* video mode */ |
| 302 | char pulse_mode_hsa_he; |
| 303 | char hfp_power_stop; |
| 304 | char hbp_power_stop; |
| 305 | char hsa_power_stop; |
| 306 | char eof_bllp_power_stop; |
| 307 | char bllp_power_stop; |
| 308 | char traffic_mode; |
| 309 | char frame_rate; |
| 310 | /* command mode */ |
| 311 | char interleave_max; |
| 312 | char insert_dcs_cmd; |
| 313 | char wr_mem_continue; |
| 314 | char wr_mem_start; |
| 315 | char te_sel; |
| 316 | char stream; /* 0 or 1 */ |
| 317 | char mdp_trigger; |
| 318 | char dma_trigger; |
| 319 | uint32_t dsi_pclk_rate; |
| 320 | /* The packet-size should not bet changed */ |
| 321 | char no_max_pkt_size; |
| 322 | /* Clock required during LP commands */ |
| 323 | char force_clk_lane_hs; |
Channagoud Kadabi | 539ef72 | 2012-03-29 16:02:50 +0530 | [diff] [blame] | 324 | char lane_swap; |
Siddhartha Agrawal | 547ce4a | 2013-05-23 14:10:43 -0700 | [diff] [blame] | 325 | uint8_t dual_dsi; |
Padmanabhan Komanduru | c0766c8 | 2015-04-27 16:39:15 -0700 | [diff] [blame] | 326 | uint8_t use_dsi1_pll; |
Siddhartha Agrawal | 547ce4a | 2013-05-23 14:10:43 -0700 | [diff] [blame] | 327 | uint8_t broadcast; |
Dhaval Patel | 940e09c | 2013-08-08 20:47:05 -0700 | [diff] [blame] | 328 | uint8_t mode_gpio_state; |
Casey Piper | 8403675 | 2013-09-05 14:56:37 -0700 | [diff] [blame] | 329 | uint32_t signature; |
Aravind Venkateswaran | 27338a9 | 2013-11-04 17:27:05 -0800 | [diff] [blame] | 330 | uint32_t use_enable_gpio; |
Aravind Venkateswaran | fec354c | 2014-12-04 18:10:14 -0800 | [diff] [blame] | 331 | uint32_t ctl_base; |
| 332 | uint32_t phy_base; |
| 333 | uint32_t sctl_base; |
| 334 | uint32_t sphy_base; |
Jeevan Shriram | 0137932 | 2015-01-07 17:41:26 -0800 | [diff] [blame] | 335 | uint32_t reg_base; |
| 336 | uint32_t sreg_base; |
Padmanabhan Komanduru | c0766c8 | 2015-04-27 16:39:15 -0700 | [diff] [blame] | 337 | uint32_t pll_base; |
| 338 | uint32_t spll_base; |
Huaibin Yang | 88540b3 | 2014-11-07 13:59:54 -0800 | [diff] [blame] | 339 | |
| 340 | struct dfps_pll_codes pll_codes; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 341 | }; |
| 342 | |
Kuogee Hsieh | ad69c3c | 2013-08-01 14:34:29 -0700 | [diff] [blame] | 343 | struct edp_panel_info { |
| 344 | int max_lane_count; |
| 345 | unsigned long max_link_clk; |
| 346 | }; |
| 347 | |
Vineet Bajaj | c227246 | 2015-05-07 17:35:03 +0530 | [diff] [blame] | 348 | struct dsi2HDMI_panel_info { |
| 349 | struct mipi_dsi_i2c_cmd *dsi_tg_i2c_cmd; |
| 350 | struct mipi_dsi_i2c_cmd *dsi_setup_cfg_i2c_cmd; |
| 351 | int num_of_tg_i2c_cmds; |
| 352 | int num_of_cfg_i2c_cmds; |
| 353 | }; |
| 354 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 355 | enum lvds_mode { |
| 356 | LVDS_SINGLE_CHANNEL_MODE, |
| 357 | LVDS_DUAL_CHANNEL_MODE, |
| 358 | }; |
| 359 | |
| 360 | struct lvds_panel_info { |
| 361 | enum lvds_mode channel_mode; |
| 362 | /* Channel swap in dual mode */ |
| 363 | char channel_swap; |
| 364 | }; |
| 365 | |
Kuogee Hsieh | 9747d9e | 2014-12-05 15:42:11 -0800 | [diff] [blame] | 366 | struct labibb_desc { |
| 367 | char amoled_panel; /* lcd = 0, amoled = 1*/ |
| 368 | char force_config; /* 0 to use default value */ |
| 369 | uint32_t ibb_min_volt; |
| 370 | uint32_t ibb_max_volt; |
| 371 | uint32_t lab_min_volt; |
| 372 | uint32_t lab_max_volt; |
| 373 | char pwr_up_delay; /* ndx to => 1250, 2500, 5000 and 10000 us */ |
| 374 | char pwr_down_delay; /* ndx to => 1250, 2500, 5000 and 10000 us */ |
| 375 | char ibb_discharge_en; |
Vishnuvardhan Prodduturi | 4aa8dc4 | 2015-10-20 21:20:43 +0530 | [diff] [blame] | 376 | bool swire_control; |
Kuogee Hsieh | 9747d9e | 2014-12-05 15:42:11 -0800 | [diff] [blame] | 377 | }; |
| 378 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 379 | struct msm_panel_info { |
| 380 | uint32_t xres; |
| 381 | uint32_t yres; |
| 382 | uint32_t bpp; |
| 383 | uint32_t type; |
| 384 | uint32_t wait_cycle; |
| 385 | uint32_t clk_rate; |
Prashant Nukala | 64eeff9 | 2014-07-11 07:35:34 +0530 | [diff] [blame] | 386 | uint32_t orientation; |
Aravind Venkateswaran | fec354c | 2014-12-04 18:10:14 -0800 | [diff] [blame] | 387 | uint32_t dest; |
Kuogee Hsieh | d58c809 | 2015-07-07 10:31:34 -0700 | [diff] [blame] | 388 | uint32_t compression_mode; |
Jayant Shekhar | 03e1a22 | 2014-05-22 11:03:53 +0530 | [diff] [blame] | 389 | /* Select pipe type for handoff */ |
| 390 | uint32_t pipe_type; |
Arpita Banerjee | f1a8ac9 | 2013-05-21 10:09:35 -0700 | [diff] [blame] | 391 | char lowpowerstop; |
Kuogee Hsieh | 208736d | 2014-08-22 14:16:55 -0700 | [diff] [blame] | 392 | char lcd_reg_en; |
Kuogee Hsieh | 31b4ff9 | 2014-10-22 14:55:42 -0700 | [diff] [blame] | 393 | uint32_t border_top; |
| 394 | uint32_t border_bottom; |
| 395 | uint32_t border_left; |
| 396 | uint32_t border_right; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 397 | |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 398 | int lm_split[2]; |
| 399 | int num_dsc_enc; |
| 400 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 401 | struct lcd_panel_info lcd; |
| 402 | struct lcdc_panel_info lcdc; |
Siddhartha Agrawal | fe64dcb | 2014-10-07 12:41:01 -0700 | [diff] [blame] | 403 | struct fbc_panel_info fbc; |
Kuogee Hsieh | d58c809 | 2015-07-07 10:31:34 -0700 | [diff] [blame] | 404 | struct dsc_desc dsc; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 405 | struct mipi_panel_info mipi; |
| 406 | struct lvds_panel_info lvds; |
Ajay Singh Parmar | 7c1cd52 | 2013-02-13 20:33:49 +0530 | [diff] [blame] | 407 | struct hdmi_panel_info hdmi; |
Kuogee Hsieh | ad69c3c | 2013-08-01 14:34:29 -0700 | [diff] [blame] | 408 | struct edp_panel_info edp; |
Vineet Bajaj | c227246 | 2015-05-07 17:35:03 +0530 | [diff] [blame] | 409 | struct dsi2HDMI_panel_info adv7533; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 410 | |
Huaibin Yang | 88540b3 | 2014-11-07 13:59:54 -0800 | [diff] [blame] | 411 | struct dfps_info dfps; |
| 412 | |
Kuogee Hsieh | 9747d9e | 2014-12-05 15:42:11 -0800 | [diff] [blame] | 413 | struct labibb_desc *labibb; |
| 414 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 415 | int (*on) (void); |
| 416 | int (*off) (void); |
Dhaval Patel | aa081d3 | 2013-10-25 13:47:46 -0700 | [diff] [blame] | 417 | int (*pre_on) (void); |
| 418 | int (*pre_off) (void); |
Kuogee Hsieh | ad69c3c | 2013-08-01 14:34:29 -0700 | [diff] [blame] | 419 | int (*prepare) (void); |
Amir Samuelov | 2d4ba16 | 2012-07-22 11:53:14 +0300 | [diff] [blame] | 420 | int (*early_config) (void *pdata); |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 421 | int (*config) (void *pdata); |
Channagoud Kadabi | 01c9182 | 2012-06-06 15:53:30 +0530 | [diff] [blame] | 422 | int (*rotate) (void); |
Sandeep Panda | 6c24af7 | 2015-12-23 15:36:07 +0530 | [diff] [blame] | 423 | |
| 424 | char autorefresh_enable; |
| 425 | uint32_t autorefresh_framenum; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 426 | }; |
| 427 | |
| 428 | struct msm_fb_panel_data { |
| 429 | struct msm_panel_info panel_info; |
| 430 | struct fbcon_config fb; |
| 431 | int mdp_rev; |
Channagoud Kadabi | 01c9182 | 2012-06-06 15:53:30 +0530 | [diff] [blame] | 432 | int rotate; |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 433 | |
| 434 | /* function entry chain */ |
Veera Sundaram Sankaran | db0b2bf | 2014-12-16 18:09:27 -0800 | [diff] [blame] | 435 | int (*power_func) (uint8_t enable, struct msm_panel_info *); |
| 436 | uint32_t (*clk_func) (uint8_t enable, struct msm_panel_info *pinfo); |
| 437 | int (*bl_func) (uint8_t enable); |
| 438 | uint32_t (*pll_clk_func) (uint8_t enable, struct msm_panel_info *); |
Huaibin Yang | 88540b3 | 2014-11-07 13:59:54 -0800 | [diff] [blame] | 439 | int (*dfps_func)(struct msm_panel_info *); |
Jayant Shekhar | e2e6b71 | 2013-11-20 16:54:20 +0530 | [diff] [blame] | 440 | int (*post_power_func)(int enable); |
Ray Zhang | 4c7e37f | 2013-12-03 17:04:55 +0800 | [diff] [blame] | 441 | int (*pre_init_func)(void); |
Casey Piper | 6c2f113 | 2015-03-24 11:37:19 -0700 | [diff] [blame] | 442 | int (*update_panel_info) (void); |
Vineet Bajaj | c227246 | 2015-05-07 17:35:03 +0530 | [diff] [blame] | 443 | int (*dsi2HDMI_config) (struct msm_panel_info *); |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 444 | }; |
| 445 | |
Shashank Mittal | 4bfb2e3 | 2012-04-16 10:56:27 -0700 | [diff] [blame] | 446 | #endif |