target: support HDMI as primary display interface

Support HDMI as primary interface on APQ8084/MSM8974 for
debugging, testing and other purposes. Do not initialize
other interfaces when HDMI is selected as primary interface.

Use below commands to make hdmi as primary, the settings are
persistent across power cycles:

* Reboot the device into fastboot mode
* fastboot oem select-display-panel hdmi
* fastboot reboot-bootloader
* Reboot device

Change-Id: Iefe53528c3a2be82b6e43184549e4530b9c2570a
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
index 840df56..d341d62 100755
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -277,9 +277,43 @@
 	return NO_ERROR;
 }
 
+bool target_display_panel_node(char *panel_name, char *pbuf, uint16_t buf_size)
+{
+	int prefix_string_len = strlen(DISPLAY_CMDLINE_PREFIX);
+	bool ret = true;
+
+	panel_name += strspn(panel_name, " ");
+
+	if (!strcmp(panel_name, HDMI_PANEL_NAME)) {
+		if (buf_size < (prefix_string_len + LK_OVERRIDE_PANEL_LEN +
+				HDMI_CONTROLLER_STRING)) {
+			dprintf(CRITICAL, "command line argument is greater than buffer size\n");
+			return false;
+		}
+
+		strlcpy(pbuf, DISPLAY_CMDLINE_PREFIX, buf_size);
+		buf_size -= prefix_string_len;
+		strlcat(pbuf, LK_OVERRIDE_PANEL, buf_size);
+		buf_size -= LK_OVERRIDE_PANEL_LEN;
+		strlcat(pbuf, HDMI_CONTROLLER_STRING, buf_size);
+	} else {
+		ret = gcdb_display_cmdline_arg(pbuf, buf_size);
+	}
+
+	return ret;
+}
+
 void target_display_init(const char *panel_name)
 {
 	uint32_t ret = 0;
+
+	panel_name += strspn(panel_name, " ");
+
+	if (!strcmp(panel_name, HDMI_PANEL_NAME)) {
+		dprintf(INFO, "%s: HDMI is primary\n", __func__);
+		return;
+	}
+
 	ret = gcdb_display_init(panel_name, MDP_REV_50, MIPI_FB_ADDR);
 	if (ret) {
 		msm_display_off();