blob: 83264429c38c48587c50d8a75d8489c6939e2a3f [file] [log] [blame]
Aravind Venkateswaranbece4382014-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 Zhangbe678552013-09-03 19:17:07 +080049#include "include/panel_ssd2080m_720p_video.h"
Aravind Venkateswarand0398502013-11-04 16:46:46 -080050#include "include/panel_jdi_1080p_video.h"
Arpita Banerjee841fa062013-05-24 14:59:51 -070051
Pradeep Jilagamcd51b522013-10-29 13:08:51 +053052#define DISPLAY_MAX_PANEL_DETECTION 2
53
Ray Zhang2ea22792013-12-04 16:21:50 +080054#define SSD2080M_720P_VIDEO_PANEL_ON_DELAY 200
Aravind Venkateswaranc5863e32014-02-12 12:31:44 -080055#define MAX_PANEL_ID_LEN 64
Ray Zhang2ea22792013-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 Zhangbe678552013-09-03 19:17:07 +080066NT35521_720P_VIDEO_PANEL,
Aravind Venkateswarand0398502013-11-04 16:46:46 -080067SSD2080M_720P_VIDEO_PANEL,
Pradeep Jilagamcd51b522013-10-29 13:08:51 +053068JDI_1080P_VIDEO_PANEL,
69UNKNOWN_PANEL
Aravind Venkateswarand0398502013-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 Venkateswaranbece4382014-01-23 11:43:02 -080078 HW_PLATFORM_SUBTYPE_1080P_EXT_BUCK = 3,
Aravind Venkateswarand0398502013-11-04 16:46:46 -080079 HW_PLATFORM_SUBTYPE_SKUG = 5,
Arpita Banerjee841fa062013-05-24 14:59:51 -070080};
81
Aravind Venkateswaranc5863e32014-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 Zhang2ea22792013-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
Jayant Shekhar24bbf692014-03-26 15:43:41 +0530138static void mdss_source_pipe_select(struct msm_panel_info *pinfo)
139{
140 /* Use DMA pipe for splash logo on 8x26 */
141 pinfo->use_dma_pipe = 1;
142}
143
Arpita Banerjee841fa062013-05-24 14:59:51 -0700144static void init_panel_data(struct panel_struct *panelstruct,
145 struct msm_panel_info *pinfo,
146 struct mdss_dsi_phy_ctrl *phy_db)
147{
148 switch (panel_id) {
149 case TOSHIBA_720P_VIDEO_PANEL:
150 panelstruct->paneldata = &toshiba_720p_video_panel_data;
151 panelstruct->panelres = &toshiba_720p_video_panel_res;
152 panelstruct->color = &toshiba_720p_video_color;
153 panelstruct->videopanel = &toshiba_720p_video_video_panel;
154 panelstruct->commandpanel = &toshiba_720p_video_command_panel;
155 panelstruct->state = &toshiba_720p_video_state;
156 panelstruct->laneconfig = &toshiba_720p_video_lane_config;
157 panelstruct->paneltiminginfo
158 = &toshiba_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700159 panelstruct->panelresetseq
160 = &toshiba_720p_video_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700161 panelstruct->backlightinfo = &toshiba_720p_video_backlight;
162 pinfo->mipi.panel_cmds
163 = toshiba_720p_video_on_command;
164 pinfo->mipi.num_of_panel_cmds
165 = TOSHIBA_720P_VIDEO_ON_COMMAND;
166 memcpy(phy_db->timing,
167 toshiba_720p_video_timings, TIMING_SIZE);
168 break;
169 case NT35590_720P_VIDEO_PANEL:
170 panelstruct->paneldata = &nt35590_720p_video_panel_data;
171 panelstruct->panelres = &nt35590_720p_video_panel_res;
172 panelstruct->color = &nt35590_720p_video_color;
173 panelstruct->videopanel = &nt35590_720p_video_video_panel;
174 panelstruct->commandpanel = &nt35590_720p_video_command_panel;
175 panelstruct->state = &nt35590_720p_video_state;
176 panelstruct->laneconfig = &nt35590_720p_video_lane_config;
177 panelstruct->paneltiminginfo
178 = &nt35590_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700179 panelstruct->panelresetseq
180 = &nt35590_720p_video_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700181 panelstruct->backlightinfo = &nt35590_720p_video_backlight;
182 pinfo->mipi.panel_cmds
183 = nt35590_720p_video_on_command;
184 pinfo->mipi.num_of_panel_cmds
185 = NT35590_720P_VIDEO_ON_COMMAND;
186 memcpy(phy_db->timing,
187 nt35590_720p_video_timings, TIMING_SIZE);
188 break;
Ray Zhang53b0dce2013-07-08 19:35:48 +0800189 case NT35521_720P_VIDEO_PANEL:
190 panelstruct->paneldata = &nt35521_720p_video_panel_data;
191 panelstruct->panelres = &nt35521_720p_video_panel_res;
192 panelstruct->color = &nt35521_720p_video_color;
193 panelstruct->videopanel = &nt35521_720p_video_video_panel;
194 panelstruct->commandpanel = &nt35521_720p_video_command_panel;
195 panelstruct->state = &nt35521_720p_video_state;
196 panelstruct->laneconfig = &nt35521_720p_video_lane_config;
197 panelstruct->paneltiminginfo
198 = &nt35521_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700199 panelstruct->panelresetseq
200 = &nt35521_720p_video_panel_reset_seq;
Ray Zhang53b0dce2013-07-08 19:35:48 +0800201 panelstruct->backlightinfo = &nt35521_720p_video_backlight;
202 pinfo->mipi.panel_cmds
203 = nt35521_720p_video_on_command;
204 pinfo->mipi.num_of_panel_cmds
205 = NT35521_720P_VIDEO_ON_COMMAND;
206 memcpy(phy_db->timing,
207 nt35521_720p_video_timings, TIMING_SIZE);
208 break;
Ray Zhangbe678552013-09-03 19:17:07 +0800209 case SSD2080M_720P_VIDEO_PANEL:
210 panelstruct->paneldata = &ssd2080m_720p_video_panel_data;
211 panelstruct->panelres = &ssd2080m_720p_video_panel_res;
212 panelstruct->color = &ssd2080m_720p_video_color;
213 panelstruct->videopanel = &ssd2080m_720p_video_video_panel;
214 panelstruct->commandpanel = &ssd2080m_720p_video_command_panel;
215 panelstruct->state = &ssd2080m_720p_video_state;
216 panelstruct->laneconfig = &ssd2080m_720p_video_lane_config;
217 panelstruct->paneltiminginfo
218 = &ssd2080m_720p_video_timing_info;
219 panelstruct->panelresetseq
220 = &ssd2080m_720p_video_panel_reset_seq;
221 panelstruct->backlightinfo = &ssd2080m_720p_video_backlight;
222 pinfo->mipi.panel_cmds
223 = ssd2080m_720p_video_on_command;
224 pinfo->mipi.num_of_panel_cmds
225 = SSD2080M_720P_VIDEO_ON_COMMAND;
226 memcpy(phy_db->timing,
227 ssd2080m_720p_video_timings, TIMING_SIZE);
228 break;
Ray Zhang70abc542013-07-08 15:48:19 +0800229 case HX8394A_720P_VIDEO_PANEL:
230 panelstruct->paneldata = &hx8394a_720p_video_panel_data;
231 panelstruct->panelres = &hx8394a_720p_video_panel_res;
232 panelstruct->color = &hx8394a_720p_video_color;
233 panelstruct->videopanel = &hx8394a_720p_video_video_panel;
234 panelstruct->commandpanel = &hx8394a_720p_video_command_panel;
235 panelstruct->state = &hx8394a_720p_video_state;
236 panelstruct->laneconfig = &hx8394a_720p_video_lane_config;
237 panelstruct->paneltiminginfo
238 = &hx8394a_720p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700239 panelstruct->panelresetseq
240 = &hx8394a_720p_video_panel_reset_seq;
Ray Zhang70abc542013-07-08 15:48:19 +0800241 panelstruct->backlightinfo = &hx8394a_720p_video_backlight;
242 pinfo->mipi.panel_cmds
243 = hx8394a_720p_video_on_command;
244 pinfo->mipi.num_of_panel_cmds
245 = HX8394A_720P_VIDEO_ON_COMMAND;
246 memcpy(phy_db->timing,
247 hx8394a_720p_video_timings, TIMING_SIZE);
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530248 pinfo->mipi.signature = HX8394A_720P_VIDEO_SIGNATURE;
Ray Zhang70abc542013-07-08 15:48:19 +0800249 break;
250
Arpita Banerjee841fa062013-05-24 14:59:51 -0700251 case NT35590_720P_CMD_PANEL:
252 panelstruct->paneldata = &nt35590_720p_cmd_panel_data;
253 panelstruct->panelres = &nt35590_720p_cmd_panel_res;
254 panelstruct->color = &nt35590_720p_cmd_color;
255 panelstruct->videopanel = &nt35590_720p_cmd_video_panel;
256 panelstruct->commandpanel = &nt35590_720p_cmd_command_panel;
257 panelstruct->state = &nt35590_720p_cmd_state;
258 panelstruct->laneconfig = &nt35590_720p_cmd_lane_config;
259 panelstruct->paneltiminginfo = &nt35590_720p_cmd_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700260 panelstruct->panelresetseq
261 = &nt35590_720p_cmd_panel_reset_seq;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700262 panelstruct->backlightinfo = &nt35590_720p_cmd_backlight;
263 pinfo->mipi.panel_cmds
264 = nt35590_720p_cmd_on_command;
265 pinfo->mipi.num_of_panel_cmds
266 = NT35590_720P_CMD_ON_COMMAND;
267 memcpy(phy_db->timing,
268 nt35590_720p_cmd_timings, TIMING_SIZE);
269 break;
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700270 case NT35596_1080P_VIDEO_PANEL:
271 panelstruct->paneldata = &nt35596_1080p_video_panel_data;
272 panelstruct->panelres = &nt35596_1080p_video_panel_res;
273 panelstruct->color = &nt35596_1080p_video_color;
274 panelstruct->videopanel = &nt35596_1080p_video_video_panel;
275 panelstruct->commandpanel = &nt35596_1080p_video_command_panel;
276 panelstruct->state = &nt35596_1080p_video_state;
277 panelstruct->laneconfig = &nt35596_1080p_video_lane_config;
278 panelstruct->paneltiminginfo
279 = &nt35596_1080p_video_timing_info;
Casey Piper5197f932013-08-14 17:27:29 -0700280 panelstruct->panelresetseq
281 = &nt35596_1080p_video_panel_reset_seq;
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700282 panelstruct->backlightinfo
283 = &nt35596_1080p_video_backlight;
284 pinfo->mipi.panel_cmds
285 = nt35596_1080p_video_on_command;
286 pinfo->mipi.num_of_panel_cmds
287 = NT35596_1080P_VIDEO_ON_COMMAND;
288 memcpy(phy_db->timing,
289 nt35596_1080p_video_timings, TIMING_SIZE);
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530290 pinfo->mipi.signature = NT35596_1080P_VIDEO_SIGNATURE;
Jayant Shekhar93b17802013-11-18 19:59:50 +0530291 break;
Aravind Venkateswarand0398502013-11-04 16:46:46 -0800292 case JDI_1080P_VIDEO_PANEL:
293 panelstruct->paneldata = &jdi_1080p_video_panel_data;
294 panelstruct->paneldata->panel_with_enable_gpio = 1;
295 panelstruct->panelres = &jdi_1080p_video_panel_res;
296 panelstruct->color = &jdi_1080p_video_color;
297 panelstruct->videopanel = &jdi_1080p_video_video_panel;
298 panelstruct->commandpanel = &jdi_1080p_video_command_panel;
299 panelstruct->state = &jdi_1080p_video_state;
300 panelstruct->laneconfig = &jdi_1080p_video_lane_config;
301 panelstruct->paneltiminginfo
302 = &jdi_1080p_video_timing_info;
303 panelstruct->panelresetseq
304 = &jdi_1080p_video_panel_reset_seq;
305 panelstruct->backlightinfo = &jdi_1080p_video_backlight;
306 pinfo->mipi.panel_cmds
307 = jdi_1080p_video_on_command;
308 pinfo->mipi.num_of_panel_cmds
309 = JDI_1080P_VIDEO_ON_COMMAND;
310 memcpy(phy_db->timing,
311 jdi_1080p_video_timings, TIMING_SIZE);
Arpita Banerjeef04ae4b2013-06-14 11:32:20 -0700312 break;
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530313 case UNKNOWN_PANEL:
314 memset(panelstruct, 0, sizeof(struct panel_struct));
315 memset(pinfo->mipi.panel_cmds, 0, sizeof(struct mipi_dsi_cmd));
316 pinfo->mipi.num_of_panel_cmds = 0;
317 memset(phy_db->timing, 0, TIMING_SIZE);
318 pinfo->mipi.signature = 0;
319 break;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700320 }
321}
322
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530323uint32_t oem_panel_max_auto_detect_panels()
324{
325 return target_panel_auto_detect_enabled() ?
326 DISPLAY_MAX_PANEL_DETECTION : 0;
327}
328
329static uint32_t auto_pan_loop = 0;
330
Aravind Venkateswaran927e9102014-02-25 17:16:49 -0800331bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
Arpita Banerjee841fa062013-05-24 14:59:51 -0700332 struct msm_panel_info *pinfo,
333 struct mdss_dsi_phy_ctrl *phy_db)
334{
335 uint32_t hw_id = board_hardware_id();
Ray Zhang70abc542013-07-08 15:48:19 +0800336 uint32_t target_id = board_target_id();
Aravind Venkateswaran9ae369b2013-07-23 22:57:47 -0700337 uint32_t nt35590_panel_id = NT35590_720P_VIDEO_PANEL;
Aravind Venkateswarand0398502013-11-04 16:46:46 -0800338 uint32_t hw_subtype = board_hardware_subtype();
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530339 bool ret = true;
Dhaval Patel11cd8302014-02-18 17:10:16 -0800340 int32_t panel_override_id;
Aravind Venkateswaran9ae369b2013-07-23 22:57:47 -0700341
Aravind Venkateswaranc5863e32014-02-12 12:31:44 -0800342 if (panel_name) {
Dhaval Patel11cd8302014-02-18 17:10:16 -0800343 panel_override_id = panel_name_to_id(supp_panels,
344 ARRAY_SIZE(supp_panels), panel_name);
Aravind Venkateswaranc5863e32014-02-12 12:31:44 -0800345
Dhaval Patel11cd8302014-02-18 17:10:16 -0800346 if (panel_override_id < 0) {
347 dprintf(CRITICAL, "Not able to search the panel:%s\n",
348 panel_name + strspn(panel_name, " "));
349 } else if (panel_override_id < UNKNOWN_PANEL) {
350 /* panel override using fastboot oem command */
351 panel_id = panel_override_id;
352
353 dprintf(INFO, "OEM panel override:%s\n",
354 panel_name + strspn(panel_name, " "));
355 goto panel_init;
356 }
Aravind Venkateswaranc5863e32014-02-12 12:31:44 -0800357 }
Arpita Banerjee841fa062013-05-24 14:59:51 -0700358
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700359 switch (hw_id) {
360 case HW_PLATFORM_QRD:
Aravind Venkateswarand0398502013-11-04 16:46:46 -0800361 if (hw_subtype == HW_PLATFORM_SUBTYPE_SKUF) {
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700362 panel_id = NT35521_720P_VIDEO_PANEL;
Aravind Venkateswarand0398502013-11-04 16:46:46 -0800363 } else if (hw_subtype == HW_PLATFORM_SUBTYPE_SKUG) {
Ray Zhangbe678552013-09-03 19:17:07 +0800364 panel_id = SSD2080M_720P_VIDEO_PANEL;
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700365 } else {
Kun Liang12945ab2013-09-29 18:27:23 +0800366 if (((target_id >> 16) & 0xFF) == 0x1 || ((target_id >> 16) & 0xFF) == 0x3) //EVT || PVT
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700367 panel_id = nt35590_panel_id;
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530368 else if (((target_id >> 16) & 0xFF) == 0x2) { //DVT
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700369 panel_id = HX8394A_720P_VIDEO_PANEL;
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530370 switch (auto_pan_loop) {
371 case 0:
372 panel_id = HX8394A_720P_VIDEO_PANEL;
373 break;
374 case 1:
375 panel_id = NT35596_1080P_VIDEO_PANEL;
376 break;
377 default:
378 panel_id = UNKNOWN_PANEL;
379 ret = false;
380 dprintf(CRITICAL, "Unknown panel\n");
381 return ret;
382 }
383 auto_pan_loop++;
384 }
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700385 else {
386 dprintf(CRITICAL, "Not supported device, target_id=%x\n"
387 , target_id);
388 return false;
389 }
Arpita Banerjee841fa062013-05-24 14:59:51 -0700390 }
391 break;
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700392 case HW_PLATFORM_MTP:
393 case HW_PLATFORM_SURF:
Aravind Venkateswaranbece4382014-01-23 11:43:02 -0800394 if ((hw_subtype == HW_PLATFORM_SUBTYPE_1080P) ||
395 (hw_subtype == HW_PLATFORM_SUBTYPE_1080P_EXT_BUCK))
Aravind Venkateswarand0398502013-11-04 16:46:46 -0800396 panel_id = JDI_1080P_VIDEO_PANEL;
Aravind Venkateswaranbece4382014-01-23 11:43:02 -0800397 else
Jayant Shekharcd300eb2013-12-23 22:39:35 +0530398 panel_id = nt35590_panel_id;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700399 break;
Dhaval Patele4ef9442013-07-16 12:35:56 -0700400 default:
Dhaval Patelfa5d5872013-08-08 10:52:16 -0700401 dprintf(CRITICAL, "Display not enabled for %d HW type\n"
402 , hw_id);
Dhaval Patele4ef9442013-07-16 12:35:56 -0700403 return false;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700404 }
405
Aravind Venkateswaranc5863e32014-02-12 12:31:44 -0800406panel_init:
Arpita Banerjee841fa062013-05-24 14:59:51 -0700407 init_panel_data(panelstruct, pinfo, phy_db);
Jayant Shekhar24bbf692014-03-26 15:43:41 +0530408 mdss_source_pipe_select(pinfo);
Arpita Banerjee841fa062013-05-24 14:59:51 -0700409
Pradeep Jilagamcd51b522013-10-29 13:08:51 +0530410 return ret;
Arpita Banerjee841fa062013-05-24 14:59:51 -0700411}