Enable panel detection in LK

The panel detection is based on the signature read for the new FP2 display
modules (0x210000).  If the signature does not match lk will probe for the old
display module. The signature set for this module (0xffff) is magic and matches
all read signatures.

FPIIM-904

Change-Id: I8fde68d4018d7b37f22c47b4cc02c4faaa4cc2bd
diff --git a/dev/gcdb/display/include/panel_otm1902b_1080p_cmd.h b/dev/gcdb/display/include/panel_otm1902b_1080p_cmd.h
index 6d19e2f..9f33b29 100644
--- a/dev/gcdb/display/include/panel_otm1902b_1080p_cmd.h
+++ b/dev/gcdb/display/include/panel_otm1902b_1080p_cmd.h
@@ -204,6 +204,6 @@
   1, 0, 255, 100, 2, "PMIC_8941"
 };
 
-
+#define OTM1902B_1080P_VIDEO_SIGNATURE 0xFFFF
 
 #endif /*_PANEL_OTM1902B_1080P_CMD_H_*/
diff --git a/dev/gcdb/display/include/panel_s6d6fa1_1080p_video.h b/dev/gcdb/display/include/panel_s6d6fa1_1080p_video.h
index 2c3f88d..145d550 100644
--- a/dev/gcdb/display/include/panel_s6d6fa1_1080p_video.h
+++ b/dev/gcdb/display/include/panel_s6d6fa1_1080p_video.h
@@ -431,6 +431,6 @@
 };
 
 
-#define S6D6FA1_1080P_VIDEO_SIGNATURE 0xFFFF
+#define S6D6FA1_1080P_VIDEO_SIGNATURE 0x210000
 
 #endif /*_PANEL_S6D6FA1_1080P_VIDEO_H_*/
diff --git a/platform/msm_shared/mipi_dsi.c b/platform/msm_shared/mipi_dsi.c
index 8ee9ecb..c57dd76 100644
--- a/platform/msm_shared/mipi_dsi.c
+++ b/platform/msm_shared/mipi_dsi.c
@@ -114,11 +114,11 @@
 	return NULL;
 }
 
-static uint32_t response_value = 0;
 
 uint32_t mdss_dsi_read_panel_signature(uint32_t panel_signature)
 {
 	uint32_t rec_buf[1];
+	uint32_t response_value = 0;
 	uint32_t *lp = rec_buf, data;
 	int ret = response_value;
 
@@ -137,7 +137,6 @@
 	response_value = data;
 	if (response_value != panel_signature)
 		ret = response_value;
-
 exit_read_signature:
 	/* Keep the non detectable panel at the end and set panel signature 0xFFFF */
 	if (panel_signature == 0xFFFF)
@@ -503,9 +502,9 @@
 		} else {
 			status = mipi_dsi_cmds_tx(pinfo->panel_cmds,
 					pinfo->num_of_panel_cmds);
-		//	if (!status && target_panel_auto_detect_enabled())
-		//		status =
-		//			mdss_dsi_read_panel_signature(pinfo->signature);
+			if (!status && target_panel_auto_detect_enabled())
+				status =
+					mdss_dsi_read_panel_signature(pinfo->signature);
 		}
 	}
 #endif
diff --git a/target/FP2/oem_panel.c b/target/FP2/oem_panel.c
index 1a62c08..23766d8 100755
--- a/target/FP2/oem_panel.c
+++ b/target/FP2/oem_panel.c
@@ -252,6 +252,7 @@
 			= OTM1902B_1080P_CMD_ON_COMMAND;
 		memcpy(phy_db->timing,
 			otm1902b_1080p_cmd_timings, TIMING_SIZE);
+		pinfo->mipi.signature =  OTM1902B_1080P_VIDEO_SIGNATURE;
 		break;
 	case S6D6FA1_1080P_VIDEO_PANEL:
 		panelstruct->paneldata    = &s6d6fa1_1080p_video_panel_data;