Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions |
| 5 | * are 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 copyright |
| 9 | * notice, this list of conditions and the following disclaimer in |
| 10 | * the documentation and/or other materials provided with the |
| 11 | * distribution. |
| 12 | * * Neither the name of The Linux Foundation nor the names of its |
| 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 19 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 20 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 22 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 23 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 24 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 26 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 27 | * SUCH DAMAGE. |
| 28 | */ |
| 29 | |
| 30 | #include <debug.h> |
| 31 | #include <err.h> |
| 32 | #include <smem.h> |
| 33 | #include <msm_panel.h> |
| 34 | #include <board.h> |
| 35 | #include <mipi_dsi.h> |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 36 | #include <target/display.h> |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 37 | |
| 38 | #include "include/panel.h" |
| 39 | #include "panel_display.h" |
| 40 | |
| 41 | /*---------------------------------------------------------------------------*/ |
| 42 | /* GCDB Panel Database */ |
| 43 | /*---------------------------------------------------------------------------*/ |
| 44 | #include "include/panel_jdi_1080p_video.h" |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 45 | #include "include/panel_nt35590_720p_video.h" |
| 46 | #include "include/panel_nt35590_720p_cmd.h" |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 47 | #include "include/panel_innolux_720p_video.h" |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 48 | #include "include/panel_otm8019a_fwvga_video.h" |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 49 | #include "include/panel_otm1283a_720p_video.h" |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 50 | #include "include/panel_nt35596_1080p_skuk_video.h" |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 51 | #include "include/panel_sharp_wqxga_dualdsi_video.h" |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 52 | #include "include/panel_jdi_fhd_video.h" |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 53 | #include "include/panel_hx8379a_fwvga_video.h" |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 54 | #include "include/panel_hx8394d_720p_video.h" |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 55 | #include "include/panel_nt35521_wxga_video.h" |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 56 | |
| 57 | #define DISPLAY_MAX_PANEL_DETECTION 2 |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 58 | #define OTM8019A_FWVGA_VIDEO_PANEL_ON_DELAY 50 |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 59 | #define NT35590_720P_CMD_PANEL_ON_DELAY 40 |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 60 | |
| 61 | /*---------------------------------------------------------------------------*/ |
| 62 | /* static panel selection variable */ |
| 63 | /*---------------------------------------------------------------------------*/ |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 64 | static uint32_t auto_pan_loop = 0; |
| 65 | |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 66 | uint32_t panel_regulator_settings[] = { |
| 67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 68 | }; |
| 69 | |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 70 | /* |
| 71 | * The list of panels that are supported on this target. |
| 72 | * Any panel in this list can be selected using fastboot oem command. |
| 73 | */ |
| 74 | static struct panel_list supp_panels[] = { |
| 75 | {"jdi_1080p_video", JDI_1080P_VIDEO_PANEL}, |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 76 | {"nt35590_720p_video", NT35590_720P_VIDEO_PANEL}, |
| 77 | {"nt35590_720p_cmd", NT35590_720P_CMD_PANEL}, |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 78 | {"innolux_720p_video", INNOLUX_720P_VIDEO_PANEL}, |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 79 | {"otm8019a_fwvga_video", OTM8019A_FWVGA_VIDEO_PANEL}, |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 80 | {"otm1283a_720p_video", OTM1283A_720P_VIDEO_PANEL}, |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 81 | {"nt35596_1080p_video", NT35596_1080P_VIDEO_PANEL}, |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 82 | {"sharp_wqxga_dualdsi_video",SHARP_WQXGA_DUALDSI_VIDEO_PANEL}, |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 83 | {"jdi_fhd_video", JDI_FHD_VIDEO_PANEL}, |
| 84 | {"hx8379a_wvga_video", HX8379A_FWVGA_VIDEO_PANEL}, |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 85 | {"hx8394d_720p_video", HX8394D_720P_VIDEO_PANEL}, |
| 86 | {"nt35521_wxga_video", NT35521_WXGA_VIDEO_PANEL} |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | static uint32_t panel_id; |
| 90 | |
| 91 | int oem_panel_rotation() |
| 92 | { |
| 93 | return NO_ERROR; |
| 94 | } |
| 95 | |
| 96 | int oem_panel_on() |
| 97 | { |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 98 | /* |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 99 | *OEM can keep their panel specific on instructions in this |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 100 | *function |
| 101 | */ |
| 102 | if (panel_id == OTM8019A_FWVGA_VIDEO_PANEL) { |
| 103 | /* needs extra delay to avoid unexpected artifacts */ |
| 104 | mdelay(OTM8019A_FWVGA_VIDEO_PANEL_ON_DELAY); |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 105 | } else if (panel_id == NT35590_720P_CMD_PANEL) { |
| 106 | /* needs extra delay to avoid snow screen artifacts */ |
| 107 | mdelay(NT35590_720P_CMD_PANEL_ON_DELAY); |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 108 | } |
| 109 | |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 110 | return NO_ERROR; |
| 111 | } |
| 112 | |
| 113 | int oem_panel_off() |
| 114 | { |
| 115 | /* OEM can keep their panel specific off instructions |
| 116 | * in this function |
| 117 | */ |
| 118 | return NO_ERROR; |
| 119 | } |
| 120 | |
Vineet Bajaj | 3c958dc | 2014-11-07 17:01:29 +0530 | [diff] [blame] | 121 | uint32_t get_panel_id(void) |
| 122 | { |
| 123 | return panel_id; |
| 124 | } |
| 125 | |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 126 | static int init_panel_data(struct panel_struct *panelstruct, |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 127 | struct msm_panel_info *pinfo, |
| 128 | struct mdss_dsi_phy_ctrl *phy_db) |
| 129 | { |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 130 | int pan_type = PANEL_TYPE_DSI; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 131 | |
| 132 | switch (panel_id) { |
| 133 | case JDI_1080P_VIDEO_PANEL: |
| 134 | panelstruct->paneldata = &jdi_1080p_video_panel_data; |
| 135 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 136 | panelstruct->panelres = &jdi_1080p_video_panel_res; |
| 137 | panelstruct->color = &jdi_1080p_video_color; |
| 138 | panelstruct->videopanel = &jdi_1080p_video_video_panel; |
| 139 | panelstruct->commandpanel = &jdi_1080p_video_command_panel; |
| 140 | panelstruct->state = &jdi_1080p_video_state; |
| 141 | panelstruct->laneconfig = &jdi_1080p_video_lane_config; |
| 142 | panelstruct->paneltiminginfo |
| 143 | = &jdi_1080p_video_timing_info; |
| 144 | panelstruct->panelresetseq |
| 145 | = &jdi_1080p_video_panel_reset_seq; |
| 146 | panelstruct->backlightinfo = &jdi_1080p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 147 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 148 | = jdi_1080p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 149 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 150 | = JDI_1080P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 151 | pinfo->mipi.panel_off_cmds |
| 152 | = jdi_1080p_video_off_command; |
| 153 | pinfo->mipi.num_of_panel_off_cmds |
| 154 | = JDI_1080P_VIDEO_OFF_COMMAND; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 155 | memcpy(phy_db->timing, |
| 156 | jdi_1080p_video_timings, TIMING_SIZE); |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 157 | pinfo->mipi.signature = JDI_1080P_VIDEO_SIGNATURE; |
| 158 | break; |
| 159 | case NT35590_720P_VIDEO_PANEL: |
| 160 | panelstruct->paneldata = &nt35590_720p_video_panel_data; |
| 161 | panelstruct->panelres = &nt35590_720p_video_panel_res; |
| 162 | panelstruct->color = &nt35590_720p_video_color; |
| 163 | panelstruct->videopanel = &nt35590_720p_video_video_panel; |
| 164 | panelstruct->commandpanel = &nt35590_720p_video_command_panel; |
| 165 | panelstruct->state = &nt35590_720p_video_state; |
| 166 | panelstruct->laneconfig = &nt35590_720p_video_lane_config; |
| 167 | panelstruct->paneltiminginfo |
| 168 | = &nt35590_720p_video_timing_info; |
| 169 | panelstruct->panelresetseq |
| 170 | = &nt35590_720p_video_panel_reset_seq; |
| 171 | panelstruct->backlightinfo = &nt35590_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 172 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 173 | = nt35590_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 174 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 175 | = NT35590_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 176 | pinfo->mipi.panel_off_cmds |
| 177 | = nt35590_720p_video_off_command; |
| 178 | pinfo->mipi.num_of_panel_off_cmds |
| 179 | = NT35590_720P_VIDEO_OFF_COMMAND; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 180 | memcpy(phy_db->timing, |
| 181 | nt35590_720p_video_timings, TIMING_SIZE); |
| 182 | pinfo->mipi.signature = NT35590_720P_VIDEO_SIGNATURE; |
| 183 | break; |
| 184 | case NT35590_720P_CMD_PANEL: |
| 185 | panelstruct->paneldata = &nt35590_720p_cmd_panel_data; |
| 186 | panelstruct->panelres = &nt35590_720p_cmd_panel_res; |
| 187 | panelstruct->color = &nt35590_720p_cmd_color; |
| 188 | panelstruct->videopanel = &nt35590_720p_cmd_video_panel; |
| 189 | panelstruct->commandpanel = &nt35590_720p_cmd_command_panel; |
| 190 | panelstruct->state = &nt35590_720p_cmd_state; |
| 191 | panelstruct->laneconfig = &nt35590_720p_cmd_lane_config; |
| 192 | panelstruct->paneltiminginfo = &nt35590_720p_cmd_timing_info; |
| 193 | panelstruct->panelresetseq |
| 194 | = &nt35590_720p_cmd_panel_reset_seq; |
| 195 | panelstruct->backlightinfo = &nt35590_720p_cmd_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 196 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 197 | = nt35590_720p_cmd_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 198 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 199 | = NT35590_720P_CMD_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 200 | pinfo->mipi.panel_off_cmds |
| 201 | = nt35590_720p_cmd_off_command; |
| 202 | pinfo->mipi.num_of_panel_off_cmds |
| 203 | = NT35590_720P_CMD_OFF_COMMAND; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 204 | memcpy(phy_db->timing, |
| 205 | nt35590_720p_cmd_timings, TIMING_SIZE); |
| 206 | pinfo->mipi.signature = NT35590_720P_CMD_SIGNATURE; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 207 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 208 | case INNOLUX_720P_VIDEO_PANEL: |
| 209 | panelstruct->paneldata = &innolux_720p_video_panel_data; |
| 210 | panelstruct->panelres = &innolux_720p_video_panel_res; |
| 211 | panelstruct->color = &innolux_720p_video_color; |
| 212 | panelstruct->videopanel = &innolux_720p_video_video_panel; |
| 213 | panelstruct->commandpanel = &innolux_720p_video_command_panel; |
| 214 | panelstruct->state = &innolux_720p_video_state; |
| 215 | panelstruct->laneconfig = &innolux_720p_video_lane_config; |
| 216 | panelstruct->paneltiminginfo |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 217 | = &innolux_720p_video_timing_info; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 218 | panelstruct->panelresetseq |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 219 | = &innolux_720p_video_reset_seq; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 220 | panelstruct->backlightinfo = &innolux_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 221 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 222 | = innolux_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 223 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 224 | = INNOLUX_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 225 | pinfo->mipi.panel_off_cmds |
| 226 | = innolux_720p_video_off_command; |
| 227 | pinfo->mipi.num_of_panel_off_cmds |
| 228 | = INNOLUX_720P_VIDEO_OFF_COMMAND; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 229 | memcpy(phy_db->timing, |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 230 | innolux_720p_video_timings, TIMING_SIZE); |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 231 | break; |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 232 | case OTM8019A_FWVGA_VIDEO_PANEL: |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 233 | panelstruct->paneldata = &otm8019a_fwvga_video_panel_data; |
| 234 | panelstruct->panelres = &otm8019a_fwvga_video_panel_res; |
| 235 | panelstruct->color = &otm8019a_fwvga_video_color; |
| 236 | panelstruct->videopanel = &otm8019a_fwvga_video_video_panel; |
| 237 | panelstruct->commandpanel = &otm8019a_fwvga_video_command_panel; |
| 238 | panelstruct->state = &otm8019a_fwvga_video_state; |
| 239 | panelstruct->laneconfig = &otm8019a_fwvga_video_lane_config; |
| 240 | panelstruct->paneltiminginfo |
| 241 | = &otm8019a_fwvga_video_timing_info; |
| 242 | panelstruct->panelresetseq |
| 243 | = &otm8019a_fwvga_video_reset_seq; |
| 244 | panelstruct->backlightinfo = &otm8019a_fwvga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 245 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 246 | = otm8019a_fwvga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 247 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 248 | = OTM8019A_FWVGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 249 | pinfo->mipi.panel_off_cmds |
| 250 | = otm8019a_fwvga_video_off_command; |
| 251 | pinfo->mipi.num_of_panel_off_cmds |
| 252 | = OTM8019A_FWVGA_VIDEO_OFF_COMMAND; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 253 | memcpy(phy_db->timing, |
| 254 | otm8019a_fwvga_video_timings, TIMING_SIZE); |
| 255 | break; |
| 256 | case OTM1283A_720P_VIDEO_PANEL: |
| 257 | panelstruct->paneldata = &otm1283a_720p_video_panel_data; |
| 258 | panelstruct->panelres = &otm1283a_720p_video_panel_res; |
| 259 | panelstruct->color = &otm1283a_720p_video_color; |
| 260 | panelstruct->videopanel = &otm1283a_720p_video_video_panel; |
| 261 | panelstruct->commandpanel = &otm1283a_720p_video_command_panel; |
| 262 | panelstruct->state = &otm1283a_720p_video_state; |
| 263 | panelstruct->laneconfig = &otm1283a_720p_video_lane_config; |
| 264 | panelstruct->paneltiminginfo |
| 265 | = &otm1283a_720p_video_timing_info; |
| 266 | panelstruct->panelresetseq |
| 267 | = &otm1283a_720p_video_reset_seq; |
| 268 | panelstruct->backlightinfo = &otm1283a_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 269 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 270 | = otm1283a_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 271 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 272 | = OTM1283A_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 273 | pinfo->mipi.panel_off_cmds |
| 274 | = otm1283a_720p_video_off_command; |
| 275 | pinfo->mipi.num_of_panel_off_cmds |
| 276 | = OTM1283A_720P_VIDEO_OFF_COMMAND; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 277 | memcpy(phy_db->timing, |
| 278 | otm1283a_720p_video_timings, TIMING_SIZE); |
| 279 | break; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 280 | case NT35596_1080P_VIDEO_PANEL: |
| 281 | panelstruct->paneldata = &nt35596_1080p_skuk_video_panel_data; |
| 282 | panelstruct->panelres = &nt35596_1080p_skuk_video_panel_res; |
| 283 | panelstruct->color = &nt35596_1080p_skuk_video_color; |
| 284 | panelstruct->videopanel = &nt35596_1080p_skuk_video_video_panel; |
| 285 | panelstruct->commandpanel = &nt35596_1080p_skuk_video_command_panel; |
| 286 | panelstruct->state = &nt35596_1080p_skuk_video_state; |
| 287 | panelstruct->laneconfig = &nt35596_1080p_skuk_video_lane_config; |
| 288 | panelstruct->paneltiminginfo |
| 289 | = &nt35596_1080p_skuk_video_timing_info; |
| 290 | panelstruct->panelresetseq |
| 291 | = &nt35596_1080p_skuk_video_reset_seq; |
| 292 | panelstruct->backlightinfo = &nt35596_1080p_skuk_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 293 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 294 | = nt35596_1080p_skuk_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 295 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 296 | = NT35596_1080P_SKUK_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 297 | pinfo->mipi.panel_off_cmds |
| 298 | = nt35596_1080p_skuk_video_off_command; |
| 299 | pinfo->mipi.num_of_panel_off_cmds |
| 300 | = NT35596_1080P_SKUK_VIDEO_OFF_COMMAND; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 301 | memcpy(phy_db->timing, |
| 302 | nt35596_1080p_skuk_video_timings, TIMING_SIZE); |
| 303 | break; |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 304 | case SHARP_WQXGA_DUALDSI_VIDEO_PANEL: |
| 305 | panelstruct->paneldata = &sharp_wqxga_dualdsi_video_panel_data; |
| 306 | panelstruct->panelres = &sharp_wqxga_dualdsi_video_panel_res; |
| 307 | panelstruct->color = &sharp_wqxga_dualdsi_video_color; |
| 308 | panelstruct->videopanel = &sharp_wqxga_dualdsi_video_video_panel; |
| 309 | panelstruct->commandpanel = &sharp_wqxga_dualdsi_video_command_panel; |
| 310 | panelstruct->state = &sharp_wqxga_dualdsi_video_state; |
| 311 | panelstruct->laneconfig = &sharp_wqxga_dualdsi_video_lane_config; |
| 312 | panelstruct->paneltiminginfo |
| 313 | = &sharp_wqxga_dualdsi_video_timing_info; |
| 314 | panelstruct->panelresetseq |
| 315 | = &sharp_wqxga_dualdsi_video_reset_seq; |
| 316 | panelstruct->backlightinfo = &sharp_wqxga_dualdsi_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 317 | pinfo->mipi.panel_on_cmds |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 318 | = sharp_wqxga_dualdsi_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 319 | pinfo->mipi.num_of_panel_on_cmds |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 320 | = SHARP_WQXGA_DUALDSI_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 321 | pinfo->mipi.panel_off_cmds |
| 322 | = sharp_wqxga_dualdsi_video_off_command; |
| 323 | pinfo->mipi.num_of_panel_off_cmds |
| 324 | = SHARP_WQXGA_DUALDSI_VIDEO_OFF_COMMAND; |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 325 | memcpy(phy_db->timing, |
| 326 | sharp_wqxga_dualdsi_video_timings, TIMING_SIZE); |
| 327 | pinfo->mipi.signature = SHARP_WQXGA_DUALDSI_VIDEO_SIGNATURE; |
| 328 | break; |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 329 | case JDI_FHD_VIDEO_PANEL: |
| 330 | panelstruct->paneldata = &jdi_fhd_video_panel_data; |
| 331 | panelstruct->panelres = &jdi_fhd_video_panel_res; |
| 332 | panelstruct->color = &jdi_fhd_video_color; |
| 333 | panelstruct->videopanel = &jdi_fhd_video_video_panel; |
| 334 | panelstruct->commandpanel = &jdi_fhd_video_command_panel; |
| 335 | panelstruct->state = &jdi_fhd_video_state; |
| 336 | panelstruct->laneconfig = &jdi_fhd_video_lane_config; |
| 337 | panelstruct->paneltiminginfo |
| 338 | = &jdi_fhd_video_timing_info; |
| 339 | panelstruct->panelresetseq |
| 340 | = &jdi_fhd_video_reset_seq; |
| 341 | panelstruct->backlightinfo = &jdi_fhd_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 342 | pinfo->mipi.panel_on_cmds |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 343 | = jdi_fhd_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 344 | pinfo->mipi.num_of_panel_on_cmds |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 345 | = JDI_FHD_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 346 | pinfo->mipi.panel_off_cmds |
| 347 | = jdi_fhd_video_off_command; |
| 348 | pinfo->mipi.num_of_panel_off_cmds |
| 349 | = JDI_FHD_VIDEO_OFF_COMMAND; |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 350 | memcpy(phy_db->timing, |
| 351 | jdi_fhd_video_timings, TIMING_SIZE); |
| 352 | break; |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 353 | case HX8379A_FWVGA_VIDEO_PANEL: |
| 354 | panelstruct->paneldata = &hx8379a_fwvga_video_panel_data; |
| 355 | panelstruct->panelres = &hx8379a_fwvga_video_panel_res; |
| 356 | panelstruct->color = &hx8379a_fwvga_video_color; |
| 357 | panelstruct->videopanel = &hx8379a_fwvga_video_video_panel; |
| 358 | panelstruct->commandpanel = &hx8379a_fwvga_video_command_panel; |
| 359 | panelstruct->state = &hx8379a_fwvga_video_state; |
| 360 | panelstruct->laneconfig = &hx8379a_fwvga_video_lane_config; |
| 361 | panelstruct->paneltiminginfo |
| 362 | = &hx8379a_fwvga_video_timing_info; |
| 363 | panelstruct->panelresetseq |
| 364 | = &hx8379a_fwvga_video_reset_seq; |
| 365 | panelstruct->backlightinfo = &hx8379a_fwvga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 366 | pinfo->mipi.panel_on_cmds |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 367 | = hx8379a_fwvga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 368 | pinfo->mipi.num_of_panel_on_cmds |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 369 | = HX8379A_FWVGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 370 | pinfo->mipi.panel_off_cmds |
| 371 | = hx8379a_fwvga_video_off_command; |
| 372 | pinfo->mipi.num_of_panel_off_cmds |
| 373 | = HX8379A_FWVGA_VIDEO_OFF_COMMAND; |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 374 | memcpy(phy_db->timing, |
| 375 | hx8379a_fwvga_video_timings, TIMING_SIZE); |
| 376 | break; |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 377 | case HX8394D_720P_VIDEO_PANEL: |
| 378 | panelstruct->paneldata = &hx8394d_720p_video_panel_data; |
| 379 | panelstruct->panelres = &hx8394d_720p_video_panel_res; |
| 380 | panelstruct->color = &hx8394d_720p_video_color; |
| 381 | panelstruct->videopanel = &hx8394d_720p_video_video_panel; |
| 382 | panelstruct->commandpanel = &hx8394d_720p_video_command_panel; |
| 383 | panelstruct->state = &hx8394d_720p_video_state; |
| 384 | panelstruct->laneconfig = &hx8394d_720p_video_lane_config; |
| 385 | panelstruct->paneltiminginfo |
| 386 | = &hx8394d_720p_video_timing_info; |
| 387 | panelstruct->panelresetseq |
| 388 | = &hx8394d_720p_video_panel_reset_seq; |
| 389 | panelstruct->backlightinfo = &hx8394d_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 390 | pinfo->mipi.panel_on_cmds |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 391 | = hx8394d_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 392 | pinfo->mipi.num_of_panel_on_cmds |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 393 | = HX8394D_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 394 | pinfo->mipi.panel_off_cmds |
| 395 | = hx8394d_720p_video_off_command; |
| 396 | pinfo->mipi.num_of_panel_off_cmds |
| 397 | = HX8394D_720P_VIDEO_OFF_COMMAND; |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 398 | memcpy(phy_db->timing, |
| 399 | hx8394d_720p_video_timings, TIMING_SIZE); |
| 400 | pinfo->mipi.signature = HX8394D_720P_VIDEO_SIGNATURE; |
| 401 | break; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 402 | case NT35521_WXGA_VIDEO_PANEL: |
| 403 | panelstruct->paneldata = &nt35521_wxga_video_panel_data; |
| 404 | panelstruct->panelres = &nt35521_wxga_video_panel_res; |
| 405 | panelstruct->color = &nt35521_wxga_video_color; |
| 406 | panelstruct->videopanel = &nt35521_wxga_video_video_panel; |
| 407 | panelstruct->commandpanel = &nt35521_wxga_video_command_panel; |
| 408 | panelstruct->state = &nt35521_wxga_video_state; |
| 409 | panelstruct->laneconfig = &nt35521_wxga_video_lane_config; |
| 410 | panelstruct->paneltiminginfo |
| 411 | = &nt35521_wxga_video_timing_info; |
| 412 | panelstruct->panelresetseq |
| 413 | = &nt35521_wxga_video_reset_seq; |
| 414 | panelstruct->backlightinfo = &nt35521_wxga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 415 | pinfo->mipi.panel_on_cmds |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 416 | = nt35521_wxga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 417 | pinfo->mipi.num_of_panel_on_cmds |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 418 | = NT35521_WXGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 419 | pinfo->mipi.panel_off_cmds |
| 420 | = nt35521_wxga_video_off_command; |
| 421 | pinfo->mipi.num_of_panel_off_cmds |
| 422 | = NT35521_WXGA_VIDEO_OFF_COMMAND; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 423 | memcpy(phy_db->timing, |
| 424 | nt35521_wxga_video_timings, TIMING_SIZE); |
| 425 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 426 | case UNKNOWN_PANEL: |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 427 | default: |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 428 | memset(panelstruct, 0, sizeof(struct panel_struct)); |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 429 | memset(pinfo->mipi.panel_on_cmds, 0, |
| 430 | sizeof(struct mipi_dsi_cmd)); |
| 431 | pinfo->mipi.num_of_panel_on_cmds = 0; |
| 432 | memset(pinfo->mipi.panel_off_cmds, 0, |
| 433 | sizeof(struct mipi_dsi_cmd)); |
| 434 | pinfo->mipi.num_of_panel_off_cmds = 0; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 435 | memset(phy_db->timing, 0, TIMING_SIZE); |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 436 | pan_type = PANEL_TYPE_UNKNOWN; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 437 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 438 | } |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 439 | return pan_type; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 440 | } |
| 441 | |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 442 | uint32_t oem_panel_max_auto_detect_panels() |
| 443 | { |
| 444 | return target_panel_auto_detect_enabled() ? |
| 445 | DISPLAY_MAX_PANEL_DETECTION : 0; |
| 446 | } |
| 447 | |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 448 | int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct, |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 449 | struct msm_panel_info *pinfo, |
| 450 | struct mdss_dsi_phy_ctrl *phy_db) |
| 451 | { |
| 452 | uint32_t hw_id = board_hardware_id(); |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 453 | uint32_t hw_subtype = board_hardware_subtype(); |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 454 | int32_t panel_override_id; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 455 | uint32_t target_id, plat_hw_ver_major; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 456 | |
| 457 | if (panel_name) { |
| 458 | panel_override_id = panel_name_to_id(supp_panels, |
| 459 | ARRAY_SIZE(supp_panels), panel_name); |
| 460 | |
| 461 | if (panel_override_id < 0) { |
| 462 | dprintf(CRITICAL, "Not able to search the panel:%s\n", |
| 463 | panel_name + strspn(panel_name, " ")); |
| 464 | } else if (panel_override_id < UNKNOWN_PANEL) { |
| 465 | /* panel override using fastboot oem command */ |
| 466 | panel_id = panel_override_id; |
| 467 | |
| 468 | dprintf(INFO, "OEM panel override:%s\n", |
| 469 | panel_name + strspn(panel_name, " ")); |
| 470 | goto panel_init; |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | switch (hw_id) { |
| 475 | case HW_PLATFORM_MTP: |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 476 | panel_id = JDI_1080P_VIDEO_PANEL; |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame^] | 477 | if (hw_subtype == HW_PLATFORM_SUBTYPE_MTP_3) |
| 478 | panel_id = JDI_FHD_VIDEO_PANEL; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 479 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 480 | case HW_PLATFORM_SURF: |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame^] | 481 | if (hw_subtype == HW_PLATFORM_SUBTYPE_CDP_1) { |
| 482 | panel_id = JDI_FHD_VIDEO_PANEL; |
| 483 | } else { |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 484 | panel_id = JDI_1080P_VIDEO_PANEL; |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame^] | 485 | switch (auto_pan_loop) { |
| 486 | case 0: |
| 487 | panel_id = JDI_1080P_VIDEO_PANEL; |
| 488 | break; |
| 489 | case 1: |
| 490 | panel_id = NT35590_720P_VIDEO_PANEL; |
| 491 | break; |
| 492 | default: |
| 493 | panel_id = UNKNOWN_PANEL; |
| 494 | dprintf(CRITICAL, "Unknown panel\n"); |
| 495 | return PANEL_TYPE_UNKNOWN; |
| 496 | } |
| 497 | auto_pan_loop++; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 498 | } |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 499 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 500 | case HW_PLATFORM_QRD: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 501 | target_id = board_target_id(); |
| 502 | plat_hw_ver_major = ((target_id >> 16) & 0xFF); |
| 503 | |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 504 | if (platform_is_msm8939()) { |
| 505 | switch (hw_subtype) { |
| 506 | case HW_PLATFORM_SUBTYPE_SKUK: |
| 507 | panel_id = NT35596_1080P_VIDEO_PANEL; |
| 508 | break; |
| 509 | default: |
| 510 | dprintf(CRITICAL, "Invalid subtype id %d for QRD HW\n", |
| 511 | hw_subtype); |
| 512 | return PANEL_TYPE_UNKNOWN; |
| 513 | } |
| 514 | } else { |
| 515 | switch (hw_subtype) { |
| 516 | case HW_PLATFORM_SUBTYPE_SKUH: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 517 | /* qrd SKUIC */ |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 518 | if ((plat_hw_ver_major >> 4) == 0x1) |
| 519 | panel_id = OTM1283A_720P_VIDEO_PANEL; |
| 520 | else |
| 521 | panel_id = INNOLUX_720P_VIDEO_PANEL; |
| 522 | break; |
| 523 | case HW_PLATFORM_SUBTYPE_SKUI: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 524 | /* qrd SKUIC */ |
Shuo Yan | 14ac901 | 2014-09-18 16:39:48 +0800 | [diff] [blame] | 525 | if ((plat_hw_ver_major >> 4) == 0) |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 526 | panel_id = OTM8019A_FWVGA_VIDEO_PANEL; |
Shuo Yan | 14ac901 | 2014-09-18 16:39:48 +0800 | [diff] [blame] | 527 | else |
| 528 | panel_id = HX8379A_FWVGA_VIDEO_PANEL; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 529 | break; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 530 | case HW_PLATFORM_SUBTYPE_SKUT1: |
| 531 | /* qrd SKUT1 */ |
| 532 | panel_id = NT35521_WXGA_VIDEO_PANEL; |
| 533 | break; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 534 | default: |
| 535 | dprintf(CRITICAL, "Invalid subtype id %d for QRD HW\n", |
| 536 | hw_subtype); |
| 537 | return PANEL_TYPE_UNKNOWN; |
| 538 | } |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 539 | } |
| 540 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 541 | default: |
| 542 | dprintf(CRITICAL, "Display not enabled for %d HW type\n", |
| 543 | hw_id); |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 544 | return PANEL_TYPE_UNKNOWN; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 545 | } |
| 546 | |
| 547 | panel_init: |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 548 | /* |
| 549 | * Update all data structures after 'panel_init' label. Only panel |
| 550 | * selection is supposed to happen before that. |
| 551 | */ |
| 552 | if (platform_is_msm8939() || (hw_id == HW_PLATFORM_QRD)) { |
Radhika Ranjan Soni | 7ea9855 | 2014-06-11 17:01:12 +0530 | [diff] [blame] | 553 | phy_db->regulator_mode = DSI_PHY_REGULATOR_LDO_MODE; |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 554 | memcpy(panel_regulator_settings, |
| 555 | ldo_regulator_settings, REGULATOR_SIZE); |
| 556 | } else { |
| 557 | memcpy(panel_regulator_settings, |
| 558 | dcdc_regulator_settings, REGULATOR_SIZE); |
| 559 | } |
Radhika Ranjan Soni | 7ea9855 | 2014-06-11 17:01:12 +0530 | [diff] [blame] | 560 | |
Jayant Shekhar | b130da2 | 2014-05-29 12:47:51 +0530 | [diff] [blame] | 561 | pinfo->pipe_type = MDSS_MDP_PIPE_TYPE_RGB; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 562 | return init_panel_data(panelstruct, pinfo, phy_db); |
| 563 | } |