Merge "make: Create stripped elf binary for aboot"
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 1d94211..222b184 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -66,7 +66,6 @@
 #include "mmc.h"
 #include "devinfo.h"
 #include "board.h"
-
 #include "scm.h"
 
 extern  bool target_use_signed_kernel(void);
@@ -137,7 +136,7 @@
 /* Assuming unauthorized kernel image by default */
 static int auth_kernel_img = 0;
 
-static device_info device = {DEVICE_MAGIC, 0, 0, 0};
+static device_info device = {DEVICE_MAGIC, 0, 0, 0, 0};
 
 struct atag_ptbl_entry
 {
@@ -174,6 +173,7 @@
 char charger_screen_enabled[MAX_RSP_SIZE];
 char sn_buf[13];
 char display_panel_buf[MAX_PANEL_BUF_SIZE];
+char panel_display_mode[MAX_RSP_SIZE];
 
 extern int emmc_recovery_init(void);
 
@@ -603,6 +603,12 @@
 	/* Perform target specific cleanup */
 	target_uninit();
 
+	/* Turn off splash screen if enabled */
+#if DISPLAY_SPLASH_SCREEN
+	target_display_shutdown();
+#endif
+
+
 	dprintf(INFO, "booting linux @ %p, ramdisk @ %p (%d), tags/device tree @ %p\n",
 		entry, ramdisk, ramdisk_size, tags_phys);
 
@@ -2088,6 +2094,16 @@
 	fastboot_okay("");
 }
 
+void cmd_oem_select_display_panel(const char *arg, void *data, unsigned size)
+{
+	dprintf(INFO, "Selecting display panel %s\n", arg);
+	if (arg)
+		strlcpy(device.display_panel, arg,
+			sizeof(device.display_panel));
+	write_device_info(&device);
+	fastboot_okay("");
+}
+
 void cmd_oem_unlock(const char *arg, void *data, unsigned sz)
 {
 	if(!device.is_unlocked)
@@ -2100,13 +2116,15 @@
 
 void cmd_oem_devinfo(const char *arg, void *data, unsigned sz)
 {
-	char response[64];
+	char response[128];
 	snprintf(response, sizeof(response), "\tDevice tampered: %s", (device.is_tampered ? "true" : "false"));
 	fastboot_info(response);
 	snprintf(response, sizeof(response), "\tDevice unlocked: %s", (device.is_unlocked ? "true" : "false"));
 	fastboot_info(response);
 	snprintf(response, sizeof(response), "\tCharger screen enabled: %s", (device.charger_screen_enabled ? "true" : "false"));
 	fastboot_info(response);
+	snprintf(response, sizeof(response), "\tDisplay panel: %s", (device.display_panel));
+	fastboot_info(response);
 	fastboot_okay("");
 }
 
@@ -2319,6 +2337,8 @@
 			cmd_oem_enable_charger_screen);
 	fastboot_register("oem disable-charger-screen",
 			cmd_oem_disable_charger_screen);
+	fastboot_register("oem select-display-panel",
+			cmd_oem_select_display_panel);
 	/* publish variables and their values */
 	fastboot_publish("product",  TARGET(BOARD));
 	fastboot_publish("kernel",   "lk");
@@ -2342,6 +2362,10 @@
 			device.charger_screen_enabled);
 	fastboot_publish("charger-screen-enabled",
 			(const char *) charger_screen_enabled);
+	snprintf(panel_display_mode, MAX_RSP_SIZE, "%s",
+			device.display_panel);
+	fastboot_publish("display-panel",
+			(const char *) panel_display_mode);
 }
 
 void aboot_init(const struct app_descriptor *app)
@@ -2365,6 +2389,14 @@
 
 	read_device_info(&device);
 
+	/* Display splash screen if enabled */
+#if DISPLAY_SPLASH_SCREEN
+	dprintf(SPEW, "Display Init: Start\n");
+	target_display_init(device.display_panel);
+	dprintf(SPEW, "Display Init: Done\n");
+#endif
+
+
 	target_serialno((unsigned char *) sn_buf);
 	dprintf(SPEW,"serial number: %s\n",sn_buf);
 
