target: add support for disabling continuous-splash

This support would be helpful in enabling/disabling continuous
splash screen through fastboot oem command. It can be used
in the following way.
    * fastboot oem select-display-panel <panel_name>:<0/1>
      0 - disable continuous splash, 1 - enable continuous splash
    * fastboot oem select-display-panel <panel_name>
      This will continue to select the panel with default continuous
      splash settings.

Change-Id: Ic1a1a41b7f675b6d1acf2f088e85cb9aad332c0d
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
index b077038..f48b8ae 100755
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, 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
@@ -506,7 +506,9 @@
 void target_display_init(const char *panel_name)
 {
 	uint32_t ret = 0;
+	char cont_splash = '\0';
 
+	set_panel_cmd_string(panel_name, &cont_splash);
 	panel_name += strspn(panel_name, " ");
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)
@@ -528,6 +530,11 @@
 		target_force_cont_splash_disable(true);
 		msm_display_off();
 	}
+
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8226/target_display.c b/target/msm8226/target_display.c
index ca4623c..765a9eb 100755
--- a/target/msm8226/target_display.c
+++ b/target/msm8226/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, 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
@@ -397,6 +397,9 @@
         uint32_t panel_loop = 0;
         uint32_t ret = 0;
 	uint32_t fb_addr = MIPI_FB_ADDR;
+	char cont_splash = '\0';
+
+	set_panel_cmd_string(panel_name, &cont_splash);
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)
 		|| !strcmp(panel_name, SIM_VIDEO_PANEL)
@@ -420,6 +423,10 @@
 		}
 	} while (++panel_loop <= oem_panel_max_auto_detect_panels());
 
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8610/target_display.c b/target/msm8610/target_display.c
index 573a585..f87b2ed 100755
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, 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
@@ -192,6 +192,9 @@
 {
 	uint32_t panel_loop = 0;
 	uint32_t ret = 0;
+	char cont_splash = '\0';
+
+	set_panel_cmd_string(panel_name, &cont_splash);
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)) {
 		dprintf(INFO, "Skip panel configuration\n");
@@ -210,6 +213,10 @@
 		}
 	} while (++panel_loop <= (uint32_t)oem_panel_max_auto_detect_panels());
 
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8909/target_display.c b/target/msm8909/target_display.c
index c7c8c2d..a642da7 100755
--- a/target/msm8909/target_display.c
+++ b/target/msm8909/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2015, 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
@@ -231,6 +231,9 @@
 {
 	uint32_t panel_loop = 0;
 	uint32_t ret = 0;
+	char cont_splash = '\0';
+
+	set_panel_cmd_string(panel_name, &cont_splash);
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)) {
 		dprintf(INFO, "Skip panel configuration\n");
@@ -247,6 +250,11 @@
 			msm_display_off();
 		}
 	} while (++panel_loop <= oem_panel_max_auto_detect_panels());
+
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8916/target_display.c b/target/msm8916/target_display.c
index a3e5bad..e0d02bb 100644
--- a/target/msm8916/target_display.c
+++ b/target/msm8916/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, 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
@@ -410,7 +410,9 @@
 {
 	uint32_t panel_loop = 0;
 	uint32_t ret = 0;
+	char cont_splash = '\0';
 
+	set_panel_cmd_string(panel_name, &cont_splash);
 	panel_name += strspn(panel_name, " ");
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)
@@ -431,6 +433,11 @@
 			msm_display_off();
 		}
 	} while (++panel_loop <= oem_panel_max_auto_detect_panels());
+
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c
index 289675c..4f17620 100755
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2015, 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
@@ -413,10 +413,12 @@
 	uint32_t hw_id = board_hardware_id();
 	uint32_t panel_loop = 0;
 	int ret = 0;
+	char cont_splash = '\0';
 
 	if (target_hw_interposer())
 		return;
 
+	set_panel_cmd_string(panel_name, &cont_splash);
 	panel_name += strspn(panel_name, " ");
 
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)
@@ -431,6 +433,7 @@
 		dprintf(INFO, "%s: HDMI is primary\n", __func__);
 		return;
 	}
+
 	switch (hw_id) {
 	case HW_PLATFORM_LIQUID:
 		edp_panel_init(&(panel.panel_info));
@@ -461,6 +464,11 @@
 		} while (++panel_loop <= (uint32_t)oem_panel_max_auto_detect_panels());
 		break;
 	}
+
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)
diff --git a/target/msm8994/target_display.c b/target/msm8994/target_display.c
index 1ac0895..4ed88dc 100644
--- a/target/msm8994/target_display.c
+++ b/target/msm8994/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2015, 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
@@ -425,8 +425,10 @@
 
 void target_display_init(const char *panel_name)
 {
-	panel_name += strspn(panel_name, " ");
+	char cont_splash = '\0';
 
+	set_panel_cmd_string(panel_name, &cont_splash);
+	panel_name += strspn(panel_name, " ");
 	if (!strcmp(panel_name, NO_PANEL_CONFIG)
 		|| !strcmp(panel_name, SIM_VIDEO_PANEL)
 		|| !strcmp(panel_name, SIM_DUALDSI_VIDEO_PANEL)
@@ -436,10 +438,16 @@
 			panel_name);
 		return;
 	}
+
 	if (gcdb_display_init(panel_name, MDP_REV_50, (void *)MIPI_FB_ADDR)) {
 		target_force_cont_splash_disable(true);
 		msm_display_off();
 	}
+
+	if (cont_splash == '0') {
+		dprintf(INFO, "Forcing continuous splash disable\n");
+		target_force_cont_splash_disable(true);
+	}
 }
 
 void target_display_shutdown(void)