summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-06-02 00:04:32 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-06-02 00:04:32 -0700
commit11047229b6625ef5681d5521d3a6251620eef278 (patch)
treecc8e367e96a95a5396c55fab640ca5c5dd1ece8f
parent7193976f069edd9534820340e35dfb14cb1e1fb6 (diff)
parenta2aa6c1f69c5a7d2ec3694b9d8c543452b9077e0 (diff)
Merge "target: msm8996: support dsc panel selection through fastboot"
-rw-r--r--target/msm8996/target_display.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/target/msm8996/target_display.c b/target/msm8996/target_display.c
index 283720c8..d5552230 100644
--- a/target/msm8996/target_display.c
+++ b/target/msm8996/target_display.c
@@ -68,6 +68,10 @@
#define REGULATOR_SIZE_IN_BYTES_8996 5
#define LANE_SIZE_IN_BYTES_8996 20
+#define DSC_CMD_PANEL "dsc_cmd_panel"
+#define DSC_VID_PANEL "dsc_vid_panel"
+#define DSC_CMD_PANEL_STRING "1:dsi:0:none:1:qcom,mdss_dsi_nt35597_dsc_wqxga_cmd"
+#define DSC_VID_PANEL_STRING "1:dsi:0:none:1:qcom,mdss_dsi_nt35597_dsc_wqxga_video"
/*---------------------------------------------------------------------------*/
/* GPIO configuration */
/*---------------------------------------------------------------------------*/
@@ -459,7 +463,6 @@ int target_dsi_phy_config(struct mdss_dsi_phy_ctrl *phy_db)
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);
@@ -479,6 +482,26 @@ bool target_display_panel_node(char *panel_name, char *pbuf, uint16_t buf_size)
strlcat(pbuf, LK_OVERRIDE_PANEL, buf_size);
buf_size -= LK_OVERRIDE_PANEL_LEN;
strlcat(pbuf, HDMI_CONTROLLER_STRING, buf_size);
+ } else if (!strcmp(panel_name, DSC_CMD_PANEL)) {
+ if (buf_size < (prefix_string_len +
+ strlen(DSC_CMD_PANEL_STRING))) {
+ dprintf(CRITICAL, "DSC 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, DSC_CMD_PANEL_STRING, buf_size);
+ } else if (!strcmp(panel_name, DSC_VID_PANEL)) {
+ if (buf_size < (prefix_string_len +
+ strlen(DSC_VID_PANEL_STRING))) {
+ dprintf(CRITICAL, "DSC 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, DSC_VID_PANEL_STRING, buf_size);
} else {
ret = gcdb_display_cmdline_arg(panel_name, pbuf, buf_size);
}
@@ -496,7 +519,9 @@ void target_display_init(const char *panel_name)
|| !strcmp(panel_name, SIM_VIDEO_PANEL)
|| !strcmp(panel_name, SIM_DUALDSI_VIDEO_PANEL)
|| !strcmp(panel_name, SIM_CMD_PANEL)
- || !strcmp(panel_name, SIM_DUALDSI_CMD_PANEL)) {
+ || !strcmp(panel_name, SIM_DUALDSI_CMD_PANEL)
+ || !strcmp(panel_name, DSC_CMD_PANEL)
+ || !strcmp(panel_name, DSC_VID_PANEL)) {
dprintf(INFO, "Selected panel: %s\nSkip panel configuration\n",
panel_name);
return;