diff --git a/app/aboot/devinfo.h b/app/aboot/devinfo.h
index 558aaf9..a0d8743 100644
--- a/app/aboot/devinfo.h
+++ b/app/aboot/devinfo.h
@@ -1,5 +1,5 @@
 /*
- * * Copyright (c) 2011, The Linux Foundation. All rights reserved.
+ * * Copyright (c) 2011,2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -34,6 +34,7 @@
 
 #define DEVICE_MAGIC "ANDROID-BOOT!"
 #define DEVICE_MAGIC_SIZE 13
+#define MAX_PANEL_ID_LEN 64
 
 struct device_info
 {
@@ -41,6 +42,7 @@
 	bool is_unlocked;
 	bool is_tampered;
 	bool charger_screen_enabled;
+	char display_panel[MAX_PANEL_ID_LEN];
 };
 
 #endif
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index 09da146..8094dbd 100755
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -277,11 +277,11 @@
 	memcpy(dsi_video_mode_phy_db.laneCfg, panel_lane_config, LANE_SIZE);
 }
 
-int gcdb_display_init(uint32_t rev, void *base)
+int gcdb_display_init(const char *panel_name, uint32_t rev, void *base)
 {
 	int ret = NO_ERROR;
 
-	if (!oem_panel_select(&panelstruct, &(panel.panel_info),
+	if (!oem_panel_select(panel_name, &panelstruct, &(panel.panel_info),
 				 &dsi_video_mode_phy_db)) {
 		dprintf(CRITICAL, "Target panel init not found!\n");
 		ret = ERR_NOT_SUPPORTED;
diff --git a/dev/gcdb/display/gcdb_display.h b/dev/gcdb/display/gcdb_display.h
index 6259896..b2fb974 100755
--- a/dev/gcdb/display/gcdb_display.h
+++ b/dev/gcdb/display/gcdb_display.h
@@ -58,7 +58,7 @@
 						struct msm_panel_info *pinfo);
 int target_ldo_ctrl(uint8_t enable);
 
-int gcdb_display_init(uint32_t rev, void *base);
+int gcdb_display_init(const char *panel_name, uint32_t rev, void *base);
 void gcdb_display_shutdown();
 
 #endif /*_GCDB_DISPLAY_H_ */
diff --git a/dev/gcdb/display/panel_display.c b/dev/gcdb/display/panel_display.c
index 4651051..e34d966 100644
--- a/dev/gcdb/display/panel_display.c
+++ b/dev/gcdb/display/panel_display.c
@@ -38,6 +38,7 @@
 #include <err.h>
 #include <reg.h>
 #include <mdp5.h>
+#include <string.h>
 
 
 /*---------------------------------------------------------------------------*/
@@ -325,3 +326,28 @@
 
 	return ret;
 }
+
+int32_t panel_name_to_id(struct panel_list supp_panels[],
+			  uint32_t supp_panels_size,
+			  const char *panel_name)
+{
+	uint32_t i;
+	int32_t panel_id = ERR_NOT_FOUND;
+
+	if (!panel_name) {
+		dprintf(CRITICAL, "Invalid panel name\n");
+		return panel_id;
+	}
+
+	/* Remove any leading whitespaces */
+	panel_name += strspn(panel_name, " ");
+	for (i = 0; i < supp_panels_size; i++) {
+		if (!strncmp(panel_name, supp_panels[i].name,
+			MAX_PANEL_ID_LEN)) {
+			panel_id = supp_panels[i].id;
+			break;
+		}
+	}
+
+	return panel_id;
+}
diff --git a/dev/gcdb/display/panel_display.h b/dev/gcdb/display/panel_display.h
index d805715..676bd69 100755
--- a/dev/gcdb/display/panel_display.h
+++ b/dev/gcdb/display/panel_display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -44,6 +44,8 @@
 #define DUAL_PIPE_FLAG 0x2
 #define PIPE_SWAP_FLAG 0x4
 #define SPLIT_DISPLAY_FLAG 0x8
+
+#define MAX_PANEL_ID_LEN 64
 /*---------------------------------------------------------------------------*/
 /* struct definition                                                         */
 /*---------------------------------------------------------------------------*/
@@ -60,6 +62,10 @@
 	struct backlight            *backlightinfo;
 };
 
+struct panel_list {
+	char name[MAX_PANEL_ID_LEN];
+	uint32_t id;
+};
 
 /*---------------------------------------------------------------------------*/
 /* API                                                                       */
@@ -79,4 +85,7 @@
 int oem_panel_on();
 int oem_panel_off();
 
+/* OEM support API */
+int32_t panel_name_to_id(struct panel_list supp_panels[],
+	uint32_t supp_panels_size, const char *panel_name);
 #endif /*_PLATFORM_DISPLAY_H_ */
diff --git a/include/target.h b/include/target.h
index df1bf3f..144b346 100644
--- a/include/target.h
+++ b/include/target.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files
@@ -52,6 +52,9 @@
 uint32_t target_boot_device_emmc();
 
 bool target_display_panel_node(char *pbuf, uint16_t buf_size);
