diff options
author | Shalini Krishnamoorthi <shakri@codeaurora.org> | 2016-06-24 15:17:29 -0700 |
---|---|---|
committer | Shalini Krishnamoorthi <shakri@codeaurora.org> | 2016-06-28 16:34:42 -0700 |
commit | 4e23cccc559062d170643df9122517ea587c103c (patch) | |
tree | a6cc2a504cde80ac3656c0cad193d46fa4cebd0b | |
parent | 10c20c115b01b17f9eeb67e2634e8dceca0bb9ca (diff) |
target: msm8996: Make HDMI as primary by default for APQ8096
Set the default primary display panel to HDMI whenever the
platform is APQ8096-mediabox.
CRs-Fixed: 1018618
Change-Id: Ia9faee45f6a89cc505409baba59a79c75bbd3600
-rw-r--r-- | dev/gcdb/display/gcdb_display_param.c | 10 | ||||
-rw-r--r-- | include/platform.h | 3 | ||||
-rw-r--r-- | platform/msm8996/platform.c | 9 | ||||
-rw-r--r-- | target/msm8996/target_display.c | 9 |
4 files changed, 19 insertions, 12 deletions
diff --git a/dev/gcdb/display/gcdb_display_param.c b/dev/gcdb/display/gcdb_display_param.c index 44b34542..139708c6 100644 --- a/dev/gcdb/display/gcdb_display_param.c +++ b/dev/gcdb/display/gcdb_display_param.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, 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 @@ -290,7 +290,7 @@ bool gcdb_display_cmdline_arg(char *pbuf, uint16_t buf_size) uint32_t arg_size = 0; bool ret = true, rc; int ret_val; - char *default_str; + const char *default_str; struct panel_struct panelstruct; int panel_mode = SPLIT_DISPLAY_FLAG | DUAL_PIPE_FLAG | DST_SPLIT_FLAG; int prefix_string_len = strlen(DISPLAY_CMDLINE_PREFIX); @@ -318,11 +318,7 @@ bool gcdb_display_cmdline_arg(char *pbuf, uint16_t buf_size) panel_node = NO_PANEL_CONFIG; panel_mode = 0; } else { - if (target_is_edp()) - default_str = "0:edp:"; - else - default_str = "0:dsi:0:"; - + default_str = "0"; arg_size = prefix_string_len + strlen(default_str); if (buf_size < arg_size) { dprintf(CRITICAL, "display command line buffer is small\n"); diff --git a/include/platform.h b/include/platform.h index f46df001..42b05ec3 100644 --- a/include/platform.h +++ b/include/platform.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2008 Travis Geiselbrecht * - * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files @@ -72,6 +72,7 @@ int boot_device_mask(int); uint32_t platform_detect_panel(); uint32_t platform_get_max_periph(); int platform_is_msm8996(); +int platform_is_apq8096_mediabox(); bool platform_use_qmp_misc_settings(); void set_device_unlock_value(int type, bool status); void get_product_name(unsigned char *buf); diff --git a/platform/msm8996/platform.c b/platform/msm8996/platform.c index 5883dcae..e7e2ee11 100644 --- a/platform/msm8996/platform.c +++ b/platform/msm8996/platform.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2016, 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 are @@ -193,6 +193,13 @@ int platform_is_msm8996() return 0; } +int platform_is_apq8096_mediabox() +{ + return ((board_platform_id() == APQ8096) && + (board_hardware_id() == HW_PLATFORM_DRAGON) && + (board_hardware_subtype() == HW_PLATFORM_SUBTYPE_SVLTE1)); +} + uint64_t platform_get_ddr_start() { return ddr_start; diff --git a/target/msm8996/target_display.c b/target/msm8996/target_display.c index 5930c840..69722b84 100644 --- a/target/msm8996/target_display.c +++ b/target/msm8996/target_display.c @@ -727,7 +727,8 @@ bool target_display_panel_node(char *pbuf, uint16_t buf_size) char vic_buf[HDMI_VIC_LEN] = "0"; if ((!strcmp(oem.panel, HDMI_PANEL_NAME)) || \ - ((!strlen(oem.panel)) && (board_hardware_id() == HW_PLATFORM_SBC))) { + ((!strlen(oem.panel)) && ((board_hardware_id() == HW_PLATFORM_SBC) || + (platform_is_apq8096_mediabox())))) { if (buf_size < (prefix_string_len + LK_OVERRIDE_PANEL_LEN + strlen(HDMI_CONTROLLER_STRING))) { dprintf(CRITICAL, "command line argument is greater than buffer size\n"); @@ -779,7 +780,8 @@ void target_display_init(const char *panel_name) oem.panel); return; } else if ((!strcmp(oem.panel, HDMI_PANEL_NAME)) || \ - ((!strlen(oem.panel)) && (board_hardware_id() == HW_PLATFORM_SBC))) { + ((!strlen(oem.panel)) && ((board_hardware_id() == HW_PLATFORM_SBC) || + (platform_is_apq8096_mediabox())))) { dprintf(INFO, "%s: HDMI is primary\n", __func__); mdss_hdmi_display_init(MDP_REV_50, (void *) HDMI_FB_ADDR); return; @@ -800,7 +802,8 @@ void target_display_shutdown(void) { struct oem_panel_data oem = mdss_dsi_get_oem_data(); if ((!strcmp(oem.panel, HDMI_PANEL_NAME)) || \ - ((!strlen(oem.panel)) && (board_hardware_id() == HW_PLATFORM_SBC))) { + ((!strlen(oem.panel)) && ((board_hardware_id() == HW_PLATFORM_SBC) || + (platform_is_apq8096_mediabox())))) { msm_display_off(); } else { gcdb_display_shutdown(); |