target: msm8952: skip QPNP WLED and LABIBB for HX8394F 720p panel

HX8394F 720p panel doesn't need QPNP WLED and LABIBB. Add support to
skip the configuration for this.

Change-Id: Ibbb392a037244e048d225babe0089a01b95b5a09
diff --git a/dev/gcdb/display/gcdb_display.c b/dev/gcdb/display/gcdb_display.c
index 9cde84a..244ba82 100644
--- a/dev/gcdb/display/gcdb_display.c
+++ b/dev/gcdb/display/gcdb_display.c
@@ -569,6 +569,7 @@
 	int pan_type;
 
 	dsi_video_mode_phy_db.pll_type = DSI_PLL_TYPE_28NM;
+	panel.panel_info.disable_wled_labibb = false;
 	pan_type = oem_panel_select(panel_name, &panelstruct, &(panel.panel_info),
 				 &dsi_video_mode_phy_db);
 
diff --git a/platform/msm_shared/include/msm_panel.h b/platform/msm_shared/include/msm_panel.h
index 6ca84ac..56827f5 100644
--- a/platform/msm_shared/include/msm_panel.h
+++ b/platform/msm_shared/include/msm_panel.h
@@ -430,6 +430,7 @@
 	struct spi_panel_info spi;
 	struct dsi2HDMI_panel_info adv7533;
 	bool has_bridge_chip;
+	bool disable_wled_labibb;
 
 	struct dfps_info dfps;
 
diff --git a/target/msm8952/oem_panel.c b/target/msm8952/oem_panel.c
old mode 100755
new mode 100644
index e59f3af..19369f8
--- a/target/msm8952/oem_panel.c
+++ b/target/msm8952/oem_panel.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, 2018 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
@@ -573,6 +573,7 @@
 		memcpy(phy_db->timing,
 						hx8394f_720p_video_timings, TIMING_SIZE);
 		pinfo->mipi.signature = HX8394F_720P_VIDEO_SIGNATURE;
+		pinfo->disable_wled_labibb = true;
 		break;
 	case BYD_1200P_VIDEO_PANEL:
 		panelstruct->paneldata    = &byd_1200p_video_panel_data;
diff --git a/target/msm8952/target_display.c b/target/msm8952/target_display.c
index 68baa70..68f15f9 100644
--- a/target/msm8952/target_display.c
+++ b/target/msm8952/target_display.c
@@ -582,20 +582,22 @@
 	if (enable) {
 		regulator_enable(ldo_num);
 		mdelay(10);
-		rc = wled_init(pinfo);
-		if (rc) {
-			dprintf(CRITICAL, "%s: wled init failed\n", __func__);
-			return rc;
+		if(!pinfo->disable_wled_labibb) {
+			rc = wled_init(pinfo);
+			if (rc) {
+				dprintf(CRITICAL, "%s: wled init failed\n", __func__);
+				return rc;
+			}
+			if (target_get_pmic() == PMIC_IS_PMI632)
+				rc = qpnp_lcdb_enable(true);
+			else
+				rc = qpnp_ibb_enable(true); /*5V boost*/
+			if (rc) {
+				dprintf(CRITICAL, "%s: qpnp_ibb/lcdb failed\n", __func__);
+				return rc;
+			}
+			mdelay(50);
 		}
-		if (target_get_pmic() == PMIC_IS_PMI632)
-			rc = qpnp_lcdb_enable(true);
-		else
-			rc = qpnp_ibb_enable(true); /*5V boost*/
-		if (rc) {
-			dprintf(CRITICAL, "%s: qpnp_ibb/lcdb failed\n", __func__);
-			return rc;
-		}
-		mdelay(50);
 	} else {
 		/*
 		 * LDO1, LDO2 and LDO6 are shared with other subsystems.