+void target_display_init(const char *panel_name);
+void target_display_shutdown(void);
+
 uint32_t target_get_boot_device();
 
 const char * target_usb_controller();
diff --git a/target/apq8084/init.c b/target/apq8084/init.c
index 4a8c577..68865bb 100644
--- a/target/apq8084/init.c
+++ b/target/apq8084/init.c
@@ -330,13 +330,6 @@
 		dprintf(CRITICAL, "Error reading the partition table info\n");
 		ASSERT(0);
 	}
-
-	/* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
-	dprintf(INFO, "Display Init: Start\n");
-	display_init();
-	dprintf(INFO, "Display Init: Done\n");
-#endif
 }
 
 void target_load_ssd_keystore(void)
diff --git a/target/apq8084/oem_panel.c b/target/apq8084/oem_panel.c
index eeae271..b5f1b31 100644
--- a/target/apq8084/oem_panel.c
+++ b/target/apq8084/oem_panel.c
@@ -54,6 +54,16 @@
 UNKNOWN_PANEL
 };
 
+/*
+ * The list of panels that are supported on this target.
+ * Any panel in this list can be selected using fastboot oem command.
+ */
+static struct panel_list supp_panels[] = {
+	{"jdi_1080p_video", JDI_1080P_VIDEO_PANEL},
+	{"jdi_qhd_dualdsi_video", JDI_QHD_DUALDSI_VIDEO_PANEL},
+	{"jdi_qhd_dualdsi_cmd", JDI_QHD_DUALDSI_CMD_PANEL},
+};
+
 static uint32_t panel_id;
 
 int oem_panel_rotation()
@@ -153,13 +163,29 @@
 	return ret;
 }
 
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
 			struct msm_panel_info *pinfo,
 			struct mdss_dsi_phy_ctrl *phy_db)
 {
 	uint32_t hw_id = board_hardware_id();
-	uint32_t target_id = board_target_id();
-	bool ret = true;
+	int32_t panel_override_id;
+
+	if (panel_name) {
+		panel_override_id = panel_name_to_id(supp_panels,
+				ARRAY_SIZE(supp_panels), panel_name);
+
+		if (panel_override_id < 0) {
+			dprintf(CRITICAL, "Not able to search the panel:%s\n",
+					 panel_name + strspn(panel_name, " "));
+		} else if (panel_override_id < UNKNOWN_PANEL) {
+			/* panel override using fastboot oem command */
+			panel_id = panel_override_id;
+
+			dprintf(INFO, "OEM panel override:%s\n",
+					panel_name + strspn(panel_name, " "));
+			goto panel_init;
+		}
+	}
 
 	switch (hw_id) {
 	case HW_PLATFORM_MTP:
@@ -176,5 +202,6 @@
 		return false;
 	}
 
+panel_init:
 	return init_panel_data(panelstruct, pinfo, phy_db);
 }
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
old mode 100644
new mode 100755
index 3321073..ec9fd79
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -241,16 +241,16 @@
 	return NO_ERROR;
 }
 
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
 	uint32_t ret = 0;
-	ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+	ret = gcdb_display_init(panel_name, MDP_REV_50, MIPI_FB_ADDR);
 	if (ret) {
 		msm_display_off();
 	}
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/init.c b/target/init.c
index c5a202c..72b2b40 100644
--- a/target/init.c
+++ b/target/init.c
@@ -146,6 +146,14 @@
 	return false;
 }
 
+__WEAK void target_display_init(const char *panel_name)
+{
+}
+
+__WEAK void target_display_shutdown(void)
+{
+}
+
 __WEAK uint32_t target_boot_device_emmc()
 {
 	return 1;
diff --git a/target/msm7627a/init.c b/target/msm7627a/init.c
index 502cb54..41c9611 100644
--- a/target/msm7627a/init.c
+++ b/target/msm7627a/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -186,12 +186,6 @@
 	keypad_init();
 #endif
 
-	/* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
-	display_init();
-	dprintf(SPEW, "Diplay initialized\n");
-#endif
-
 	if (target_is_emmc_boot()) {
 		/* Must wait for modem-up before we can intialize MMC.
 		 */
diff --git a/target/msm7627a/target_display.c b/target/msm7627a/target_display.c
old mode 100644
new mode 100755
index 0c4d073..94270b5
--- a/target/msm7627a/target_display.c
+++ b/target/msm7627a/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -69,7 +69,7 @@
 	}
 	return ret;
 }
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
 	unsigned mach_type;
 	mach_type = board_machtype();
@@ -155,7 +155,7 @@
 	display_enabled = 1;
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	dprintf(SPEW, "display_shutdown()\n");
 	if (display_enabled)
