platform: msm_shared: hdmi: read edid before panel initialization

Enable ahb/core clocks first, then read edid of the TV to parse the
resolutions as it needs hardware register access. Add pll clock rates
to support different resolutions read from EDID. Initialize panel
info with the resolution data read from edid.

Change-Id: Id5a20083f05720c31dc11c21983d331a071437ca
diff --git a/target/msm8994/target_display.c b/target/msm8994/target_display.c
index 6cf3653..851fc9a 100644
--- a/target/msm8994/target_display.c
+++ b/target/msm8994/target_display.c
@@ -33,6 +33,7 @@
 #include <err.h>
 #include <msm_panel.h>
 #include <mipi_dsi.h>
+#include <mdss_hdmi.h>
 #include <pm8x41.h>
 #include <pm8x41_wled.h>
 #include <qpnp_wled.h>
@@ -254,6 +255,22 @@
 	return ret;
 }
 
+int target_hdmi_pll_clock(uint8_t enable, struct msm_panel_info *pinfo)
+{
+	if (enable) {
+		hdmi_phy_reset();
+		hdmi_pll_config(pinfo->clk_rate);
+		hdmi_vco_enable();
+		hdmi_pixel_clk_enable(pinfo->clk_rate);
+	} else if(!target_cont_splash_screen()) {
+		/* Disable clocks if continuous splash off */
+		hdmi_pixel_clk_disable();
+		hdmi_vco_disable();
+	}
+
+	return NO_ERROR;
+}
+
 int target_panel_clock(uint8_t enable, struct msm_panel_info *pinfo)
 {
 	uint32_t ret = NO_ERROR;