blob: 258f77cfa718dea7cf0739bbe98d4b5eca8e91bb [file] [log] [blame]
Aravind Venkateswaranc26bb602014-01-23 11:43:02 -08001/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
Arpita Banerjee841fa062013-05-24 14:59:51 -07002 *
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>
36
37#include "include/panel.h"
38#include "panel_display.h"
39
40/*---------------------------------------------------------------------------*/
41/* GCDB Panel Database */
42/*---------------------------------------------------------------------------*/
43#include "include/panel_toshiba_720p_video.h"
44#include "include/panel_nt35590_720p_video.h"
45#include "include/panel_nt35590_720p_cmd.h"
Ray Zhang70abc542013-07-08 15:48:19 +080046#include "include/panel_hx8394a_720p_video.h"
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -070047#include "include/panel_nt35596_1080p_video.h"
Ray Zhang53b0dce2013-07-08 19:35:48 +080048#include "include/panel_nt35521_720p_video.h"
Ray Zhange100ab62013-09-03 19:17:07 +080049#include "include/panel_ssd2080m_720p_video.h"
Aravind Venkateswaranaf241212013-11-04 16:46:46 -080050#include "include/panel_jdi_1080p_video.h"
Arpita Banerjee841fa062013-05-24 14:59:51 -070051
Pradeep Jilagamfeb15982013-10-29 13:08:51 +053052#define DISPLAY_MAX_PANEL_DETECTION 2
53
Ray Zhanga6df18c2013-12-04 16:21:50 +080054#define SSD2080M_720P_VIDEO_PANEL_ON_DELAY 200
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -080055#define MAX_PANEL_ID_LEN 64
Ray Zhanga6df18c2013-12-04 16:21:50 +080056
Arpita Banerjee841fa062013-05-24 14:59:51 -070057/*---------------------------------------------------------------------------*/
58/* static panel selection variable */
59/*---------------------------------------------------------------------------*/
60enum {
61TOSHIBA_720P_VIDEO_PANEL,
62NT35590_720P_CMD_PANEL,
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -070063NT35590_720P_VIDEO_PANEL,
Ray Zhang70abc542013-07-08 15:48:19 +080064NT35596_1080P_VIDEO_PANEL,
Ray Zhang53b0dce2013-07-08 19:35:48 +080065HX8394A_720P_VIDEO_PANEL,
Ray Zhange100ab62013-09-03 19:17:07 +080066NT35521_720P_VIDEO_PANEL,
Aravind Venkateswaranaf241212013-11-04 16:46:46 -080067SSD2080M_720P_VIDEO_PANEL,
Pradeep Jilagamfeb15982013-10-29 13:08:51 +053068JDI_1080P_VIDEO_PANEL,
69UNKNOWN_PANEL
Aravind Venkateswaranaf241212013-11-04 16:46:46 -080070};
71
72enum target_subtype {
73 HW_PLATFORM_SUBTYPE_720P = 0,
74 HW_PLATFORM_SUBTYPE_SKUAA = 1,
75 HW_PLATFORM_SUBTYPE_SKUF = 2,
76 HW_PLATFORM_SUBTYPE_1080P = 2,
77 HW_PLATFORM_SUBTYPE_SKUAB = 3,
Aravind Venkateswaranc26bb602014-01-23 11:43:02 -080078 HW_PLATFORM_SUBTYPE_1080P_EXT_BUCK = 3,
Aravind Venkateswaranaf241212013-11-04 16:46:46 -080079 HW_PLATFORM_SUBTYPE_SKUG = 5,
Arpita Banerjee841fa062013-05-24 14:59:51 -070080};
81
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -080082/*
83 * The list of panels that are supported on this target.
84 * Any panel in this list can be selected using fastboot oem command.
85 */
86static struct panel_list supp_panels[] = {
87 {"toshiba_720p_video", TOSHIBA_720P_VIDEO_PANEL},
88 {"nt35590_720p_cmd", NT35590_720P_CMD_PANEL},
89 {"nt35590_720p_video", NT35590_720P_VIDEO_PANEL},
90 {"nt35596_1080p_video", NT35596_1080P_VIDEO_PANEL},
91 {"hx8394a_720p_video", HX8394A_720P_VIDEO_PANEL},
92 {"nt35521_720p_video", NT35521_720P_VIDEO_PANEL},
93 {"ssd2080m_720p_video", SSD2080M_720P_VIDEO_PANEL},
94 {"jdi_1080p_video", JDI_1080P_VIDEO_PANEL},
95};
96
Arpita Banerjee841fa062013-05-24 14:59:51 -070097static uint32_t panel_id;
98
99int oem_panel_rotation()
100{
101 int ret = NO_ERROR;
102 switch (panel_id) {
103 case TOSHIBA_720P_VIDEO_PANEL:
104 ret = mipi_dsi_cmds_tx(toshiba_720p_video_rotation,
105 TOSHIBA_720P_VIDEO_ROTATION);
106 break;
107 case NT35590_720P_CMD_PANEL:
108 ret = mipi_dsi_cmds_tx(nt35590_720p_cmd_rotation,
109 NT35590_720P_CMD_ROTATION);
110 break;
111 case NT35590_720P_VIDEO_PANEL:
112 ret = mipi_dsi_cmds_tx(nt35590_720p_video_rotation,
113 NT35590_720P_VIDEO_ROTATION);
114 break;
115 }
116
117 return ret;
118}
119
Arpita Banerjee841fa062013-05-24 14:59:51 -0700120int oem_panel_on()
121{
122 /* OEM can keep there panel spefic on instructions in this
123 function */
Ray Zhanga6df18c2013-12-04 16:21:50 +0800124 if (panel_id == SSD2080M_720P_VIDEO_PANEL) {
125 /* SSD2080M needs extra delay to avoid unexpected artifacts */
126 mdelay(SSD2080M_720P_VIDEO_PANEL_ON_DELAY);
127 }
Arpita Banerjee841fa062013-05-24 14:59:51 -0700128 return NO_ERROR;
129}
130
131int oem_panel_off()
132{
133 /* OEM can keep there panel spefic off instructions in this
134 function */
135 return NO_ERROR;
136}
137
138static void init_panel_data(struct panel_struct *panelstruct,
139 struct msm_panel_info *pinfo,
140 struct mdss_dsi_phy_ctrl *phy_db)
141{
142 switch (panel_id) {
143 case TOSHIBA_720P_VIDEO_PANEL:
144 panelstruct->paneldata = &toshiba_720p_video_panel_data;
145 panelstruct->panelres = &toshiba_720p_video_panel_res;
146 panelstruct->color = &toshiba_720p_video_color;
147 panelstruct->videopanel = &toshiba_720p_video_video_panel;
148 panelstruct->commandpanel = &toshiba_720p_video_command_panel;
149 panelstruct->state = &toshiba_720p_video_state;
150 panelstruct->laneconfig = &toshiba_720p_video_lane_config;
151 panelstruct->paneltiminginfo
152 = &toshiba_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700153 panelstruct->panelresetseq
154 = &toshiba_720p_video_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700155 panelstruct->backlightinfo = &toshiba_720p_video_backlight;
156 pinfo->mipi.panel_cmds
157 = toshiba_720p_video_on_command;
158 pinfo->mipi.num_of_panel_cmds
159 = TOSHIBA_720P_VIDEO_ON_COMMAND;
160 memcpy(phy_db->timing,
161 toshiba_720p_video_timings, TIMING_SIZE);
162 break;
163 case NT35590_720P_VIDEO_PANEL:
164 panelstruct->paneldata = &nt35590_720p_video_panel_data;
165 panelstruct->panelres = &nt35590_720p_video_panel_res;
166 panelstruct->color = &nt35590_720p_video_color;
167 panelstruct->videopanel = &nt35590_720p_video_video_panel;
168 panelstruct->commandpanel = &nt35590_720p_video_command_panel;
169 panelstruct->state = &nt35590_720p_video_state;
170 panelstruct->laneconfig = &nt35590_720p_video_lane_config;
171 panelstruct->paneltiminginfo
172 = &nt35590_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700173 panelstruct->panelresetseq
174 = &nt35590_720p_video_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700175 panelstruct->backlightinfo = &nt35590_720p_video_backlight;
176 pinfo->mipi.panel_cmds
177 = nt35590_720p_video_on_command;
178 pinfo->mipi.num_of_panel_cmds
179 = NT35590_720P_VIDEO_ON_COMMAND;
180 memcpy(phy_db->timing,
181 nt35590_720p_video_timings, TIMING_SIZE);
182 break;
Ray Zhang53b0dce2013-07-08 19:35:48 +0800183 case NT35521_720P_VIDEO_PANEL:
184 panelstruct->paneldata = &nt35521_720p_video_panel_data;
185 panelstruct->panelres = &nt35521_720p_video_panel_res;
186 panelstruct->color = &nt35521_720p_video_color;
187 panelstruct->videopanel = &nt35521_720p_video_video_panel;
188 panelstruct->commandpanel = &nt35521_720p_video_command_panel;
189 panelstruct->state = &nt35521_720p_video_state;
190 panelstruct->laneconfig = &nt35521_720p_video_lane_config;
191 panelstruct->paneltiminginfo
192 = &nt35521_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700193 panelstruct->panelresetseq
194 = &nt35521_720p_video_panel_reset_seq;
Ray Zhang53b0dce2013-07-08 19:35:48 +0800195 panelstruct->backlightinfo = &nt35521_720p_video_backlight;
196 pinfo->mipi.panel_cmds
197 = nt35521_720p_video_on_command;
198 pinfo->mipi.num_of_panel_cmds
199 = NT35521_720P_VIDEO_ON_COMMAND;
200 memcpy(phy_db->timing,
201 nt35521_720p_video_timings, TIMING_SIZE);
202 break;
Ray Zhange100ab62013-09-03 19:17:07 +0800203 case SSD2080M_720P_VIDEO_PANEL:
204 panelstruct->paneldata = &ssd2080m_720p_video_panel_data;
205 panelstruct->panelres = &ssd2080m_720p_video_panel_res;
206 panelstruct->color = &ssd2080m_720p_video_color;
207 panelstruct->videopanel = &ssd2080m_720p_video_video_panel;
208 panelstruct->commandpanel = &ssd2080m_720p_video_command_panel;
209 panelstruct->state = &ssd2080m_720p_video_state;
210 panelstruct->laneconfig = &ssd2080m_720p_video_lane_config;
211 panelstruct->paneltiminginfo
212 = &ssd2080m_720p_video_timing_info;
213 panelstruct->panelresetseq
214 = &ssd2080m_720p_video_panel_reset_seq;
215 panelstruct->backlightinfo = &ssd2080m_720p_video_backlight;
216 pinfo->mipi.panel_cmds
217 = ssd2080m_720p_video_on_command;
218 pinfo->mipi.num_of_panel_cmds
219 = SSD2080M_720P_VIDEO_ON_COMMAND;
220 memcpy(phy_db->timing,
221 ssd2080m_720p_video_timings, TIMING_SIZE);
222 break;
Ray Zhang70abc542013-07-08 15:48:19 +0800223 case HX8394A_720P_VIDEO_PANEL:
224 panelstruct->paneldata = &hx8394a_720p_video_panel_data;
225 panelstruct->panelres = &hx8394a_720p_video_panel_res;
226 panelstruct->color = &hx8394a_720p_video_color;
227 panelstruct->videopanel = &hx8394a_720p_video_video_panel;
228 panelstruct->commandpanel = &hx8394a_720p_video_command_panel;
229 panelstruct->state = &hx8394a_720p_video_state;
230 panelstruct->laneconfig = &hx8394a_720p_video_lane_config;
231 panelstruct->paneltiminginfo
232 = &hx8394a_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700233 panelstruct->panelresetseq
234 = &hx8394a_720p_video_panel_reset_seq;
Ray Zhang70abc542013-07-08 15:48:19 +0800235 panelstruct->backlightinfo = &hx8394a_720p_video_backlight;
236 pinfo->mipi.panel_cmds
237 = hx8394a_720p_video_on_command;
238 pinfo->mipi.num_of_panel_cmds
239 = HX8394A_720P_VIDEO_ON_COMMAND;
240 memcpy(phy_db->timing,
241 hx8394a_720p_video_timings, TIMING_SIZE);
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530242 pinfo->mipi.signature = HX8394A_720P_VIDEO_SIGNATURE;
Ray Zhang70abc542013-07-08 15:48:19 +0800243 break;
244
Arpita Banerjee841fa062013-05-24 14:59:51 -0700245 case NT35590_720P_CMD_PANEL:
246 panelstruct->paneldata = &nt35590_720p_cmd_panel_data;
247 panelstruct->panelres = &nt35590_720p_cmd_panel_res;
248 panelstruct->color = &nt35590_720p_cmd_color;
249 panelstruct->videopanel = &nt35590_720p_cmd_video_panel;
250 panelstruct->commandpanel = &nt35590_720p_cmd_command_panel;
251 panelstruct->state = &nt35590_720p_cmd_state;
252 panelstruct->laneconfig = &nt35590_720p_cmd_lane_config;
253 panelstruct->paneltiminginfo = &nt35590_720p_cmd_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700254 panelstruct->panelresetseq
255 = &nt35590_720p_cmd_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700256 panelstruct->backlightinfo = &nt35590_720p_cmd_backlight;
257 pinfo->mipi.panel_cmds
258 = nt35590_720p_cmd_on_command;
259 pinfo->mipi.num_of_panel_cmds
260 = NT35590_720P_CMD_ON_COMMAND;
261 memcpy(phy_db->timing,
262 nt35590_720p_cmd_timings, TIMING_SIZE);
263 break;
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700264 case NT35596_1080P_VIDEO_PANEL:
265 panelstruct->paneldata = &nt35596_1080p_video_panel_data;
266 panelstruct->panelres = &nt35596_1080p_video_panel_res;
267 panelstruct->color = &nt35596_1080p_video_color;
268 panelstruct->videopanel = &nt35596_1080p_video_video_panel;
269 panelstruct->commandpanel = &nt35596_1080p_video_command_panel;
270 panelstruct->state = &nt35596_1080p_video_state;
271 panelstruct->laneconfig = &nt35596_1080p_video_lane_config;
272 panelstruct->paneltiminginfo
273 = &nt35596_1080p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700274 panelstruct->panelresetseq
275 = &nt35596_1080p_video_panel_reset_seq;
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700276 panelstruct->backlightinfo
277 = &nt35596_1080p_video_backlight;
278 pinfo->mipi.panel_cmds
279 = nt35596_1080p_video_on_command;
280 pinfo->mipi.num_of_panel_cmds
281 = NT35596_1080P_VIDEO_ON_COMMAND;
282 memcpy(phy_db->timing,
283 nt35596_1080p_video_timings, TIMING_SIZE);
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530284 pinfo->mipi.signature = NT35596_1080P_VIDEO_SIGNATURE;
Jayant Shekhar24be5e62013-11-18 19:59:50 +0530285 break;
Aravind Venkateswaranaf241212013-11-04 16:46:46 -0800286 case JDI_1080P_VIDEO_PANEL:
287 panelstruct->paneldata = &jdi_1080p_video_panel_data;
288 panelstruct->paneldata->panel_with_enable_gpio = 1;
289 panelstruct->panelres = &jdi_1080p_video_panel_res;
290 panelstruct->color = &jdi_1080p_video_color;
291 panelstruct->videopanel = &jdi_1080p_video_video_panel;
292 panelstruct->commandpanel = &jdi_1080p_video_command_panel;
293 panelstruct->state = &jdi_1080p_video_state;
294 panelstruct->laneconfig = &jdi_1080p_video_lane_config;
295 panelstruct->paneltiminginfo
296 = &jdi_1080p_video_timing_info;
297 panelstruct->panelresetseq
298 = &jdi_1080p_video_panel_reset_seq;
299 panelstruct->backlightinfo = &jdi_1080p_video_backlight;
300 pinfo->mipi.panel_cmds
301 = jdi_1080p_video_on_command;
302 pinfo->mipi.num_of_panel_cmds
303 = JDI_1080P_VIDEO_ON_COMMAND;
304 memcpy(phy_db->timing,
305 jdi_1080p_video_timings, TIMING_SIZE);
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700306 break;
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530307 case UNKNOWN_PANEL:
308 memset(panelstruct, 0, sizeof(struct panel_struct));
309 memset(pinfo->mipi.panel_cmds, 0, sizeof(struct mipi_dsi_cmd));
310 pinfo->mipi.num_of_panel_cmds = 0;
311 memset(phy_db->timing, 0, TIMING_SIZE);
312 pinfo->mipi.signature = 0;
313 break;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700314 }
315}
316
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530317uint32_t oem_panel_max_auto_detect_panels()
318{
319 return target_panel_auto_detect_enabled() ?
320 DISPLAY_MAX_PANEL_DETECTION : 0;
321}
322
323static uint32_t auto_pan_loop = 0;
324
Aravind Venkateswarand494f962014-02-25 17:16:49 -0800325bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
Arpita Banerjee841fa062013-05-24 14:59:51 -0700326 struct msm_panel_info *pinfo,
327 struct mdss_dsi_phy_ctrl *phy_db)
328{
329 uint32_t hw_id = board_hardware_id();
Ray Zhang70abc542013-07-08 15:48:19 +0800330 uint32_t target_id = board_target_id();
Aravind Venkateswaran9ae369b2013-07-23 22:57:47 -0700331 uint32_t nt35590_panel_id = NT35590_720P_VIDEO_PANEL;
Aravind Venkateswaranaf241212013-11-04 16:46:46 -0800332 uint32_t hw_subtype = board_hardware_subtype();
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530333 bool ret = true;
Dhaval Patelf6dd5772014-02-18 17:10:16 -0800334 int32_t panel_override_id;
Aravind Venkateswaran9ae369b2013-07-23 22:57:47 -0700335
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -0800336 if (panel_name) {
Dhaval Patelf6dd5772014-02-18 17:10:16 -0800337 panel_override_id = panel_name_to_id(supp_panels,
338 ARRAY_SIZE(supp_panels), panel_name);
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -0800339
Dhaval Patelf6dd5772014-02-18 17:10:16 -0800340 if (panel_override_id < 0) {
341 dprintf(CRITICAL, "Not able to search the panel:%s\n",
342 panel_name + strspn(panel_name, " "));
343 } else if (panel_override_id < UNKNOWN_PANEL) {
344 /* panel override using fastboot oem command */
345 panel_id = panel_override_id;
346
347 dprintf(INFO, "OEM panel override:%s\n",
348 panel_name + strspn(panel_name, " "));
349 goto panel_init;
350 }
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -0800351 }
Arpita Banerjee841fa062013-05-24 14:59:51 -0700352
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700353 switch (hw_id) {
354 case HW_PLATFORM_QRD:
Aravind Venkateswaranaf241212013-11-04 16:46:46 -0800355 if (hw_subtype == HW_PLATFORM_SUBTYPE_SKUF) {
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700356 panel_id = NT35521_720P_VIDEO_PANEL;
Aravind Venkateswaranaf241212013-11-04 16:46:46 -0800357 } else if (hw_subtype == HW_PLATFORM_SUBTYPE_SKUG) {
Ray Zhange100ab62013-09-03 19:17:07 +0800358 panel_id = SSD2080M_720P_VIDEO_PANEL;
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700359 } else {
Kun Liang6bff57d2013-09-29 18:27:23 +0800360 if (((target_id >> 16) & 0xFF) == 0x1 || ((target_id >> 16) & 0xFF) == 0x3) //EVT || PVT
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700361 panel_id = nt35590_panel_id;
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530362 else if (((target_id >> 16) & 0xFF) == 0x2) { //DVT
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700363 panel_id = HX8394A_720P_VIDEO_PANEL;
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530364 switch (auto_pan_loop) {
365 case 0:
366 panel_id = HX8394A_720P_VIDEO_PANEL;
367 break;
368 case 1:
369 panel_id = NT35596_1080P_VIDEO_PANEL;
370 break;
371 default:
372 panel_id = UNKNOWN_PANEL;
373 ret = false;
374 dprintf(CRITICAL, "Unknown panel\n");
375 return ret;
376 }
377 auto_pan_loop++;
378 }
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700379 else {
380 dprintf(CRITICAL, "Not supported device, target_id=%x\n"
381 , target_id);
382 return false;
383 }
Arpita Banerjee841fa062013-05-24 14:59:51 -0700384 }
385 break;
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700386 case HW_PLATFORM_MTP:
387 case HW_PLATFORM_SURF:
Aravind Venkateswaranc26bb602014-01-23 11:43:02 -0800388 if ((hw_subtype == HW_PLATFORM_SUBTYPE_1080P) ||
389 (hw_subtype == HW_PLATFORM_SUBTYPE_1080P_EXT_BUCK))
Aravind Venkateswaranaf241212013-11-04 16:46:46 -0800390 panel_id = JDI_1080P_VIDEO_PANEL;
Aravind Venkateswaranc26bb602014-01-23 11:43:02 -0800391 else
Jayant Shekhareb6e0872013-12-23 22:39:35 +0530392 panel_id = nt35590_panel_id;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700393 break;
Dhaval Patele4ef9442013-07-16 12:35:56 -0700394 default:
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700395 dprintf(CRITICAL, "Display not enabled for %d HW type\n"
396 , hw_id);
Dhaval Patele4ef9442013-07-16 12:35:56 -0700397 return false;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700398 }
399
Aravind Venkateswaran6bfb29e2014-02-12 12:31:44 -0800400panel_init:
Arpita Banerjee841fa062013-05-24 14:59:51 -0700401 init_panel_data(panelstruct, pinfo, phy_db);
402
Pradeep Jilagamfeb15982013-10-29 13:08:51 +0530403 return ret;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700404}