diff --git a/target/msm8226/init.c b/target/msm8226/init.c
index aab5d8e..8be3b2f 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -255,13 +255,6 @@
 	/* turn on vibrator to indicate that phone is booting up to end user */
 	vib_timed_turn_on(VIBRATE_TIME);
 
-	/* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
-	dprintf(SPEW, "Display Init: Start\n");
-	display_init();
-	dprintf(SPEW, "Display Init: Done\n");
-#endif
-
 	if (target_use_signed_kernel())
 		target_crypto_init_params();
 }
diff --git a/target/msm8226/oem_panel.c b/target/msm8226/oem_panel.c
index f23aded..258f77c 100755
--- a/target/msm8226/oem_panel.c
+++ b/target/msm8226/oem_panel.c
@@ -52,6 +52,7 @@
 #define DISPLAY_MAX_PANEL_DETECTION 2
 
 #define SSD2080M_720P_VIDEO_PANEL_ON_DELAY 200
+#define MAX_PANEL_ID_LEN 64
 
 /*---------------------------------------------------------------------------*/
 /* static panel selection variable                                           */
@@ -78,6 +79,21 @@
 	HW_PLATFORM_SUBTYPE_SKUG = 5,
 };
 
+/*
+ * The list of panels that are supported on this target.
+ * Any panel in this list can be selected using fastboot oem command.
+ */
+static struct panel_list supp_panels[] = {
+	{"toshiba_720p_video", TOSHIBA_720P_VIDEO_PANEL},
+	{"nt35590_720p_cmd", NT35590_720P_CMD_PANEL},
+	{"nt35590_720p_video", NT35590_720P_VIDEO_PANEL},
+	{"nt35596_1080p_video", NT35596_1080P_VIDEO_PANEL},
+	{"hx8394a_720p_video", HX8394A_720P_VIDEO_PANEL},
+	{"nt35521_720p_video", NT35521_720P_VIDEO_PANEL},
+	{"ssd2080m_720p_video", SSD2080M_720P_VIDEO_PANEL},
+	{"jdi_1080p_video", JDI_1080P_VIDEO_PANEL},
+};
+
 static uint32_t panel_id;
 
 int oem_panel_rotation()
