blob: 80372c542cd1b216a4131278fd8e9711166a8cc6 [file] [log] [blame]
Nagamalleswararao Ganji70fac1e2011-12-29 19:06:37 -08001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -08002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/init.h>
15#include <linux/ioport.h>
16#include <linux/platform_device.h>
17#include <linux/bootmem.h>
Huaibin Yang4a084e32011-12-15 15:25:52 -080018#include <linux/ion.h>
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080019#include <asm/mach-types.h>
20#include <mach/msm_bus_board.h>
Huaibin Yanga5419422011-12-08 23:52:10 -080021#include <mach/msm_memtypes.h>
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080022#include <mach/board.h>
23#include <mach/gpio.h>
24#include <mach/gpiomux.h>
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -080025#include <mach/ion.h>
Amir Samuelov6f1e5002012-02-01 17:42:43 +020026#include <mach/socinfo.h>
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -080027
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080028#include "devices.h"
Stepan Moskovchenko5a83dba2011-12-05 17:30:17 -080029#include "board-8960.h"
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080030
31#ifdef CONFIG_FB_MSM_TRIPLE_BUFFER
Padmanabhan Komanduruede0a632012-01-25 12:01:28 +053032#define MSM_FB_PRIM_BUF_SIZE \
33 (roundup((1920 * 1200 * 4), 4096) * 3) /* 4 bpp x 3 pages */
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080034#else
Padmanabhan Komanduruede0a632012-01-25 12:01:28 +053035#define MSM_FB_PRIM_BUF_SIZE \
36 (roundup((1920 * 1200 * 4), 4096) * 2) /* 4 bpp x 2 pages */
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080037#endif
38
39#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
Padmanabhan Komanduruede0a632012-01-25 12:01:28 +053040#define MSM_FB_EXT_BUF_SIZE \
41 (roundup((1920 * 1088 * 2), 4096) * 1) /* 2 bpp x 1 page */
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080042#elif defined(CONFIG_FB_MSM_TVOUT)
Padmanabhan Komanduruede0a632012-01-25 12:01:28 +053043#define MSM_FB_EXT_BUF_SIZE \
44 (roundup((720 * 576 * 2), 4096) * 2) /* 2 bpp x 2 pages */
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080045#else
46#define MSM_FB_EXT_BUF_SIZE 0
47#endif
48
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080049/* Note: must be multiple of 4096 */
Huaibin Yang27634b82011-12-09 00:16:25 -080050#define MSM_FB_SIZE roundup(MSM_FB_PRIM_BUF_SIZE + MSM_FB_EXT_BUF_SIZE, 4096)
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080051
Huaibin Yanga5419422011-12-08 23:52:10 -080052#ifdef CONFIG_FB_MSM_OVERLAY0_WRITEBACK
Amir Samuelovd7621032011-12-25 12:24:04 +020053#define MSM_FB_OVERLAY0_WRITEBACK_SIZE roundup((1920 * 1200 * 3 * 2), 4096)
Huaibin Yanga5419422011-12-08 23:52:10 -080054#else
55#define MSM_FB_OVERLAY0_WRITEBACK_SIZE (0)
56#endif /* CONFIG_FB_MSM_OVERLAY0_WRITEBACK */
57
58#ifdef CONFIG_FB_MSM_OVERLAY1_WRITEBACK
59#define MSM_FB_OVERLAY1_WRITEBACK_SIZE roundup((1920 * 1088 * 3 * 2), 4096)
60#else
61#define MSM_FB_OVERLAY1_WRITEBACK_SIZE (0)
62#endif /* CONFIG_FB_MSM_OVERLAY1_WRITEBACK */
63
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080064#define MDP_VSYNC_GPIO 0
65
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080066#define MIPI_CMD_NOVATEK_QHD_PANEL_NAME "mipi_cmd_novatek_qhd"
67#define MIPI_VIDEO_NOVATEK_QHD_PANEL_NAME "mipi_video_novatek_qhd"
68#define MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME "mipi_video_toshiba_wsvga"
Ravishangar Kalyanamda07f662012-02-16 13:29:43 -080069#define MIPI_VIDEO_TOSHIBA_WUXGA_PANEL_NAME "mipi_video_toshiba_wuxga"
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080070#define MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME "mipi_video_chimei_wxga"
Amir Samuelov6f1e5002012-02-01 17:42:43 +020071#define MIPI_VIDEO_CHIMEI_WUXGA_PANEL_NAME "mipi_video_chimei_wuxga"
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080072#define MIPI_VIDEO_SIMULATOR_VGA_PANEL_NAME "mipi_video_simulator_vga"
73#define MIPI_CMD_RENESAS_FWVGA_PANEL_NAME "mipi_cmd_renesas_fwvga"
74#define HDMI_PANEL_NAME "hdmi_msm"
75#define TVOUT_PANEL_NAME "tvout_msm"
76
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -080077#ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY
78unsigned char hdmi_is_primary = 1;
79#else
80unsigned char hdmi_is_primary;
81#endif
82
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080083static struct resource msm_fb_resources[] = {
84 {
85 .flags = IORESOURCE_DMA,
86 }
87};
88
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -080089static void set_mdp_clocks_for_wuxga(void);
Amir Samuelovf0d1f542012-02-06 12:50:42 +020090
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -080091static int msm_fb_detect_panel(const char *name)
92{
93 if (machine_is_msm8960_liquid()) {
Amir Samuelov6f1e5002012-02-01 17:42:43 +020094 u32 ver = socinfo_get_platform_version();
95 if (SOCINFO_VERSION_MAJOR(ver) == 3) {
96 if (!strncmp(name, MIPI_VIDEO_CHIMEI_WUXGA_PANEL_NAME,
97 strnlen(MIPI_VIDEO_CHIMEI_WUXGA_PANEL_NAME,
Amir Samuelovf0d1f542012-02-06 12:50:42 +020098 PANEL_NAME_MAX_LEN))) {
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -080099 set_mdp_clocks_for_wuxga();
Amir Samuelov6f1e5002012-02-01 17:42:43 +0200100 return 0;
Amir Samuelovf0d1f542012-02-06 12:50:42 +0200101 }
Amir Samuelov6f1e5002012-02-01 17:42:43 +0200102 } else {
103 if (!strncmp(name, MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
104 strnlen(MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME,
105 PANEL_NAME_MAX_LEN)))
106 return 0;
107 }
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800108 } else {
109 if (!strncmp(name, MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
110 strnlen(MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME,
111 PANEL_NAME_MAX_LEN)))
112 return 0;
113
Ravishangar Kalyanama4286d72012-02-15 16:09:58 -0800114#if !defined(CONFIG_FB_MSM_LVDS_MIPI_PANEL_DETECT) && \
115 !defined(CONFIG_FB_MSM_MIPI_PANEL_DETECT)
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800116 if (!strncmp(name, MIPI_VIDEO_NOVATEK_QHD_PANEL_NAME,
117 strnlen(MIPI_VIDEO_NOVATEK_QHD_PANEL_NAME,
118 PANEL_NAME_MAX_LEN)))
119 return 0;
120
121 if (!strncmp(name, MIPI_CMD_NOVATEK_QHD_PANEL_NAME,
122 strnlen(MIPI_CMD_NOVATEK_QHD_PANEL_NAME,
123 PANEL_NAME_MAX_LEN)))
124 return 0;
125
126 if (!strncmp(name, MIPI_VIDEO_SIMULATOR_VGA_PANEL_NAME,
127 strnlen(MIPI_VIDEO_SIMULATOR_VGA_PANEL_NAME,
128 PANEL_NAME_MAX_LEN)))
129 return 0;
130
131 if (!strncmp(name, MIPI_CMD_RENESAS_FWVGA_PANEL_NAME,
132 strnlen(MIPI_CMD_RENESAS_FWVGA_PANEL_NAME,
133 PANEL_NAME_MAX_LEN)))
134 return 0;
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -0800135
Ravishangar Kalyanamda07f662012-02-16 13:29:43 -0800136 if (!strncmp(name, MIPI_VIDEO_TOSHIBA_WUXGA_PANEL_NAME,
137 strnlen(MIPI_VIDEO_TOSHIBA_WUXGA_PANEL_NAME,
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -0800138 PANEL_NAME_MAX_LEN))) {
139 set_mdp_clocks_for_wuxga();
140 return 0;
141 }
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800142#endif
143 }
144
145 if (!strncmp(name, HDMI_PANEL_NAME,
146 strnlen(HDMI_PANEL_NAME,
147 PANEL_NAME_MAX_LEN)))
148 return 0;
149
150 if (!strncmp(name, TVOUT_PANEL_NAME,
151 strnlen(TVOUT_PANEL_NAME,
152 PANEL_NAME_MAX_LEN)))
153 return 0;
154
155 pr_warning("%s: not supported '%s'", __func__, name);
156 return -ENODEV;
157}
158
159static struct msm_fb_platform_data msm_fb_pdata = {
160 .detect_client = msm_fb_detect_panel,
161};
162
163static struct platform_device msm_fb_device = {
164 .name = "msm_fb",
165 .id = 0,
166 .num_resources = ARRAY_SIZE(msm_fb_resources),
167 .resource = msm_fb_resources,
168 .dev.platform_data = &msm_fb_pdata,
169};
170
171static bool dsi_power_on;
172
173/**
174 * LiQUID panel on/off
175 *
176 * @param on
177 *
178 * @return int
179 */
180static int mipi_dsi_liquid_panel_power(int on)
181{
182 static struct regulator *reg_l2, *reg_ext_3p3v;
183 static int gpio21, gpio24, gpio43;
184 int rc;
185
Jeff Ohlstein2cbe5ba2011-12-16 13:32:56 -0800186 pr_debug("%s: on=%d\n", __func__, on);
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800187
188 gpio21 = PM8921_GPIO_PM_TO_SYS(21); /* disp power enable_n */
189 gpio43 = PM8921_GPIO_PM_TO_SYS(43); /* Displays Enable (rst_n)*/
190 gpio24 = PM8921_GPIO_PM_TO_SYS(24); /* Backlight PWM */
191
192 if (!dsi_power_on) {
193
194 reg_l2 = regulator_get(&msm_mipi_dsi1_device.dev,
195 "dsi_vdda");
196 if (IS_ERR(reg_l2)) {
197 pr_err("could not get 8921_l2, rc = %ld\n",
198 PTR_ERR(reg_l2));
199 return -ENODEV;
200 }
201
202 rc = regulator_set_voltage(reg_l2, 1200000, 1200000);
203 if (rc) {
204 pr_err("set_voltage l2 failed, rc=%d\n", rc);
205 return -EINVAL;
206 }
207
208 reg_ext_3p3v = regulator_get(&msm_mipi_dsi1_device.dev,
209 "vdd_lvds_3p3v");
210 if (IS_ERR(reg_ext_3p3v)) {
211 pr_err("could not get reg_ext_3p3v, rc = %ld\n",
212 PTR_ERR(reg_ext_3p3v));
213 return -ENODEV;
214 }
215
216 rc = gpio_request(gpio21, "disp_pwr_en_n");
217 if (rc) {
218 pr_err("request gpio 21 failed, rc=%d\n", rc);
219 return -ENODEV;
220 }
221
222 rc = gpio_request(gpio43, "disp_rst_n");
223 if (rc) {
224 pr_err("request gpio 43 failed, rc=%d\n", rc);
225 return -ENODEV;
226 }
227
228 rc = gpio_request(gpio24, "disp_backlight_pwm");
229 if (rc) {
230 pr_err("request gpio 24 failed, rc=%d\n", rc);
231 return -ENODEV;
232 }
233
234 dsi_power_on = true;
235 }
236
237 if (on) {
238 rc = regulator_set_optimum_mode(reg_l2, 100000);
239 if (rc < 0) {
240 pr_err("set_optimum_mode l2 failed, rc=%d\n", rc);
241 return -EINVAL;
242 }
243 rc = regulator_enable(reg_l2);
244 if (rc) {
245 pr_err("enable l2 failed, rc=%d\n", rc);
246 return -ENODEV;
247 }
248
249 rc = regulator_enable(reg_ext_3p3v);
250 if (rc) {
251 pr_err("enable reg_ext_3p3v failed, rc=%d\n", rc);
252 return -ENODEV;
253 }
254
255 /* set reset pin before power enable */
256 gpio_set_value_cansleep(gpio43, 0); /* disp disable (resx=0) */
257
258 gpio_set_value_cansleep(gpio21, 0); /* disp power enable_n */
259 msleep(20);
260 gpio_set_value_cansleep(gpio43, 1); /* disp enable */
261 msleep(20);
262 gpio_set_value_cansleep(gpio43, 0); /* disp enable */
263 msleep(20);
264 gpio_set_value_cansleep(gpio43, 1); /* disp enable */
265 msleep(20);
266 } else {
267 gpio_set_value_cansleep(gpio43, 0);
268 gpio_set_value_cansleep(gpio21, 1);
269
270 rc = regulator_disable(reg_l2);
271 if (rc) {
272 pr_err("disable reg_l2 failed, rc=%d\n", rc);
273 return -ENODEV;
274 }
275 rc = regulator_disable(reg_ext_3p3v);
276 if (rc) {
277 pr_err("disable reg_ext_3p3v failed, rc=%d\n", rc);
278 return -ENODEV;
279 }
280 rc = regulator_set_optimum_mode(reg_l2, 100);
281 if (rc < 0) {
282 pr_err("set_optimum_mode l2 failed, rc=%d\n", rc);
283 return -EINVAL;
284 }
285 }
286
287 return 0;
288}
289
290static int mipi_dsi_cdp_panel_power(int on)
291{
292 static struct regulator *reg_l8, *reg_l23, *reg_l2;
293 static int gpio43;
294 int rc;
295
Jeff Ohlstein2cbe5ba2011-12-16 13:32:56 -0800296 pr_debug("%s: state : %d\n", __func__, on);
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800297
298 if (!dsi_power_on) {
299
300 reg_l8 = regulator_get(&msm_mipi_dsi1_device.dev,
301 "dsi_vdc");
302 if (IS_ERR(reg_l8)) {
303 pr_err("could not get 8921_l8, rc = %ld\n",
304 PTR_ERR(reg_l8));
305 return -ENODEV;
306 }
307 reg_l23 = regulator_get(&msm_mipi_dsi1_device.dev,
308 "dsi_vddio");
309 if (IS_ERR(reg_l23)) {
310 pr_err("could not get 8921_l23, rc = %ld\n",
311 PTR_ERR(reg_l23));
312 return -ENODEV;
313 }
314 reg_l2 = regulator_get(&msm_mipi_dsi1_device.dev,
315 "dsi_vdda");
316 if (IS_ERR(reg_l2)) {
317 pr_err("could not get 8921_l2, rc = %ld\n",
318 PTR_ERR(reg_l2));
319 return -ENODEV;
320 }
321 rc = regulator_set_voltage(reg_l8, 2800000, 3000000);
322 if (rc) {
323 pr_err("set_voltage l8 failed, rc=%d\n", rc);
324 return -EINVAL;
325 }
326 rc = regulator_set_voltage(reg_l23, 1800000, 1800000);
327 if (rc) {
328 pr_err("set_voltage l23 failed, rc=%d\n", rc);
329 return -EINVAL;
330 }
331 rc = regulator_set_voltage(reg_l2, 1200000, 1200000);
332 if (rc) {
333 pr_err("set_voltage l2 failed, rc=%d\n", rc);
334 return -EINVAL;
335 }
336 gpio43 = PM8921_GPIO_PM_TO_SYS(43);
337 rc = gpio_request(gpio43, "disp_rst_n");
338 if (rc) {
339 pr_err("request gpio 43 failed, rc=%d\n", rc);
340 return -ENODEV;
341 }
342 dsi_power_on = true;
343 }
344 if (on) {
345 rc = regulator_set_optimum_mode(reg_l8, 100000);
346 if (rc < 0) {
347 pr_err("set_optimum_mode l8 failed, rc=%d\n", rc);
348 return -EINVAL;
349 }
350 rc = regulator_set_optimum_mode(reg_l23, 100000);
351 if (rc < 0) {
352 pr_err("set_optimum_mode l23 failed, rc=%d\n", rc);
353 return -EINVAL;
354 }
355 rc = regulator_set_optimum_mode(reg_l2, 100000);
356 if (rc < 0) {
357 pr_err("set_optimum_mode l2 failed, rc=%d\n", rc);
358 return -EINVAL;
359 }
360 rc = regulator_enable(reg_l8);
361 if (rc) {
362 pr_err("enable l8 failed, rc=%d\n", rc);
363 return -ENODEV;
364 }
365 rc = regulator_enable(reg_l23);
366 if (rc) {
367 pr_err("enable l8 failed, rc=%d\n", rc);
368 return -ENODEV;
369 }
370 rc = regulator_enable(reg_l2);
371 if (rc) {
372 pr_err("enable l2 failed, rc=%d\n", rc);
373 return -ENODEV;
374 }
375 gpio_set_value_cansleep(gpio43, 1);
376 } else {
377 rc = regulator_disable(reg_l2);
378 if (rc) {
379 pr_err("disable reg_l2 failed, rc=%d\n", rc);
380 return -ENODEV;
381 }
382 rc = regulator_disable(reg_l8);
383 if (rc) {
384 pr_err("disable reg_l8 failed, rc=%d\n", rc);
385 return -ENODEV;
386 }
387 rc = regulator_disable(reg_l23);
388 if (rc) {
389 pr_err("disable reg_l23 failed, rc=%d\n", rc);
390 return -ENODEV;
391 }
392 rc = regulator_set_optimum_mode(reg_l8, 100);
393 if (rc < 0) {
394 pr_err("set_optimum_mode l8 failed, rc=%d\n", rc);
395 return -EINVAL;
396 }
397 rc = regulator_set_optimum_mode(reg_l23, 100);
398 if (rc < 0) {
399 pr_err("set_optimum_mode l23 failed, rc=%d\n", rc);
400 return -EINVAL;
401 }
402 rc = regulator_set_optimum_mode(reg_l2, 100);
403 if (rc < 0) {
404 pr_err("set_optimum_mode l2 failed, rc=%d\n", rc);
405 return -EINVAL;
406 }
407 gpio_set_value_cansleep(gpio43, 0);
408 }
409 return 0;
410}
411
412static int mipi_dsi_panel_power(int on)
413{
414 int ret;
415
Jeff Ohlstein2cbe5ba2011-12-16 13:32:56 -0800416 pr_debug("%s: on=%d\n", __func__, on);
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800417
418 if (machine_is_msm8960_liquid())
419 ret = mipi_dsi_liquid_panel_power(on);
420 else
421 ret = mipi_dsi_cdp_panel_power(on);
422
423 return ret;
424}
425
426static struct mipi_dsi_platform_data mipi_dsi_pdata = {
427 .vsync_gpio = MDP_VSYNC_GPIO,
428 .dsi_power_save = mipi_dsi_panel_power,
429};
430
431#ifdef CONFIG_MSM_BUS_SCALING
432
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -0800433static struct msm_bus_vectors rotator_init_vectors[] = {
434 {
435 .src = MSM_BUS_MASTER_ROTATOR,
436 .dst = MSM_BUS_SLAVE_EBI_CH0,
437 .ab = 0,
438 .ib = 0,
439 },
440};
441
442static struct msm_bus_vectors rotator_ui_vectors[] = {
443 {
444 .src = MSM_BUS_MASTER_ROTATOR,
445 .dst = MSM_BUS_SLAVE_EBI_CH0,
446 .ab = (1024 * 600 * 4 * 2 * 60),
447 .ib = (1024 * 600 * 4 * 2 * 60 * 1.5),
448 },
449};
450
451static struct msm_bus_vectors rotator_vga_vectors[] = {
452 {
453 .src = MSM_BUS_MASTER_ROTATOR,
454 .dst = MSM_BUS_SLAVE_EBI_CH0,
455 .ab = (640 * 480 * 2 * 2 * 30),
456 .ib = (640 * 480 * 2 * 2 * 30 * 1.5),
457 },
458};
459static struct msm_bus_vectors rotator_720p_vectors[] = {
460 {
461 .src = MSM_BUS_MASTER_ROTATOR,
462 .dst = MSM_BUS_SLAVE_EBI_CH0,
463 .ab = (1280 * 736 * 2 * 2 * 30),
464 .ib = (1280 * 736 * 2 * 2 * 30 * 1.5),
465 },
466};
467
468static struct msm_bus_vectors rotator_1080p_vectors[] = {
469 {
470 .src = MSM_BUS_MASTER_ROTATOR,
471 .dst = MSM_BUS_SLAVE_EBI_CH0,
472 .ab = (1920 * 1088 * 2 * 2 * 30),
473 .ib = (1920 * 1088 * 2 * 2 * 30 * 1.5),
474 },
475};
476
477static struct msm_bus_paths rotator_bus_scale_usecases[] = {
478 {
479 ARRAY_SIZE(rotator_init_vectors),
480 rotator_init_vectors,
481 },
482 {
483 ARRAY_SIZE(rotator_ui_vectors),
484 rotator_ui_vectors,
485 },
486 {
487 ARRAY_SIZE(rotator_vga_vectors),
488 rotator_vga_vectors,
489 },
490 {
491 ARRAY_SIZE(rotator_720p_vectors),
492 rotator_720p_vectors,
493 },
494 {
495 ARRAY_SIZE(rotator_1080p_vectors),
496 rotator_1080p_vectors,
497 },
498};
499
500struct msm_bus_scale_pdata rotator_bus_scale_pdata = {
501 rotator_bus_scale_usecases,
502 ARRAY_SIZE(rotator_bus_scale_usecases),
503 .name = "rotator",
504};
505
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800506static struct msm_bus_vectors mdp_init_vectors[] = {
507 {
508 .src = MSM_BUS_MASTER_MDP_PORT0,
509 .dst = MSM_BUS_SLAVE_EBI_CH0,
510 .ab = 0,
511 .ib = 0,
512 },
513};
514
515#ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY
516static struct msm_bus_vectors hdmi_as_primary_vectors[] = {
517 /* If HDMI is used as primary */
518 {
519 .src = MSM_BUS_MASTER_MDP_PORT0,
520 .dst = MSM_BUS_SLAVE_EBI_CH0,
521 .ab = 2000000000,
522 .ib = 2000000000,
523 },
524};
525static struct msm_bus_paths mdp_bus_scale_usecases[] = {
526 {
527 ARRAY_SIZE(mdp_init_vectors),
528 mdp_init_vectors,
529 },
530 {
531 ARRAY_SIZE(hdmi_as_primary_vectors),
532 hdmi_as_primary_vectors,
533 },
534 {
535 ARRAY_SIZE(hdmi_as_primary_vectors),
536 hdmi_as_primary_vectors,
537 },
538 {
539 ARRAY_SIZE(hdmi_as_primary_vectors),
540 hdmi_as_primary_vectors,
541 },
542 {
543 ARRAY_SIZE(hdmi_as_primary_vectors),
544 hdmi_as_primary_vectors,
545 },
546 {
547 ARRAY_SIZE(hdmi_as_primary_vectors),
548 hdmi_as_primary_vectors,
549 },
550};
551#else
552static struct msm_bus_vectors mdp_ui_vectors[] = {
553 {
554 .src = MSM_BUS_MASTER_MDP_PORT0,
555 .dst = MSM_BUS_SLAVE_EBI_CH0,
556 .ab = 216000000 * 2,
557 .ib = 270000000 * 2,
558 },
559};
560
561static struct msm_bus_vectors mdp_vga_vectors[] = {
562 /* VGA and less video */
563 {
564 .src = MSM_BUS_MASTER_MDP_PORT0,
565 .dst = MSM_BUS_SLAVE_EBI_CH0,
566 .ab = 216000000 * 2,
567 .ib = 270000000 * 2,
568 },
569};
570
571static struct msm_bus_vectors mdp_720p_vectors[] = {
572 /* 720p and less video */
573 {
574 .src = MSM_BUS_MASTER_MDP_PORT0,
575 .dst = MSM_BUS_SLAVE_EBI_CH0,
576 .ab = 230400000 * 2,
577 .ib = 288000000 * 2,
578 },
579};
580
581static struct msm_bus_vectors mdp_1080p_vectors[] = {
582 /* 1080p and less video */
583 {
584 .src = MSM_BUS_MASTER_MDP_PORT0,
585 .dst = MSM_BUS_SLAVE_EBI_CH0,
586 .ab = 334080000 * 2,
587 .ib = 417600000 * 2,
588 },
589};
590
591static struct msm_bus_paths mdp_bus_scale_usecases[] = {
592 {
593 ARRAY_SIZE(mdp_init_vectors),
594 mdp_init_vectors,
595 },
596 {
597 ARRAY_SIZE(mdp_ui_vectors),
598 mdp_ui_vectors,
599 },
600 {
601 ARRAY_SIZE(mdp_ui_vectors),
602 mdp_ui_vectors,
603 },
604 {
605 ARRAY_SIZE(mdp_vga_vectors),
606 mdp_vga_vectors,
607 },
608 {
609 ARRAY_SIZE(mdp_720p_vectors),
610 mdp_720p_vectors,
611 },
612 {
613 ARRAY_SIZE(mdp_1080p_vectors),
614 mdp_1080p_vectors,
615 },
616};
617#endif
618
619static struct msm_bus_scale_pdata mdp_bus_scale_pdata = {
620 mdp_bus_scale_usecases,
621 ARRAY_SIZE(mdp_bus_scale_usecases),
622 .name = "mdp",
623};
624
625#endif
626
Stepan Moskovchenkofc70d902011-11-30 12:39:36 -0800627static int mdp_core_clk_rate_table[] = {
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800628 85330000,
Huaibin Yang1f180ee2012-01-30 16:23:06 -0800629 128000000,
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800630 160000000,
631 200000000,
632};
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800633
634static struct msm_panel_common_pdata mdp_pdata = {
635 .gpio = MDP_VSYNC_GPIO,
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800636 .mdp_core_clk_rate = 85330000,
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800637 .mdp_core_clk_table = mdp_core_clk_rate_table,
638 .num_mdp_clk = ARRAY_SIZE(mdp_core_clk_rate_table),
639#ifdef CONFIG_MSM_BUS_SCALING
640 .mdp_bus_scale_table = &mdp_bus_scale_pdata,
641#endif
642 .mdp_rev = MDP_REV_42,
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -0800643#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
644 .mem_hid = ION_CP_MM_HEAP_ID,
645#else
646 .mem_hid = MEMTYPE_EBI1,
647#endif
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800648};
649
Amir Samuelovf0d1f542012-02-06 12:50:42 +0200650/**
651 * Set MDP clocks to high frequency to avoid DSI underflow
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -0800652 * when using high resolution 1200x1920 WUXGA panels
Amir Samuelovf0d1f542012-02-06 12:50:42 +0200653 */
Ravishangar Kalyanam8e784252012-02-10 16:27:51 -0800654static void set_mdp_clocks_for_wuxga(void)
Amir Samuelovf0d1f542012-02-06 12:50:42 +0200655{
656 int i;
657
658 mdp_ui_vectors[0].ab = 2000000000;
659 mdp_ui_vectors[0].ib = 2000000000;
Ravishangar Kalyanam30170872012-02-25 17:47:18 -0800660 mdp_vga_vectors[0].ab = 2000000000;
661 mdp_vga_vectors[0].ib = 2000000000;
662 mdp_720p_vectors[0].ab = 2000000000;
663 mdp_720p_vectors[0].ib = 2000000000;
664 mdp_1080p_vectors[0].ab = 2000000000;
665 mdp_1080p_vectors[0].ib = 2000000000;
Amir Samuelovf0d1f542012-02-06 12:50:42 +0200666
667 mdp_pdata.mdp_core_clk_rate = 200000000;
668
669 for (i = 0; i < ARRAY_SIZE(mdp_core_clk_rate_table); i++)
670 mdp_core_clk_rate_table[i] = 200000000;
671
672}
673
Huaibin Yanga5419422011-12-08 23:52:10 -0800674void __init msm8960_mdp_writeback(struct memtype_reserve* reserve_table)
675{
Nagamalleswararao Ganji937a1192011-12-07 19:00:52 -0800676 mdp_pdata.ov0_wb_size = MSM_FB_OVERLAY0_WRITEBACK_SIZE;
677 mdp_pdata.ov1_wb_size = MSM_FB_OVERLAY1_WRITEBACK_SIZE;
678#if defined(CONFIG_ANDROID_PMEM) && !defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
679 reserve_table[mdp_pdata.mem_hid].size +=
680 mdp_pdata.ov0_wb_size;
681 reserve_table[mdp_pdata.mem_hid].size +=
682 mdp_pdata.ov1_wb_size;
683#endif
Huaibin Yanga5419422011-12-08 23:52:10 -0800684}
685
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800686static struct platform_device mipi_dsi_renesas_panel_device = {
687 .name = "mipi_renesas",
688 .id = 0,
689};
690
691static struct platform_device mipi_dsi_simulator_panel_device = {
692 .name = "mipi_simulator",
693 .id = 0,
694};
695
696#define LPM_CHANNEL0 0
697static int toshiba_gpio[] = {LPM_CHANNEL0};
698
699static struct mipi_dsi_panel_platform_data toshiba_pdata = {
700 .gpio = toshiba_gpio,
701};
702
703static struct platform_device mipi_dsi_toshiba_panel_device = {
704 .name = "mipi_toshiba",
705 .id = 0,
706 .dev = {
707 .platform_data = &toshiba_pdata,
708 }
709};
710
711#define FPGA_3D_GPIO_CONFIG_ADDR 0xB5
Amir Samuelovca199b92012-01-31 14:50:04 +0200712static int dsi2lvds_gpio[4] = {
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800713 0,/* Backlight PWM-ID=0 for PMIC-GPIO#24 */
Amir Samuelovca199b92012-01-31 14:50:04 +0200714 0x1F08, /* DSI2LVDS Bridge GPIO Output, mask=0x1f, out=0x08 */
715 GPIO_LIQUID_EXPANDER_BASE+6, /* TN Enable */
716 GPIO_LIQUID_EXPANDER_BASE+7, /* TN Mode */
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800717 };
718
719static struct msm_panel_common_pdata mipi_dsi2lvds_pdata = {
720 .gpio_num = dsi2lvds_gpio,
721};
722
723static struct mipi_dsi_phy_ctrl dsi_novatek_cmd_mode_phy_db = {
724
725/* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
726 {0x0F, 0x0a, 0x04, 0x00, 0x20}, /* regulator */
727 /* timing */
728 {0xab, 0x8a, 0x18, 0x00, 0x92, 0x97, 0x1b, 0x8c,
729 0x0c, 0x03, 0x04, 0xa0},
730 {0x5f, 0x00, 0x00, 0x10}, /* phy ctrl */
731 {0xff, 0x00, 0x06, 0x00}, /* strength */
732 /* pll control */
733 {0x40, 0xf9, 0x30, 0xda, 0x00, 0x40, 0x03, 0x62,
734 0x40, 0x07, 0x03,
735 0x00, 0x1a, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x01},
736};
737
738static struct mipi_dsi_panel_platform_data novatek_pdata = {
739 .fpga_3d_config_addr = FPGA_3D_GPIO_CONFIG_ADDR,
740 .fpga_ctrl_mode = FPGA_SPI_INTF,
741 .phy_ctrl_settings = &dsi_novatek_cmd_mode_phy_db,
742};
743
744static struct platform_device mipi_dsi_novatek_panel_device = {
745 .name = "mipi_novatek",
746 .id = 0,
747 .dev = {
748 .platform_data = &novatek_pdata,
749 }
750};
751
752static struct platform_device mipi_dsi2lvds_bridge_device = {
753 .name = "mipi_tc358764",
754 .id = 0,
755 .dev.platform_data = &mipi_dsi2lvds_pdata,
756};
757
758#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
759static struct resource hdmi_msm_resources[] = {
760 {
761 .name = "hdmi_msm_qfprom_addr",
762 .start = 0x00700000,
763 .end = 0x007060FF,
764 .flags = IORESOURCE_MEM,
765 },
766 {
767 .name = "hdmi_msm_hdmi_addr",
768 .start = 0x04A00000,
769 .end = 0x04A00FFF,
770 .flags = IORESOURCE_MEM,
771 },
772 {
773 .name = "hdmi_msm_irq",
774 .start = HDMI_IRQ,
775 .end = HDMI_IRQ,
776 .flags = IORESOURCE_IRQ,
777 },
778};
779
780static int hdmi_enable_5v(int on);
781static int hdmi_core_power(int on, int show);
782static int hdmi_cec_power(int on);
783
784static struct msm_hdmi_platform_data hdmi_msm_data = {
785 .irq = HDMI_IRQ,
786 .enable_5v = hdmi_enable_5v,
787 .core_power = hdmi_core_power,
788 .cec_power = hdmi_cec_power,
789};
790
791static struct platform_device hdmi_msm_device = {
792 .name = "hdmi_msm",
793 .id = 0,
794 .num_resources = ARRAY_SIZE(hdmi_msm_resources),
795 .resource = hdmi_msm_resources,
796 .dev.platform_data = &hdmi_msm_data,
797};
798#endif /* CONFIG_FB_MSM_HDMI_MSM_PANEL */
799
800#ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
801static struct platform_device wfd_panel_device = {
802 .name = "wfd_panel",
803 .id = 0,
804 .dev.platform_data = NULL,
805};
Stepan Moskovchenko270888d2011-11-30 12:19:11 -0800806
807static struct platform_device wfd_device = {
808 .name = "msm_wfd",
809 .id = -1,
810};
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800811#endif
812
813#ifdef CONFIG_MSM_BUS_SCALING
814static struct msm_bus_vectors dtv_bus_init_vectors[] = {
815 {
816 .src = MSM_BUS_MASTER_MDP_PORT0,
817 .dst = MSM_BUS_SLAVE_EBI_CH0,
818 .ab = 0,
819 .ib = 0,
820 },
821};
822
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800823static struct msm_bus_vectors dtv_bus_def_vectors[] = {
824 {
825 .src = MSM_BUS_MASTER_MDP_PORT0,
826 .dst = MSM_BUS_SLAVE_EBI_CH0,
827 .ab = 566092800 * 2,
828 .ib = 707616000 * 2,
829 },
830};
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800831
832static struct msm_bus_paths dtv_bus_scale_usecases[] = {
833 {
834 ARRAY_SIZE(dtv_bus_init_vectors),
835 dtv_bus_init_vectors,
836 },
837 {
838 ARRAY_SIZE(dtv_bus_def_vectors),
839 dtv_bus_def_vectors,
840 },
841};
842static struct msm_bus_scale_pdata dtv_bus_scale_pdata = {
843 dtv_bus_scale_usecases,
844 ARRAY_SIZE(dtv_bus_scale_usecases),
845 .name = "dtv",
846};
847
848static struct lcdc_platform_data dtv_pdata = {
849 .bus_scale_table = &dtv_bus_scale_pdata,
850};
851#endif
852
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800853#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800854static int hdmi_enable_5v(int on)
855{
856 /* TBD: PM8921 regulator instead of 8901 */
857 static struct regulator *reg_8921_hdmi_mvs; /* HDMI_5V */
858 static int prev_on;
859 int rc;
860
861 if (on == prev_on)
862 return 0;
863
Ajay Singh Parmar07847642011-12-09 02:57:45 +0530864 if (!reg_8921_hdmi_mvs) {
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800865 reg_8921_hdmi_mvs = regulator_get(&hdmi_msm_device.dev,
Ajay Singh Parmar07847642011-12-09 02:57:45 +0530866 "hdmi_mvs");
867 if (IS_ERR(reg_8921_hdmi_mvs)) {
868 pr_err("'%s' regulator not found, rc=%ld\n",
869 "hdmi_mvs", IS_ERR(reg_8921_hdmi_mvs));
870 reg_8921_hdmi_mvs = NULL;
871 return -ENODEV;
872 }
873 }
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -0800874
875 if (on) {
876 rc = regulator_enable(reg_8921_hdmi_mvs);
877 if (rc) {
878 pr_err("'%s' regulator enable failed, rc=%d\n",
879 "8921_hdmi_mvs", rc);
880 return rc;
881 }
882 pr_debug("%s(on): success\n", __func__);
883 } else {
884 rc = regulator_disable(reg_8921_hdmi_mvs);
885 if (rc)
886 pr_warning("'%s' regulator disable failed, rc=%d\n",
887 "8921_hdmi_mvs", rc);
888 pr_debug("%s(off): success\n", __func__);
889 }
890
891 prev_on = on;
892
893 return 0;
894}
895
896static int hdmi_core_power(int on, int show)
897{
898 static struct regulator *reg_8921_l23, *reg_8921_s4;
899 static int prev_on;
900 int rc;
901
902 if (on == prev_on)
903 return 0;
904
905 /* TBD: PM8921 regulator instead of 8901 */
906 if (!reg_8921_l23) {
907 reg_8921_l23 = regulator_get(&hdmi_msm_device.dev, "hdmi_avdd");
908 if (IS_ERR(reg_8921_l23)) {
909 pr_err("could not get reg_8921_l23, rc = %ld\n",
910 PTR_ERR(reg_8921_l23));
911 return -ENODEV;
912 }
913 rc = regulator_set_voltage(reg_8921_l23, 1800000, 1800000);
914 if (rc) {
915 pr_err("set_voltage failed for 8921_l23, rc=%d\n", rc);
916 return -EINVAL;
917 }
918 }
919 if (!reg_8921_s4) {
920 reg_8921_s4 = regulator_get(&hdmi_msm_device.dev, "hdmi_vcc");
921 if (IS_ERR(reg_8921_s4)) {
922 pr_err("could not get reg_8921_s4, rc = %ld\n",
923 PTR_ERR(reg_8921_s4));
924 return -ENODEV;
925 }
926 rc = regulator_set_voltage(reg_8921_s4, 1800000, 1800000);
927 if (rc) {
928 pr_err("set_voltage failed for 8921_s4, rc=%d\n", rc);
929 return -EINVAL;
930 }
931 }
932
933 if (on) {
934 rc = regulator_set_optimum_mode(reg_8921_l23, 100000);
935 if (rc < 0) {
936 pr_err("set_optimum_mode l23 failed, rc=%d\n", rc);
937 return -EINVAL;
938 }
939 rc = regulator_enable(reg_8921_l23);
940 if (rc) {
941 pr_err("'%s' regulator enable failed, rc=%d\n",
942 "hdmi_avdd", rc);
943 return rc;
944 }
945 rc = regulator_enable(reg_8921_s4);
946 if (rc) {
947 pr_err("'%s' regulator enable failed, rc=%d\n",
948 "hdmi_vcc", rc);
949 return rc;
950 }
951 rc = gpio_request(100, "HDMI_DDC_CLK");
952 if (rc) {
953 pr_err("'%s'(%d) gpio_request failed, rc=%d\n",
954 "HDMI_DDC_CLK", 100, rc);
955 goto error1;
956 }
957 rc = gpio_request(101, "HDMI_DDC_DATA");
958 if (rc) {
959 pr_err("'%s'(%d) gpio_request failed, rc=%d\n",
960 "HDMI_DDC_DATA", 101, rc);
961 goto error2;
962 }
963 rc = gpio_request(102, "HDMI_HPD");
964 if (rc) {
965 pr_err("'%s'(%d) gpio_request failed, rc=%d\n",
966 "HDMI_HPD", 102, rc);
967 goto error3;
968 }
969 pr_debug("%s(on): success\n", __func__);
970 } else {
971 gpio_free(100);
972 gpio_free(101);
973 gpio_free(102);
974
975 rc = regulator_disable(reg_8921_l23);
976 if (rc) {
977 pr_err("disable reg_8921_l23 failed, rc=%d\n", rc);
978 return -ENODEV;
979 }
980 rc = regulator_disable(reg_8921_s4);
981 if (rc) {
982 pr_err("disable reg_8921_s4 failed, rc=%d\n", rc);
983 return -ENODEV;
984 }
985 rc = regulator_set_optimum_mode(reg_8921_l23, 100);
986 if (rc < 0) {
987 pr_err("set_optimum_mode l23 failed, rc=%d\n", rc);
988 return -EINVAL;
989 }
990 pr_debug("%s(off): success\n", __func__);
991 }
992
993 prev_on = on;
994
995 return 0;
996
997error3:
998 gpio_free(101);
999error2:
1000 gpio_free(100);
1001error1:
1002 regulator_disable(reg_8921_l23);
1003 regulator_disable(reg_8921_s4);
1004 return rc;
1005}
1006
1007static int hdmi_cec_power(int on)
1008{
1009 static int prev_on;
1010 int rc;
1011
1012 if (on == prev_on)
1013 return 0;
1014
1015 if (on) {
1016 rc = gpio_request(99, "HDMI_CEC_VAR");
1017 if (rc) {
1018 pr_err("'%s'(%d) gpio_request failed, rc=%d\n",
1019 "HDMI_CEC_VAR", 99, rc);
1020 goto error;
1021 }
1022 pr_debug("%s(on): success\n", __func__);
1023 } else {
1024 gpio_free(99);
1025 pr_debug("%s(off): success\n", __func__);
1026 }
1027
1028 prev_on = on;
1029
1030 return 0;
1031error:
1032 return rc;
1033}
1034#endif /* CONFIG_FB_MSM_HDMI_MSM_PANEL */
1035
1036void __init msm8960_init_fb(void)
1037{
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -08001038 platform_device_register(&msm_fb_device);
1039
Stepan Moskovchenko270888d2011-11-30 12:19:11 -08001040#ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL
1041 platform_device_register(&wfd_panel_device);
1042 platform_device_register(&wfd_device);
1043#endif
1044
Stepan Moskovchenko24cd8642011-11-29 13:07:53 -08001045 if (machine_is_msm8960_sim())
1046 platform_device_register(&mipi_dsi_simulator_panel_device);
1047
1048 if (machine_is_msm8960_rumi3())
1049 platform_device_register(&mipi_dsi_renesas_panel_device);
1050
1051 if (!machine_is_msm8960_sim() && !machine_is_msm8960_rumi3()) {
1052 platform_device_register(&mipi_dsi_novatek_panel_device);
1053
1054#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL
1055 platform_device_register(&hdmi_msm_device);
1056#endif
1057 }
1058
1059 if (machine_is_msm8960_liquid())
1060 platform_device_register(&mipi_dsi2lvds_bridge_device);
1061 else
1062 platform_device_register(&mipi_dsi_toshiba_panel_device);
1063
1064 if (machine_is_msm8x60_rumi3()) {
1065 msm_fb_register_device("mdp", NULL);
1066 mipi_dsi_pdata.target_type = 1;
1067 } else
1068 msm_fb_register_device("mdp", &mdp_pdata);
1069 msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata);
1070#ifdef CONFIG_MSM_BUS_SCALING
1071 msm_fb_register_device("dtv", &dtv_pdata);
1072#endif
1073}
1074
1075void __init msm8960_allocate_fb_region(void)
1076{
1077 void *addr;
1078 unsigned long size;
1079
1080 size = MSM_FB_SIZE;
1081 addr = alloc_bootmem_align(size, 0x1000);
1082 msm_fb_resources[0].start = __pa(addr);
1083 msm_fb_resources[0].end = msm_fb_resources[0].start + size - 1;
1084 pr_info("allocating %lu bytes at %p (%lx physical) for fb\n",
1085 size, addr, __pa(addr));
1086}
Ravishangar Kalyanam8c79ead2011-12-02 21:05:01 -08001087
1088void __init msm8960_set_display_params(char *prim_panel, char *ext_panel)
1089{
1090 if (strnlen(prim_panel, PANEL_NAME_MAX_LEN)) {
1091 strlcpy(msm_fb_pdata.prim_panel_name, prim_panel,
1092 PANEL_NAME_MAX_LEN);
1093 pr_debug("msm_fb_pdata.prim_panel_name %s\n",
1094 msm_fb_pdata.prim_panel_name);
1095
1096 if (!strncmp((char *)msm_fb_pdata.prim_panel_name,
1097 HDMI_PANEL_NAME, strnlen(HDMI_PANEL_NAME,
1098 PANEL_NAME_MAX_LEN))) {
1099 pr_debug("HDMI is the primary display by"
1100 " boot parameter\n");
1101 hdmi_is_primary = 1;
1102 }
1103 }
1104 if (strnlen(ext_panel, PANEL_NAME_MAX_LEN)) {
1105 strlcpy(msm_fb_pdata.ext_panel_name, ext_panel,
1106 PANEL_NAME_MAX_LEN);
1107 pr_debug("msm_fb_pdata.ext_panel_name %s\n",
1108 msm_fb_pdata.ext_panel_name);
1109 }
1110}