target: msm8610: Add support for panel autodetection for 8610

Adding support for autodetecting panels for 8610 platform.
This provides the function for panel to be replaced without
any code change. This patch does not enable the panel
autodetection.

CRs-Fixed: 586749
Change-Id: I32317cf159f00ff303aa899a2f4d33d8dbee4d90
diff --git a/target/msm8610/target_display.c b/target/msm8610/target_display.c
index fde805a..8a74e42 100644
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -164,7 +164,20 @@
 
 void display_init(void)
 {
-	gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
+	uint32_t panel_loop = 0;
+	uint32_t ret = 0;
+	do {
+		ret = gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
+		if (ret) {
+			/*Panel signature did not match, turn off the display*/
+			target_force_cont_splash_disable(true);
+			msm_display_off();
+			target_force_cont_splash_disable(false);
+		} else {
+			break;
+		}
+	} while (++panel_loop <= oem_panel_max_auto_detect_panels());
+
 }
 
 void display_shutdown(void)