@@ -306,7 +322,7 @@
 
 static uint32_t auto_pan_loop = 0;
 
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
 			struct msm_panel_info *pinfo,
 			struct mdss_dsi_phy_ctrl *phy_db)
 {
@@ -315,10 +331,24 @@
 	uint32_t nt35590_panel_id = NT35590_720P_VIDEO_PANEL;
 	uint32_t hw_subtype = board_hardware_subtype();
 	bool ret = true;
+	int32_t panel_override_id;
 
-#if DISPLAY_TYPE_CMD_MODE
-	nt35590_panel_id = NT35590_720P_CMD_PANEL;
-#endif
+	if (panel_name) {
+		panel_override_id = panel_name_to_id(supp_panels,
+				ARRAY_SIZE(supp_panels), panel_name);
+
+		if (panel_override_id < 0) {
+			dprintf(CRITICAL, "Not able to search the panel:%s\n",
+					 panel_name + strspn(panel_name, " "));
+		} else if (panel_override_id < UNKNOWN_PANEL) {
+			/* panel override using fastboot oem command */
+			panel_id = panel_override_id;
+
+			dprintf(INFO, "OEM panel override:%s\n",
+					panel_name + strspn(panel_name, " "));
+			goto panel_init;
+		}
+	}
 
 	switch (hw_id) {
 	case HW_PLATFORM_QRD:
@@ -367,6 +397,7 @@
 		return false;
 	}
 
+panel_init:
 	init_panel_data(panelstruct, pinfo, phy_db);
 
 	return ret;
diff --git a/target/msm8226/rules.mk b/target/msm8226/rules.mk
index 3f9d1a3..d31f2bc 100755
--- a/target/msm8226/rules.mk
+++ b/target/msm8226/rules.mk
@@ -18,7 +18,6 @@
 DEFINES += DISPLAY_SPLASH_SCREEN=1
 DEFINES += DISPLAY_TYPE_MIPI=1
 DEFINES += DISPLAY_TYPE_DSI6G=1
-DEFINES += DISPLAY_TYPE_CMD_MODE=0
 
 MODULES += \
 	dev/keys \
diff --git a/target/msm8226/target_display.c b/target/msm8226/target_display.c
index c89c1ac..2e608c8 100755
--- a/target/msm8226/target_display.c
+++ b/target/msm8226/target_display.c
@@ -341,13 +341,13 @@
 	return ret;
 }
 
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
         uint32_t panel_loop = 0;
         uint32_t ret = 0;
 
 	do {
-		ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+		ret = gcdb_display_init(panel_name, MDP_REV_50, MIPI_FB_ADDR);
 		if (!ret || ret == ERR_NOT_SUPPORTED) {
 			break;
 		} else {
@@ -359,7 +359,7 @@
 
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/msm8610/init.c b/target/msm8610/init.c
index 78412fb..25b6c00 100644
--- a/target/msm8610/init.c
+++ b/target/msm8610/init.c
@@ -174,11 +174,6 @@
 
 	target_sdc_init();
 
-	/* Display splash screen if enabled */
-	dprintf(SPEW, "Display Init: Start\n");
-	display_init();
-	dprintf(SPEW, "Display Init: Done\n");
-
 	if (target_use_signed_kernel())
 		target_crypto_init_params();
 }
diff --git a/target/msm8610/oem_panel.c b/target/msm8610/oem_panel.c
index d6f0537..48dec44 100644
--- a/target/msm8610/oem_panel.c
+++ b/target/msm8610/oem_panel.c
@@ -239,7 +239,7 @@
 			DISPLAY_MAX_PANEL_DETECTION : 0;
 }
 
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
 			struct msm_panel_info *pinfo,
 			struct mdss_dsi_phy_ctrl *phy_db)
 {
diff --git a/target/msm8610/target_display.c b/target/msm8610/target_display.c
old mode 100644
new mode 100755
index 8a74e42..caff3d3
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -162,12 +162,12 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
 	uint32_t panel_loop = 0;
 	uint32_t ret = 0;
 	do {
-		ret = gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
+		ret = gcdb_display_init(panel_name, MDP_REV_304, MIPI_FB_ADDR);
 		if (ret) {
 			/*Panel signature did not match, turn off the display*/
 			target_force_cont_splash_disable(true);
@@ -180,7 +180,7 @@
 
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/msm8960/init.c b/target/msm8960/init.c
index 72d9463..dcee3b4 100755
--- a/target/msm8960/init.c
+++ b/target/msm8960/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -142,12 +142,6 @@
 		dprintf(CRITICAL,"Keyboard is not supported for platform: %d\n",platform_id);
 	};
 
-	/* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
-	display_init();
-	dprintf(SPEW, "Diplay initialized\n");
-#endif
-
 	if ((platform_id == MSM8960) || (platform_id == MSM8960AB) ||
 		(platform_id == APQ8060AB) || (platform_id == MSM8260AB) ||
 		(platform_id == MSM8660AB) || (platform_id == MSM8660A) ||
diff --git a/target/msm8960/target_display.c b/target/msm8960/target_display.c
old mode 100644
new mode 100755
index 39a3aeb..2eec1ea
--- a/target/msm8960/target_display.c
+++ b/target/msm8960/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -255,7 +255,7 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
 	int target_id = board_target_id();
 
@@ -345,7 +345,7 @@
 	display_enable = 1;
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	if (display_enable) {
 		msm_display_off();
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index d60d477..3dea314 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -325,12 +325,6 @@
 
 	if (target_use_signed_kernel())
 		target_crypto_init_params();
-	/* Display splash screen if enabled */
-#if DISPLAY_SPLASH_SCREEN
-	dprintf(INFO, "Display Init: Start\n");
-	display_init();
-	dprintf(INFO, "Display Init: Done\n");
-#endif
 
 	/*
 	 * Set drive strength & pull ctrl for
diff --git a/target/msm8974/oem_panel.c b/target/msm8974/oem_panel.c
index 0bda609..1634cd4 100755
--- a/target/msm8974/oem_panel.c
+++ b/target/msm8974/oem_panel.c
@@ -232,7 +232,7 @@
 
 static uint32_t auto_pan_loop = 0;
 
-bool oem_panel_select(struct panel_struct *panelstruct,
+bool oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
 			struct msm_panel_info *pinfo,
 			struct mdss_dsi_phy_ctrl *phy_db)
 {
diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c
old mode 100644
new mode 100755
index c32cef0..270a300
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -330,7 +330,7 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(const char *panel_name)
 {
 	uint32_t hw_id = board_hardware_id();
 	uint32_t panel_loop = 0;
@@ -353,7 +353,8 @@
 		break;
 	default:
 		do {
-			ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
+			ret = gcdb_display_init(panel_name, MDP_REV_50,
+				MIPI_FB_ADDR);
 			if (!ret || ret == ERR_NOT_SUPPORTED) {
 				break;
 			} else {
@@ -366,7 +367,7 @@
 	}
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	uint32_t hw_id = board_hardware_id();
 	switch (hw_id) {