Merge "target: msm8953: skip splash screen and set default panel to HDMI for apq8053"
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index 57e29a8..e8af142 100644
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -492,6 +492,7 @@
HW_PLATFORM_SUBTYPE_8974PRO_PM8084 = 1,
HW_PLATFORM_SUBTYPE_CSFB = 1,
HW_PLATFORM_SUBTYPE_SVLTE1 = 2,
+ HW_PLATFORM_SUBTYPE_IOT = 2,
HW_PLATFORM_SUBTYPE_SVLTE2A = 3,
HW_PLATFORM_SUBTYPE_SGLTE = 6,
HW_PLATFORM_SUBTYPE_DSDA = 7,
diff --git a/target/msm8953/target_display.c b/target/msm8953/target_display.c
index fcd4b0a..d0cbfd9 100644
--- a/target/msm8953/target_display.c
+++ b/target/msm8953/target_display.c
@@ -53,6 +53,13 @@
#include "include/display_resource.h"
#include "gcdb_display.h"
+#define TRULY_1080P_VID_PANEL "truly_1080p_video"
+#define TRULY_1080P_CMD_PANEL "truly_1080p_cmd"
+
+#define HDMI_ADV_PANEL_STRING "1:dsi:0:none:1:qcom,mdss_dsi_adv7533_1080p:cfg:single_dsi"
+#define TRULY_VID_PANEL_STRING "1:dsi:0:qcom,mdss_dsi_truly_1080p_video:1:none:cfg:single_dsi"
+#define TRULY_CMD_PANEL_STRING "1:dsi:0:qcom,mdss_dsi_truly_1080p_cmd:1:none:cfg:single_dsi"
+
#define MAX_POLL_READS 15
#define POLL_TIMEOUT_US 1000
#define STRENGTH_SIZE_IN_BYTES 10
@@ -376,7 +383,54 @@
bool target_display_panel_node(char *pbuf, uint16_t buf_size)
{
- return gcdb_display_cmdline_arg(pbuf, buf_size);
+ int prefix_string_len = strlen(DISPLAY_CMDLINE_PREFIX);
+ bool ret = true;
+ struct oem_panel_data oem = mdss_dsi_get_oem_data();
+ uint32_t platform_subtype = board_hardware_subtype();
+
+ /* default to hdmi for apq iot */
+ if ((platform_subtype == HW_PLATFORM_SUBTYPE_IOT)) {
+ if (!strcmp(oem.panel, "")) {
+ if (buf_size < (prefix_string_len +
+ strlen(HDMI_ADV_PANEL_STRING))) {
+ dprintf(CRITICAL, "HDMI command line argument \
+ is greater than buffer size\n");
+ return false;
+ }
+ strlcpy(pbuf, DISPLAY_CMDLINE_PREFIX, buf_size);
+ buf_size -= prefix_string_len;
+ pbuf += prefix_string_len;
+ strlcpy(pbuf, HDMI_ADV_PANEL_STRING, buf_size);
+ } else if (!strcmp(oem.panel, TRULY_1080P_VID_PANEL)) {
+ if (buf_size < (prefix_string_len +
+ strlen(TRULY_VID_PANEL_STRING))) {
+ dprintf(CRITICAL, "TRULY VIDEO command line \
+ argument is greater than \
+ buffer size\n");
+ return false;
+ }
+ strlcpy(pbuf, DISPLAY_CMDLINE_PREFIX, buf_size);
+ buf_size -= prefix_string_len;
+ pbuf += prefix_string_len;
+ strlcpy(pbuf, TRULY_VID_PANEL_STRING, buf_size);
+ } else if (!strcmp(oem.panel, TRULY_1080P_CMD_PANEL)) {
+ if (buf_size < (prefix_string_len +
+ strlen(TRULY_CMD_PANEL_STRING))) {
+ dprintf(CRITICAL, "TRULY CMD command line argument \
+ argument is greater than \
+ buffer size\n");
+ return false;
+ }
+ strlcpy(pbuf, DISPLAY_CMDLINE_PREFIX, buf_size);
+ buf_size -= prefix_string_len;
+ pbuf += prefix_string_len;
+ strlcpy(pbuf, TRULY_CMD_PANEL_STRING, buf_size);
+ }
+ } else {
+ ret = gcdb_display_cmdline_arg(pbuf, buf_size);
+ }
+
+ return ret;
}
void target_display_init(const char *panel_name)
@@ -384,6 +438,7 @@
struct oem_panel_data oem;
int32_t ret = 0;
uint32_t panel_loop = 0;
+ uint32_t platform_subtype = board_hardware_subtype();
set_panel_cmd_string(panel_name);
oem = mdss_dsi_get_oem_data();
@@ -399,6 +454,12 @@
oem.cont_splash = false;
}
+ if ((platform_subtype == HW_PLATFORM_SUBTYPE_IOT)) {
+ dprintf(INFO, "%s: Platform subtype %d\n",
+ __func__, platform_subtype);
+ return;
+ }
+
do {
target_force_cont_splash_disable(false);
ret = gcdb_display_init(oem.panel, MDP_REV_50, (void *)MIPI_FB_ADDR);