Merge "dev: gcdb: display: update the FB address used for splash screen" into lk.lnx.1.0-dev.1.0
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index cbe9dff..e12754b 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -1178,20 +1178,6 @@
aboot_save_boot_hash_mmc((uint32_t) image_addr, imagesize_actual);
#endif /* TZ_SAVE_KERNEL_HASH */
-#if VERIFIED_BOOT
- if(boot_verify_get_state() == ORANGE)
- {
-#if FBCON_DISPLAY_MSG
- display_bootverify_menu(DISPLAY_MENU_ORANGE);
- wait_for_users_action();
-#else
- dprintf(CRITICAL,
- "Your device has been unlocked and can't be trusted.\nWait for 5 seconds before proceeding\n");
- mdelay(5000);
-#endif
- }
-#endif
-
#ifdef MDTP_SUPPORT
{
/* Verify MDTP lock.
@@ -1211,6 +1197,20 @@
}
#if VERIFIED_BOOT
+ if(boot_verify_get_state() == ORANGE)
+ {
+#if FBCON_DISPLAY_MSG
+ display_bootverify_menu(DISPLAY_MENU_ORANGE);
+ wait_for_users_action();
+#else
+ dprintf(CRITICAL,
+ "Your device has been unlocked and can't be trusted.\nWait for 5 seconds before proceeding\n");
+ mdelay(5000);
+#endif
+ }
+#endif
+
+#if VERIFIED_BOOT
#if !VBOOT_MOTA
// send root of trust
if(!send_rot_command((uint32_t)device.is_unlocked))
diff --git a/app/aboot/mdtp.c b/app/aboot/mdtp.c
index d44efa3..a2d52bf 100644
--- a/app/aboot/mdtp.c
+++ b/app/aboot/mdtp.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -42,6 +42,8 @@
#include <image_verify.h>
#include "scm.h"
#include "mdtp.h"
+#include "mdtp_fs.h"
+
#define DIP_ENCRYPT (0)
#define DIP_DECRYPT (1)
@@ -208,6 +210,12 @@
/* calculating the hash value using HW crypto */
target_crypto_init_params();
+
+ if(strcmp(name, "mdtp") == 0){
+ buf[0] = 0; // removes first byte
+ dprintf(INFO, "mdtp: verify_partition_single_hash: removes 1st byte\n");
+ }
+
hash_find(buf, size, digest, CRYPTO_AUTH_ALG_SHA256);
if (memcmp(digest, hash_table->hash, HASH_LEN))
@@ -383,6 +391,11 @@
return 0;
}
+/* Display the recovery UI in case mdtp image is corrupted */
+static void display_mdtp_fail_recovery_ui(){
+ display_error_msg_mdtp();
+}
+
/* Display the recovery UI to allow the user to enter the PIN and continue boot */
static void display_recovery_ui(mdtp_cfg_t *mdtp_cfg)
{
@@ -554,6 +567,7 @@
{
int i;
int verify_failure = 0;
+ int verify_temp_result = 0;
int ext_partition_verify_failure = 0;
uint32_t total_num_blocks;
@@ -579,6 +593,7 @@
{
for(i=0; i<MAX_PARTITIONS; i++)
{
+ verify_temp_result = 0;
if(dip->partition_cfg[i].lock_enabled && dip->partition_cfg[i].size)
{
total_num_blocks = ((dip->partition_cfg[i].size - 1) / MDTP_FWLOCK_BLOCK_SIZE);
@@ -591,12 +606,18 @@
break;
}
- verify_failure |= (verify_partition(dip->partition_cfg[i].name,
+ verify_temp_result |= (verify_partition(dip->partition_cfg[i].name,
dip->partition_cfg[i].size,
dip->partition_cfg[i].hash_mode,
(dip->partition_cfg[i].verify_ratio * total_num_blocks) / 100,
dip->partition_cfg[i].hash_table,
dip->partition_cfg[i].force_verify_block) != 0);
+
+ if((verify_temp_result) && (strcmp("mdtp",dip->partition_cfg[i].name) == 0)){
+ *verify_result = VERIFY_MDTP_FAILED;
+ }
+
+ verify_failure |= verify_temp_result;
}
}
@@ -680,7 +701,13 @@
else if (verify_result == VERIFY_SKIPPED)
{
dprintf(SPEW, "mdtp: validate_DIP_and_firmware: Verify skipped\n");
- } else /* VERIFY_FAILED */
+ }
+ else if(verify_result == VERIFY_MDTP_FAILED)
+ {
+ dprintf(CRITICAL, "mdtp: validate_DIP_and_firmware: ERROR, corrupted mdtp image\n");
+ display_mdtp_fail_recovery_ui();
+ }
+ else /* VERIFY_FAILED */
{
dprintf(CRITICAL, "mdtp: validate_DIP_and_firmware: ERROR, corrupted firmware\n");
display_recovery_ui(&mdtp_cfg);
@@ -694,6 +721,7 @@
return;
}
+
/********************************************************************************/
/** Entry point of the MDTP Firmware Lock.
@@ -707,6 +735,10 @@
int ret;
bool enabled;
+ if(mdtp_fs_init() != 0){
+ dprintf(CRITICAL, "mdtp: mdtp_img: ERROR, image file could not be loaded\n");
+ display_error_msg_mdtp(); /* This will never return */
+ }
/* sets the default value of this global to be MDTP not activated */
is_mdtp_activated = 0;
diff --git a/app/aboot/mdtp.h b/app/aboot/mdtp.h
index 03e3b7c..88eff44 100644
--- a/app/aboot/mdtp.h
+++ b/app/aboot/mdtp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -137,6 +137,7 @@
VERIFY_SKIPPED = 0,
VERIFY_OK,
VERIFY_FAILED,
+ VERIFY_MDTP_FAILED,
} verify_result_t;
/**
@@ -185,6 +186,15 @@
void display_error_msg();
/**
+ * display_error_msg_mdtp
+ *
+ * Display error message in case mdtp image corrupted and stop boot process.
+ *
+ * @return - None.
+ */
+void display_error_msg_mdtp();
+
+/**
* mdtp_activated
*
* Indicates whether the MDTP is currently in ACTIVATED state.
diff --git a/app/aboot/mdtp_defs.c b/app/aboot/mdtp_defs.c
index d9eb903..b246e50 100644
--- a/app/aboot/mdtp_defs.c
+++ b/app/aboot/mdtp_defs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -30,42 +30,6 @@
#include <compiler.h>
#include "mdtp_defs.h"
-struct mdtp_ui_defs mdtp_ui_defs_default = {
- // Image dimensions
- 1412, // error_msg_width;
- 212, // error_msg_height;
- 1364, // main_text_width;
- 288, // main_text_height;
- 180, // pin_digit_width;
- 180, // pin_digit_height;
- 644, // ok_button_width;
- 158, // ok_button_height;
- 1384, // digits_instructions_width;
- 166, // digits_instructions_height;
- 920, // pin_instructions_width;
- 204, // pin_instructions_height;
-
- // Image offsets
- 0x1000, // error_msg_offset;
- 0xDD000, // initial_delay_offset;
- 0x1FD000, // enter_pin_offset;
- 0x31D000, // invalid_pin_offset;
- 0x43D000, // pin_digit_0_offset;
- 0x18000, // pin_digits_offset;
- 0x52D000, // pin_selected_digit_0_offset;
- 0x61D000, // ok_button_offset;
- 0x668000, // selected_ok_button_offset;
- 0x6B3000, // digits_instructions_offset;
- 0x75C000, // pin_instructions_offset;
-
- //Display settings
- 12 // mdtp_digit_space;
-};
-
-__WEAK struct mdtp_ui_defs mdtp_get_target_ui_defs()
-{
- return mdtp_ui_defs_default;
-}
__WEAK int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse)
{
diff --git a/app/aboot/mdtp_defs.h b/app/aboot/mdtp_defs.h
index 9fe05ae..b5551ce 100644
--- a/app/aboot/mdtp_defs.h
+++ b/app/aboot/mdtp_defs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -29,44 +29,10 @@
#include <stdlib.h>
-struct mdtp_ui_defs {
-
- // Image dimensions
- uint32_t error_msg_width;
- uint32_t error_msg_height;
- uint32_t main_text_width;
- uint32_t main_text_height;
- uint32_t pin_digit_width;
- uint32_t pin_digit_height;
- uint32_t ok_button_width;
- uint32_t ok_button_height;
- uint32_t digits_instructions_width;
- uint32_t digits_instructions_height;
- uint32_t pin_instructions_width;
- uint32_t pin_instructions_height;
-
- // Image offsets
- uint32_t error_msg_offset;
- uint32_t initial_delay_offset;
- uint32_t enter_pin_offset;
- uint32_t invalid_pin_offset;
- uint32_t pin_digit_0_offset;
- uint32_t pin_digits_offset;
- uint32_t pin_selected_digit_0_offset;
- uint32_t ok_button_offset;
- uint32_t selected_ok_button_offset;
- uint32_t digits_instructions_offset;
- uint32_t pin_instructions_offset;
-
- //Display settings
- uint32_t digit_space;
-};
-
struct mdtp_target_efuse {
uint32_t address;
uint32_t start;
};
-struct mdtp_ui_defs mdtp_get_target_ui_defs();
int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse);
diff --git a/app/aboot/mdtp_fs.c b/app/aboot/mdtp_fs.c
new file mode 100644
index 0000000..b848c7a
--- /dev/null
+++ b/app/aboot/mdtp_fs.c
@@ -0,0 +1,115 @@
+/* Copyright (c) 2015-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
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <debug.h>
+#include <dev/fbcon.h>
+#include <target.h>
+#include <mmc.h>
+#include <partition_parser.h>
+#include <string.h>
+#include "mdtp.h"
+#include "mdtp_fs.h"
+
+/*---------------------------------------------------------
+ * Global Variables
+ *-------------------------------------------------------*/
+static mdtp_image_t mdtp_img;
+
+/*---------------------------------------------------------
+ * External Functions
+ *-------------------------------------------------------*/
+
+uint32_t get_image_offset(mdtp_image_id_t img){
+ return mdtp_img.meta_data.image_params[img].offset;
+}
+
+uint32_t get_image_width(mdtp_image_id_t img){
+ return mdtp_img.meta_data.image_params[img].width;
+}
+
+uint32_t get_image_height(mdtp_image_id_t img){
+ return mdtp_img.meta_data.image_params[img].height;
+}
+
+uint32_t mdtp_fs_get_param(mdtp_parameter_id_t param){
+ return mdtp_img.meta_data.params[param];
+}
+
+
+int mdtp_fs_init(){
+ int index = INVALID_PTN;
+ unsigned long long ptn = 0;
+ int i = 0;
+ uint32_t block_size = mmc_get_device_blocksize();
+
+ index = partition_get_index("mdtp");
+ if (index == 0) {
+ dprintf(CRITICAL, "ERROR: mdtp Partition table not found\n");
+ return 1;
+ }
+
+ ptn = partition_get_offset(index);
+ mmc_set_lun(partition_get_lun(index));
+
+ if (ptn == 0) {
+ dprintf(CRITICAL, "ERROR: mdtp Partition invalid\n");
+ return 1;
+ }
+
+ for(i = 0; i< MAX_PARAMS; i++) {
+ mdtp_img.meta_data.params[i] = -1; //Initiate params for errors check
+ }
+
+ uint8_t *base = memalign(block_size, ROUNDUP(MDTP_HEADER_LEN, block_size));
+ if (!base) {
+ dprintf(CRITICAL, "ERROR: mdtp malloc failed\n");
+ return 1;
+ }
+
+ // read image meta data
+ if (mmc_read(ptn, (void*)base, MDTP_HEADER_LEN)) {
+ dprintf(CRITICAL, "ERROR: mdtp meta data read failed\n");
+ free(base);
+ return 1;
+ }
+
+ uint32_t params_size = MAX_PARAMS * sizeof(uint32_t);
+ uint32_t images_params_size = MAX_IMAGES*sizeof(mdtp_image_params_t);
+ memscpy(mdtp_img.meta_data.params, sizeof(mdtp_img.meta_data.params), base, params_size);
+ memscpy(mdtp_img.meta_data.image_params, META_DATA_PARTITION_LEN,
+ base + sizeof(mdtp_img.meta_data.params), images_params_size);
+
+ dprintf(INFO, "mdtp: mdtp_img loaded\n");
+
+ free(base);
+ return 0;
+}
+
diff --git a/app/aboot/mdtp_fs.h b/app/aboot/mdtp_fs.h
new file mode 100644
index 0000000..33ddf55
--- /dev/null
+++ b/app/aboot/mdtp_fs.h
@@ -0,0 +1,110 @@
+/* Copyright (c) 2015-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
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MDTP_FS_H
+#define MDTP_FS_H
+
+#define MAX_IMAGES (40)
+#define MDTP_HEADER_LEN (4096)
+#define META_DATA_PARTITION_LEN (2048)
+#define MAX_PARAMS (512)
+/*
+MDTP header layout:
+-The mdtp_img header is a fixed length of 4096 Bytes.
+-The mdtp_img header is devided into 2 partitions:
+ 1.MDTP parameters (eFuse, digit-space, etc..)
+ 2.Images meta-data (offset, width, height)
+-Each partition size is 2048 Bytes.
+-Each parameter is 4 Bytes long, 512 params MAX.
+-Each meta-data part (offset/width/height) is 4 Bytes long.
+*/
+
+
+/* Standalone parameters */
+typedef struct mdtp_image_params {
+ uint32_t offset;
+ uint32_t width;
+ uint32_t height;
+} mdtp_image_params_t;
+
+/* Image parameters */
+typedef struct mdtp_meta_data {
+ uint32_t params[MAX_PARAMS];
+ mdtp_image_params_t image_params[MAX_IMAGES];
+} mdtp_meta_data_t;
+
+/*To make sure the header len is exactly MDTP_HEADER */
+typedef union mdtp_image {
+ mdtp_meta_data_t meta_data;
+ uint8_t header[MDTP_HEADER_LEN];
+} mdtp_image_t;
+
+
+typedef enum{ACCEPTEDIT_TEXT = 0, ALERT_MESSAGE = 1, BTN_OK_OFF = 2,
+ BTN_OK_ON = 3, MAINTEXT_5SECONDS = 4, MAINTEXT_ENTERPIN = 5,
+ MAINTEXT_INCORRECTPIN = 6, PINTEXT = 7,
+ PIN_SELECTED_0 = 8, PIN_SELECTED_1 = 9, PIN_SELECTED_2 = 10, PIN_SELECTED_3 = 11,
+ PIN_SELECTED_4 = 12, PIN_SELECTED_5 = 13, PIN_SELECTED_6 = 14,
+ PIN_SELECTED_7 = 15, PIN_SELECTED_8 = 16, PIN_SELECTED_9 = 17,
+ PIN_UNSELECTED_0 = 18, PIN_UNSELECTED_1 = 19, PIN_UNSELECTED_2 = 20,
+ PIN_UNSELECTED_3 = 21, PIN_UNSELECTED_4 = 22, PIN_UNSELECTED_5 = 23,
+ PIN_UNSELECTED_6 = 24, PIN_UNSELECTED_7 = 25,
+ PIN_UNSELECTED_8 = 26, PIN_UNSELECTED_9 = 27} mdtp_image_id_t;
+
+typedef enum {VIRTUAL_FUSE = 0, DIGIT_SPACE = 1} mdtp_parameter_id_t ;
+
+/*---------------------------------------------------------
+ * External Functions
+ *-------------------------------------------------------*/
+
+/**
+ * Returns an image offset
+ */
+uint32_t get_image_offset(mdtp_image_id_t img);
+
+/**
+ * Returns an image width
+ */
+uint32_t get_image_width(mdtp_image_id_t img);
+
+/**
+ * Returns an image height
+ */
+uint32_t get_image_height(mdtp_image_id_t img);
+
+/**
+ * returns a parameter value
+ */
+uint32_t mdtp_fs_get_param(mdtp_parameter_id_t param);
+
+/**
+ * Loads MDTP image meta data from EMMC
+ */
+int mdtp_fs_init();
+
+#endif /* MDTP_FS_H */
diff --git a/app/aboot/mdtp_fuse.c b/app/aboot/mdtp_fuse.c
index 7f67661..439fb73 100644
--- a/app/aboot/mdtp_fuse.c
+++ b/app/aboot/mdtp_fuse.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
@@ -28,7 +28,6 @@
#include <debug.h>
#include <target.h>
-#include <mmc.h>
#include <partition_parser.h>
#include <string.h>
#include <stdlib.h>
@@ -36,6 +35,7 @@
#include "mdtp.h"
#include "mdtp_defs.h"
#include "scm.h"
+#include "mdtp_fs.h"
#define MAX_METADATA_SIZE (0x1000)
@@ -105,45 +105,18 @@
/**
* Read the Firmware Lock Metadata from EMMC
- *
* @param metadata - Read a metadata block holding eFuse emulation from MDTP partition.
- *
* @return - negative value for an error, 0 for success.
*/
static int read_metadata(metadata_t *metadata)
{
- unsigned long long ptn = 0;
- uint32_t actual_size;
- int index = INVALID_PTN;
- uint32_t block_size = mmc_get_device_blocksize();
- unsigned char *buf = (unsigned char *)target_get_scratch_address() + MDTP_SCRATCH_OFFSET;
-
- index = partition_get_index("mdtp");
- ptn = partition_get_offset(index);
-
- if(ptn == 0)
- {
+ int eFuse = mdtp_fs_get_param(VIRTUAL_FUSE);
+ if(eFuse == -1){ //Error initiating eFuse
+ dprintf(CRITICAL, "mdtp: eFuse reading error\n");
return -1;
}
-
- actual_size = ROUNDUP(sizeof(metadata_t), block_size);
-
- if (actual_size > MAX_METADATA_SIZE)
- {
- dprintf(CRITICAL, "mdtp: read_metadata: ERROR, meta data size %d too big\n", actual_size);
- return -1;
- }
-
- if(mmc_read(ptn, (void *)buf, actual_size))
- {
- dprintf(CRITICAL, "mdtp: read_metadata: ERROR, cannot read mdtp info\n");
- return -1;
- }
-
- memscpy((uint8_t*)metadata, sizeof(metadata_t), (uint8_t*)(buf), MAX_METADATA_SIZE);
-
- dprintf(INFO, "mdtp: read_metadata: SUCCESS, read %d bytes\n", actual_size);
-
+ metadata->eFuses.mask = (uint8_t)eFuse;
+ dprintf(INFO, "mdtp: read_metadata: SUCCESS \n");
return 0;
}
diff --git a/app/aboot/mdtp_ui.c b/app/aboot/mdtp_ui.c
index 924c4fe..f03b818 100644
--- a/app/aboot/mdtp_ui.c
+++ b/app/aboot/mdtp_ui.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -35,6 +35,8 @@
#include <string.h>
#include "mdtp.h"
#include "mdtp_defs.h"
+#include "mdtp_fs.h"
+#include <display_menu.h>
// Image releative locations
#define ERROR_MESSAGE_RELATIVE_Y_LOCATION (0.18)
@@ -75,7 +77,6 @@
static struct mdtp_fbimage *g_mdtp_header = NULL;
static struct fbcon_config *fb_config = NULL;
-struct mdtp_ui_defs mdtp_ui_defs_data;
/*----------------------------------------------------------------------------
* Local Functions
@@ -257,10 +258,9 @@
if (fb_config)
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.error_msg_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(ALERT_MESSAGE),fb_config->width);
uint32_t y = ((fb_config->height)*ERROR_MESSAGE_RELATIVE_Y_LOCATION);
-
- fbimg = mdtp_read_mmc_image(mdtp_ui_defs_data.error_msg_offset, mdtp_ui_defs_data.error_msg_width, mdtp_ui_defs_data.error_msg_height);
+ fbimg = mdtp_read_mmc_image(get_image_offset(ALERT_MESSAGE),get_image_width(ALERT_MESSAGE), get_image_height(ALERT_MESSAGE));
if (NULL == fbimg)
{
dprintf(CRITICAL,"ERROR: failed to read error image from mmc\n");
@@ -309,10 +309,9 @@
*/
static void display_initial_delay()
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.main_text_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(MAINTEXT_5SECONDS),fb_config->width);
uint32_t y = (fb_config->height)*MAIN_TEXT_RELATIVE_Y_LOCATION;
-
- display_image(mdtp_ui_defs_data.initial_delay_offset, mdtp_ui_defs_data.main_text_width, mdtp_ui_defs_data.main_text_height, x, y);
+ display_image(get_image_offset(MAINTEXT_5SECONDS), get_image_width(MAINTEXT_5SECONDS), get_image_height(MAINTEXT_5SECONDS), x, y);
}
/**
@@ -320,10 +319,9 @@
*/
static void display_enter_pin()
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.main_text_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(MAINTEXT_ENTERPIN),fb_config->width);
uint32_t y = (fb_config->height)*MAIN_TEXT_RELATIVE_Y_LOCATION;
-
- display_image(mdtp_ui_defs_data.enter_pin_offset, mdtp_ui_defs_data.main_text_width, mdtp_ui_defs_data.main_text_height, x, y);
+ display_image(get_image_offset(MAINTEXT_ENTERPIN), get_image_width(MAINTEXT_ENTERPIN), get_image_height(MAINTEXT_ENTERPIN), x, y);
}
/**
@@ -331,10 +329,10 @@
*/
static void display_invalid_pin()
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.main_text_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(MAINTEXT_INCORRECTPIN),fb_config->width);
uint32_t y = (fb_config->height)*MAIN_TEXT_RELATIVE_Y_LOCATION;
- display_image(mdtp_ui_defs_data.invalid_pin_offset, mdtp_ui_defs_data.main_text_width, mdtp_ui_defs_data.main_text_height, x, y);
+ display_image(get_image_offset(MAINTEXT_INCORRECTPIN), get_image_width(MAINTEXT_INCORRECTPIN), get_image_height(MAINTEXT_INCORRECTPIN), x, y);
}
/**
@@ -342,10 +340,10 @@
*/
static void display_digits_instructions()
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.digits_instructions_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(PINTEXT),fb_config->width);
uint32_t y = (fb_config->height)*PIN_TEXT_RELATIVE_Y_LOCATION;
- display_image(mdtp_ui_defs_data.digits_instructions_offset, mdtp_ui_defs_data.digits_instructions_width, mdtp_ui_defs_data.digits_instructions_height, x, y);
+ display_image(get_image_offset(PINTEXT), get_image_width(PINTEXT), get_image_height(PINTEXT), x, y);
}
/**
@@ -354,8 +352,7 @@
static void clear_digits_instructions()
{
uint32_t y = (fb_config->height)*PIN_TEXT_RELATIVE_Y_LOCATION;
-
- fbcon_clear_section(y, mdtp_ui_defs_data.digits_instructions_height);
+ fbcon_clear_section(y, get_image_height(PINTEXT));
}
/**
@@ -363,8 +360,8 @@
*/
static void display_digit(uint32_t x, uint32_t y, uint32_t digit)
{
- display_image(mdtp_ui_defs_data.pin_digit_0_offset + digit*mdtp_ui_defs_data.pin_digits_offset,
- mdtp_ui_defs_data.pin_digit_width, mdtp_ui_defs_data.pin_digit_height, x, y);
+ display_image(get_image_offset(PIN_UNSELECTED_0 + digit),
+ get_image_width(PIN_UNSELECTED_0 + digit), get_image_height(PIN_UNSELECTED_0 + digit), x, y);
}
/**
@@ -372,8 +369,9 @@
*/
static void display_selected_digit(uint32_t x, uint32_t y, uint32_t digit)
{
- display_image(mdtp_ui_defs_data.pin_selected_digit_0_offset + digit*mdtp_ui_defs_data.pin_digits_offset,
- mdtp_ui_defs_data.pin_digit_width, mdtp_ui_defs_data.pin_digit_height, x, y);
+ display_image(get_image_offset(PIN_SELECTED_0 + digit),
+ get_image_width(PIN_SELECTED_0 + digit),
+ get_image_height(PIN_SELECTED_0 + digit), x, y);
}
/**
@@ -381,10 +379,10 @@
*/
static void display_ok_button()
{
- uint32_t ok_x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.ok_button_width,fb_config->width);
+ uint32_t ok_x = CENTER_IMAGE_ON_X_AXIS(get_image_width(BTN_OK_OFF),fb_config->width);
uint32_t ok_y = (fb_config->height)*OK_BUTTON_RELATIVE_Y_LOCATION;
- display_image(mdtp_ui_defs_data.ok_button_offset, mdtp_ui_defs_data.ok_button_width, mdtp_ui_defs_data.ok_button_height, ok_x, ok_y);
+ display_image(get_image_offset(BTN_OK_OFF), get_image_width(BTN_OK_OFF),get_image_height(BTN_OK_OFF), ok_x, ok_y);
}
/**
@@ -392,21 +390,22 @@
*/
static void display_selected_ok_button()
{
- uint32_t ok_x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.ok_button_width,fb_config->width);
+ uint32_t ok_x = CENTER_IMAGE_ON_X_AXIS(get_image_width(BTN_OK_ON),fb_config->width);
uint32_t ok_y = (fb_config->height)*OK_BUTTON_RELATIVE_Y_LOCATION;
- display_image(mdtp_ui_defs_data.selected_ok_button_offset, mdtp_ui_defs_data.ok_button_width, mdtp_ui_defs_data.ok_button_height, ok_x, ok_y);
+ display_image(get_image_offset(BTN_OK_ON), get_image_width(BTN_OK_ON), get_image_height(BTN_OK_ON), ok_x, ok_y);
}
+
/**
* Display the instructions for the OK button.
*/
static void display_pin_instructions()
{
- uint32_t x = CENTER_IMAGE_ON_X_AXIS(mdtp_ui_defs_data.pin_instructions_width,fb_config->width);
+ uint32_t x = CENTER_IMAGE_ON_X_AXIS(get_image_width(ACCEPTEDIT_TEXT),fb_config->width);
uint32_t y = (fb_config->height)*OK_TEXT_RELATIVE_Y_LOCATION;
- display_image(mdtp_ui_defs_data.pin_instructions_offset, mdtp_ui_defs_data.pin_instructions_width, mdtp_ui_defs_data.pin_instructions_height, x, y);
+ display_image(get_image_offset(ACCEPTEDIT_TEXT), get_image_width(ACCEPTEDIT_TEXT), get_image_height(ACCEPTEDIT_TEXT), x, y);
}
/**
@@ -416,7 +415,7 @@
{
uint32_t y = (fb_config->height)*OK_TEXT_RELATIVE_Y_LOCATION;
- fbcon_clear_section(y, mdtp_ui_defs_data.pin_instructions_height);
+ fbcon_clear_section(y,get_image_height(ACCEPTEDIT_TEXT));
}
/**
@@ -426,7 +425,6 @@
{
fb_config = fbcon_display();
alloc_mdtp_image();
- mdtp_ui_defs_data = mdtp_get_target_ui_defs();
}
/**
@@ -451,12 +449,12 @@
g_pin_frames_y_location = ((fb_config->height)*PIN_RELATIVE_Y_LOCATION);
- uint32_t total_pin_length = pin_length*mdtp_ui_defs_data.pin_digit_width + mdtp_ui_defs_data.digit_space*(pin_length - 1);
+ uint32_t total_pin_length = pin_length*get_image_width(PIN_UNSELECTED_0) + mdtp_fs_get_param(DIGIT_SPACE)*(pin_length - 1);
uint32_t complete_pin_centered = (fb_config->width - total_pin_length)/2;
for (uint32_t i=0; i<pin_length; i++)
{
- g_pin_frames_x_location[i] = complete_pin_centered + i*(mdtp_ui_defs_data.digit_space+mdtp_ui_defs_data.pin_digit_width);
+ g_pin_frames_x_location[i] = complete_pin_centered + i*(mdtp_fs_get_param(DIGIT_SPACE) + get_image_width(PIN_UNSELECTED_0));
}
for (uint32_t i=0; i<pin_length; i++)
@@ -603,3 +601,28 @@
for(;;);
}
+/**
+ * Display error message in case mdtp image is corrupted and stop boot process.
+ */
+void display_error_msg_mdtp()
+{
+ int big_factor = 8; // Font size
+ char* str = "Device unable to boot";
+ char* str2 = "\nError - mdtp image is corrupted\n";
+ fbcon_clear();
+ while(*str != 0) {
+ fbcon_putc_factor(*str++, FBCON_COMMON_MSG, big_factor);
+ }
+ fbcon_draw_line(FBCON_COMMON_MSG);
+ while(*str2 != 0) {
+ fbcon_putc_factor(*str2++, FBCON_COMMON_MSG, big_factor);
+ }
+ fbcon_draw_line(FBCON_COMMON_MSG);
+
+ // Invalid state. Nothing to be done but contacting the OEM.
+ // Stop boot process.
+ dprintf(CRITICAL,"ERROR: blocking boot process - mdtp image corrupted\n");
+ for(;;);
+
+}
+
diff --git a/app/aboot/rules.mk b/app/aboot/rules.mk
index 09a5152..68e1c9b 100644
--- a/app/aboot/rules.mk
+++ b/app/aboot/rules.mk
@@ -21,5 +21,6 @@
$(LOCAL_DIR)/mdtp.o \
$(LOCAL_DIR)/mdtp_ui.o \
$(LOCAL_DIR)/mdtp_fuse.o \
- $(LOCAL_DIR)/mdtp_defs.o
+ $(LOCAL_DIR)/mdtp_defs.o \
+ $(LOCAL_DIR)/mdtp_fs.o
endif
diff --git a/dev/gcdb/display/include/panel_hx8394f_720p_video.h b/dev/gcdb/display/include/panel_hx8394f_720p_video.h
index 37425a0..f607946 100644
--- a/dev/gcdb/display/include/panel_hx8394f_720p_video.h
+++ b/dev/gcdb/display/include/panel_hx8394f_720p_video.h
@@ -66,14 +66,14 @@
static char hx8394f_720p_video_on_cmd1[] = {
0x07, 0x00, 0x39, 0xC0,
0xBA, 0x63, 0x03, 0x68,
- 0x6B, 0xB2, 0xc0, 0xFF,
+ 0x6B, 0xB2, 0xC0, 0xFF,
};
static char hx8394f_720p_video_on_cmd2[] = {
0x0B, 0x00, 0x39, 0xC0,
0xB1, 0x50, 0x12, 0x72,
- 0x09, 0x33, 0x54, 0x81,
- 0x31, 0x69, 0x2F, 0xFF,
+ 0x09, 0x33, 0x54, 0xB1,
+ 0x31, 0x6B, 0x2F, 0xFF,
};
static char hx8394f_720p_video_on_cmd3[] = {
@@ -84,12 +84,12 @@
static char hx8394f_720p_video_on_cmd4[] = {
0x16, 0x00, 0x39, 0xC0,
- 0xB4, 0x6C, 0x6D, 0x6C,
- 0x6A, 0x6C, 0x6D, 0x01,
- 0x05, 0xFF, 0x77, 0x00,
- 0x3F, 0x6C, 0x6D, 0x6C,
- 0x6D, 0x6C, 0x6D, 0x01,
- 0x01, 0xFF, 0xFF, 0xFF,
+ 0xB4, 0x73, 0x74, 0x73,
+ 0x74, 0x73, 0x74, 0x01,
+ 0x0C, 0x86, 0x75, 0x00,
+ 0x3F, 0x73, 0x74, 0x73,
+ 0x74, 0x73, 0x74, 0x01,
+ 0x0C, 0x86, 0xFF, 0xFF,
};
static char hx8394f_720p_video_on_cmd5[] = {
@@ -102,7 +102,7 @@
0x15, 0x06, 0x05, 0x06,
0x47, 0x44, 0x0A, 0x0A,
0x4B, 0x10, 0x07, 0x07,
- 0x0e, 0x40, 0xFF, 0xFF,
+ 0x0E, 0x40, 0xFF, 0xFF,
};
static char hx8394f_720p_video_on_cmd6[] = {
@@ -152,13 +152,13 @@
0x70, 0x6F, 0x76, 0x86,
0x89, 0x8D, 0x99, 0x9A,
0x95, 0xA1, 0xB0, 0x57,
- 0x55, 0x58, 0x5C, 0x5e,
+ 0x55, 0x58, 0x5C, 0x5E,
0x64, 0x6B, 0x7F, 0xFF,
};
static char hx8394f_720p_video_on_cmd9[] = {
0x03, 0x00, 0x39, 0xC0,
- 0xC0, 0x1F, 0x73, 0xFF,
+ 0xC0, 0x1F, 0x31, 0xFF,
};
static char hx8394f_720p_video_on_cmd10[] = {
@@ -170,21 +170,57 @@
};
static char hx8394f_720p_video_on_cmd12[] = {
- 0x05, 0x00, 0x39, 0xC0,
- 0xC7, 0x00, 0xC0, 0x00,
- 0xC0, 0xFF, 0xFF, 0xFF,
+ 0xBD, 0x02, 0x15, 0x80
};
static char hx8394f_720p_video_on_cmd13[] = {
+ 0x0D, 0x00, 0x39, 0xC0,
+ 0xD8, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF,
+};
+
+static char hx8394f_720p_video_on_cmd14[] = {
+ 0xBD, 0x00, 0x15, 0x80
+};
+
+static char hx8394f_720p_video_on_cmd15[] = {
+ 0xBD, 0x01, 0x15, 0x80
+};
+
+static char hx8394f_720p_video_on_cmd16[] = {
+ 0xB1, 0x00, 0x15, 0x80
+};
+
+static char hx8394f_720p_video_on_cmd17[] = {
+ 0xBD, 0x00, 0x15, 0x80
+};
+
+static char hx8394f_720p_video_on_cmd18[] = {
+ 0x08, 0x00, 0x39, 0xC0,
+ 0xBF, 0x40, 0x81, 0x50,
+ 0x00, 0x1A, 0xFC, 0x01,
+};
+
+static char hx8394f_720p_video_on_cmd19[] = {
0x03, 0x00, 0x39, 0xC0,
0xB6, 0x7D, 0x7D, 0xFF,
};
-static char hx8394f_720p_video_on_cmd14[] = {
+static char hx8394f_720p_video_on_cmd20[] = {
0x11, 0x00, 0x05, 0x80
};
-static char hx8394f_720p_video_on_cmd15[] = {
+static char hx8394f_720p_video_on_cmd21[] = {
+ 0x0D, 0x00, 0x39, 0xC0,
+ 0xB2, 0x00, 0x80, 0x64,
+ 0x0E, 0x0D, 0x2F, 0x00,
+ 0x00, 0x00, 0x00, 0xC0,
+ 0x18, 0xFF, 0xFF, 0xFF,
+};
+
+static char hx8394f_720p_video_on_cmd22[] = {
0x29, 0x00, 0x05, 0x80
};
@@ -201,13 +237,20 @@
{0x8, hx8394f_720p_video_on_cmd9, 0x00},
{0x4, hx8394f_720p_video_on_cmd10, 0x00},
{0x4, hx8394f_720p_video_on_cmd11, 0x00},
- {0xc, hx8394f_720p_video_on_cmd12, 0x00},
- {0x8, hx8394f_720p_video_on_cmd13, 0x00},
- {0x4, hx8394f_720p_video_on_cmd14, 0x96},
- {0x4, hx8394f_720p_video_on_cmd15, 0x32}
+ {0x4, hx8394f_720p_video_on_cmd12, 0x00},
+ {0x14, hx8394f_720p_video_on_cmd13, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd14, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd15, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd16, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd17, 0x00},
+ {0xc, hx8394f_720p_video_on_cmd18, 0x00},
+ {0x8, hx8394f_720p_video_on_cmd19, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd20, 0x78},
+ {0x14, hx8394f_720p_video_on_cmd21, 0x00},
+ {0x4, hx8394f_720p_video_on_cmd22, 0x14}
};
-#define HX8394F_720P_VIDEO_ON_COMMAND 16
+#define HX8394F_720P_VIDEO_ON_COMMAND 23
static char hx8394f_720p_videooff_cmd0[] = {
0x28, 0x00, 0x05, 0x80
diff --git a/dev/gcdb/display/include/panel_truly_720p_cmd.h b/dev/gcdb/display/include/panel_truly_720p_cmd.h
new file mode 100644
index 0000000..3fcc9cb
--- /dev/null
+++ b/dev/gcdb/display/include/panel_truly_720p_cmd.h
@@ -0,0 +1,1048 @@
+/* Copyright (c) 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
+ *met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ *IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
+
+#ifndef _PANEL_TRULY_720P_CMD_H_
+
+#define _PANEL_TRULY_720P_CMD_H_
+/*---------------------------------------------------------------------------*/
+/* HEADER files */
+/*---------------------------------------------------------------------------*/
+#include "panel.h"
+
+/*---------------------------------------------------------------------------*/
+/* Panel configuration */
+/*---------------------------------------------------------------------------*/
+
+static struct panel_config truly_720p_cmd_panel_data = {
+ "qcom,mdss_dsi_truly_720p_cmd", "dsi:0:", "qcom,mdss-dsi-panel",
+ 11, 1, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, NULL
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel resolution */
+/*---------------------------------------------------------------------------*/
+static struct panel_resolution truly_720p_cmd_panel_res = {
+ 720, 1280, 100, 100, 6, 0, 32, 32, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel Color Information */
+/*---------------------------------------------------------------------------*/
+static struct color_info truly_720p_cmd_color = {
+ 24, 0, 0xff, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel Command information */
+/*---------------------------------------------------------------------------*/
+static char truly_720p_cmd_on_cmd0[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd1[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb1, 0x78, 0x21, 0xff, };
+
+static char truly_720p_cmd_on_cmd2[] = {
+0xb6, 0x0f, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd3[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbc, 0x00, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd4[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xbd, 0x02, 0xb0, 0x1e,
+0x1e, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd5[] = {
+0x0b, 0x00, 0x29, 0xc0,
+0xe7, 0xf2, 0xe6, 0xd8,
+0xcc, 0xbf, 0xb2, 0xa5,
+0x99, 0x99, 0x95, 0xff, };
+
+static char truly_720p_cmd_on_cmd6[] = {
+0x0b, 0x00, 0x29, 0xc0,
+0xe8, 0xf2, 0xe6, 0xd8,
+0xcc, 0xbf, 0xb2, 0xa5,
+0x99, 0x99, 0x95, 0xff, };
+
+static char truly_720p_cmd_on_cmd7[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x01, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd8[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbc, 0xa0, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd9[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbd, 0xa0, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd10[] = {
+0xca, 0x01, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd11[] = {
+0xc0, 0x0c, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd12[] = {
+0xbe, 0x4e, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd13[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb3, 0x38, 0x38, 0xff, };
+
+static char truly_720p_cmd_on_cmd14[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb4, 0x11, 0x11, 0xff, };
+
+static char truly_720p_cmd_on_cmd15[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb6, 0x05, 0x05, 0xff, };
+
+static char truly_720p_cmd_on_cmd16[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb9, 0x45, 0x45, 0xff, };
+
+static char truly_720p_cmd_on_cmd17[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xba, 0x25, 0x25, 0xff, };
+
+static char truly_720p_cmd_on_cmd18[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc4, 0x11, 0x11, 0xff, };
+
+static char truly_720p_cmd_on_cmd19[] = {
+0xc6, 0x66, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd20[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x02, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd21[] = {
+0xee, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd22[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb0, 0x00, 0x37, 0x00,
+0x48, 0x00, 0x69, 0x00,
+0x8a, 0x00, 0xab, 0x00,
+0xcb, 0x00, 0xeb, 0x01,
+0x1c, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd23[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb1, 0x01, 0x41, 0x01,
+0x7c, 0x01, 0xaa, 0x01,
+0xf3, 0x02, 0x2d, 0x02,
+0x2e, 0x02, 0x63, 0x02,
+0x9d, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd24[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb2, 0x02, 0xc3, 0x02,
+0xf6, 0x03, 0x19, 0x03,
+0x54, 0x03, 0x85, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd25[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xb3, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd26[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xbc, 0x00, 0x37, 0x00,
+0x48, 0x00, 0x69, 0x00,
+0x8a, 0x00, 0xab, 0x00,
+0xcb, 0x00, 0xeb, 0x01,
+0x1c, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd27[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xbd, 0x01, 0x41, 0x01,
+0x7c, 0x01, 0xaa, 0x01,
+0xf3, 0x02, 0x2d, 0x02,
+0x2e, 0x02, 0x63, 0x02,
+0x9d, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd28[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xbe, 0x02, 0xc3, 0x02,
+0xf6, 0x03, 0x19, 0x03,
+0x54, 0x03, 0x85, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd29[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xbf, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd30[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb4, 0x00, 0xd1, 0x00,
+0xd7, 0x00, 0xe4, 0x00,
+0xf1, 0x00, 0xfe, 0x01,
+0x12, 0x01, 0x26, 0x01,
+0x48, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd31[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb5, 0x01, 0x64, 0x01,
+0x95, 0x01, 0xbd, 0x02,
+0x01, 0x02, 0x36, 0x02,
+0x38, 0x02, 0x6c, 0x02,
+0xa7, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd32[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb6, 0x02, 0xce, 0x03,
+0x04, 0x03, 0x2b, 0x03,
+0x5b, 0x03, 0x89, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd33[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xb7, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd34[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc0, 0x00, 0xd1, 0x00,
+0xd7, 0x00, 0xe4, 0x00,
+0xf1, 0x00, 0xfe, 0x01,
+0x12, 0x01, 0x26, 0x01,
+0x48, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd35[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc1, 0x01, 0x64, 0x01,
+0x95, 0x01, 0xbd, 0x02,
+0x01, 0x02, 0x36, 0x02,
+0x38, 0x02, 0x6c, 0x02,
+0xa7, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd36[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc2, 0x02, 0xce, 0x03,
+0x04, 0x03, 0x2b, 0x03,
+0x5b, 0x03, 0x89, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd37[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc3, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd38[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb8, 0x00, 0x37, 0x00,
+0x45, 0x00, 0x61, 0x00,
+0x7d, 0x00, 0x9a, 0x00,
+0xbb, 0x00, 0xdc, 0x01,
+0x0b, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd39[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xb9, 0x01, 0x31, 0x01,
+0x6e, 0x01, 0x9e, 0x01,
+0xea, 0x02, 0x24, 0x02,
+0x25, 0x02, 0x58, 0x02,
+0x90, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd40[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xba, 0x02, 0xb4, 0x02,
+0xe4, 0x03, 0x04, 0x03,
+0x44, 0x03, 0x7f, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd41[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xbb, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd42[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc4, 0x00, 0x37, 0x00,
+0x45, 0x00, 0x61, 0x00,
+0x7d, 0x00, 0x9a, 0x00,
+0xbb, 0x00, 0xdc, 0x01,
+0x0b, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd43[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc5, 0x01, 0x31, 0x01,
+0x6e, 0x01, 0x9e, 0x01,
+0xea, 0x02, 0x24, 0x02,
+0x25, 0x02, 0x58, 0x02,
+0x90, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd44[] = {
+0x11, 0x00, 0x29, 0xc0,
+0xc6, 0x02, 0xb4, 0x02,
+0xe4, 0x03, 0x04, 0x03,
+0x44, 0x03, 0x7f, 0x03,
+0xb2, 0x03, 0xc1, 0x03,
+0xd1, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd45[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc7, 0x03, 0xe0, 0x03,
+0xe8, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd46[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x06, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd47[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb0, 0x29, 0x2a, 0xff, };
+
+static char truly_720p_cmd_on_cmd48[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb1, 0x10, 0x12, 0xff, };
+
+static char truly_720p_cmd_on_cmd49[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb2, 0x14, 0x16, 0xff, };
+
+static char truly_720p_cmd_on_cmd50[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb3, 0x18, 0x1a, 0xff, };
+
+static char truly_720p_cmd_on_cmd51[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb4, 0x02, 0x04, 0xff, };
+
+static char truly_720p_cmd_on_cmd52[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb5, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd53[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb6, 0x34, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd54[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb7, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd55[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb8, 0x34, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd56[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb9, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd57[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xba, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd58[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbb, 0x01, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd59[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbc, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd60[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbd, 0x2e, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd61[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbe, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd62[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xbf, 0x05, 0x03, 0xff, };
+
+static char truly_720p_cmd_on_cmd63[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc0, 0x1b, 0x19, 0xff, };
+
+static char truly_720p_cmd_on_cmd64[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc1, 0x17, 0x15, 0xff, };
+
+static char truly_720p_cmd_on_cmd65[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc2, 0x13, 0x11, 0xff, };
+
+static char truly_720p_cmd_on_cmd66[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc3, 0x2a, 0x29, 0xff, };
+
+static char truly_720p_cmd_on_cmd67[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xe5, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd68[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc4, 0x29, 0x2a, 0xff, };
+
+static char truly_720p_cmd_on_cmd69[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc5, 0x1b, 0x19, 0xff, };
+
+static char truly_720p_cmd_on_cmd70[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc6, 0x17, 0x15, 0xff, };
+
+static char truly_720p_cmd_on_cmd71[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc7, 0x13, 0x11, 0xff, };
+
+static char truly_720p_cmd_on_cmd72[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc8, 0x01, 0x05, 0xff, };
+
+static char truly_720p_cmd_on_cmd73[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc9, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd74[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xca, 0x34, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd75[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xcb, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd76[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xcc, 0x34, 0x03, 0xff, };
+
+static char truly_720p_cmd_on_cmd77[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xcd, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd78[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xce, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd79[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xcf, 0x02, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd80[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd0, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd81[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd1, 0x2e, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd82[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd2, 0x34, 0x34, 0xff, };
+
+static char truly_720p_cmd_on_cmd83[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd3, 0x04, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd84[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd4, 0x10, 0x12, 0xff, };
+
+static char truly_720p_cmd_on_cmd85[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd5, 0x14, 0x16, 0xff, };
+
+static char truly_720p_cmd_on_cmd86[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd6, 0x18, 0x1a, 0xff, };
+
+static char truly_720p_cmd_on_cmd87[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xd7, 0x2a, 0x29, 0xff, };
+
+static char truly_720p_cmd_on_cmd88[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xe6, 0x2e, 0x2e, 0xff, };
+
+static char truly_720p_cmd_on_cmd89[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd8, 0x00, 0x00, 0x00,
+0x54, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd90[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd9, 0x00, 0x15, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd91[] = {
+0xe7, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd92[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x03, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd93[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb1, 0x00, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd94[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb0, 0x00, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd95[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb2, 0x05, 0x00, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd96[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb3, 0x05, 0x00, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd97[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb4, 0x05, 0x00, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd98[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb5, 0x05, 0x00, 0x17,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd99[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb6, 0x12, 0x00, 0x19,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd100[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb7, 0x12, 0x00, 0x19,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd101[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb8, 0x12, 0x00, 0x19,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd102[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xb9, 0x12, 0x00, 0x19,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd103[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xba, 0x57, 0x00, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd104[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xbb, 0x57, 0x00, 0x00,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd105[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xbc, 0x75, 0x00, 0x1a,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd106[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xbd, 0x53, 0x00, 0x1a,
+0x00, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd107[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc0, 0x00, 0x34, 0x00,
+0x00, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd108[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc1, 0x00, 0x34, 0x00,
+0x00, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd109[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc2, 0x00, 0x34, 0x00,
+0x00, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd110[] = {
+0x05, 0x00, 0x29, 0xc0,
+0xc3, 0x00, 0x34, 0x00,
+0x00, 0xff, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd111[] = {
+0xc4, 0x20, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd112[] = {
+0xc5, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd113[] = {
+0xc6, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd114[] = {
+0xc7, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd115[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xf0, 0x55, 0xaa, 0x52,
+0x08, 0x05, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd116[] = {
+0xed, 0x30, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd117[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb0, 0x17, 0x06, 0xff, };
+
+static char truly_720p_cmd_on_cmd118[] = {
+0xb8, 0x08, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd119[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xbd, 0x03, 0x07, 0x00,
+0x03, 0x00, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd120[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb1, 0x17, 0x06, 0xff, };
+
+static char truly_720p_cmd_on_cmd121[] = {
+0xb9, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd122[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb2, 0x00, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd123[] = {
+0xba, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd124[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb3, 0x17, 0x06, 0xff, };
+
+static char truly_720p_cmd_on_cmd125[] = {
+0xbb, 0x0a, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd126[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb4, 0x17, 0x06, 0xff, };
+
+static char truly_720p_cmd_on_cmd127[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb5, 0x17, 0x06, 0xff, };
+
+static char truly_720p_cmd_on_cmd128[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb6, 0x14, 0x03, 0xff, };
+
+static char truly_720p_cmd_on_cmd129[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xb7, 0x00, 0x00, 0xff, };
+
+static char truly_720p_cmd_on_cmd130[] = {
+0xbc, 0x02, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd131[] = {
+0xe5, 0x06, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd132[] = {
+0xe6, 0x06, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd133[] = {
+0xe7, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd134[] = {
+0xe8, 0x06, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd135[] = {
+0xe9, 0x06, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd136[] = {
+0xea, 0x06, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd137[] = {
+0xeb, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd138[] = {
+0xec, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd139[] = {
+0xc0, 0x07, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd140[] = {
+0xc1, 0x80, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd141[] = {
+0xc2, 0xa4, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd142[] = {
+0xc3, 0x05, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd143[] = {
+0xc4, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd144[] = {
+0xc5, 0x02, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd145[] = {
+0xc6, 0x22, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd146[] = {
+0xc7, 0x03, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd147[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc8, 0x05, 0x30, 0xff, };
+
+static char truly_720p_cmd_on_cmd148[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xc9, 0x01, 0x31, 0xff, };
+
+static char truly_720p_cmd_on_cmd149[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xca, 0x03, 0x21, 0xff, };
+
+static char truly_720p_cmd_on_cmd150[] = {
+0x03, 0x00, 0x29, 0xc0,
+0xcb, 0x01, 0x20, 0xff, };
+
+static char truly_720p_cmd_on_cmd151[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd1, 0x00, 0x05, 0x09,
+0x07, 0x10, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd152[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd2, 0x10, 0x05, 0x0e,
+0x03, 0x10, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd153[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd3, 0x20, 0x00, 0x48,
+0x07, 0x10, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd154[] = {
+0x06, 0x00, 0x29, 0xc0,
+0xd4, 0x30, 0x00, 0x43,
+0x07, 0x10, 0xff, 0xff, };
+
+static char truly_720p_cmd_on_cmd155[] = {
+0xd0, 0x00, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd156[] = {
+0x04, 0x00, 0x29, 0xc0,
+0xcc, 0x00, 0x00, 0x3e, };
+
+static char truly_720p_cmd_on_cmd157[] = {
+0x04, 0x00, 0x29, 0xc0,
+0xcd, 0x00, 0x00, 0x3e, };
+
+static char truly_720p_cmd_on_cmd158[] = {
+0x04, 0x00, 0x29, 0xc0,
+0xce, 0x00, 0x00, 0x02, };
+
+static char truly_720p_cmd_on_cmd159[] = {
+0x04, 0x00, 0x29, 0xc0,
+0xcf, 0x00, 0x00, 0x02, };
+
+static char truly_720p_cmd_on_cmd160[] = {
+0x6f, 0x11, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd161[] = {
+0xf3, 0x01, 0x23, 0x80, };
+
+static char truly_720p_cmd_on_cmd162[] = {
+0x51, 0xff, 0x15, 0x80, };
+
+static char truly_720p_cmd_on_cmd163[] = {
+0x53, 0x2c, 0x15, 0x80, };
+
+static char truly_720p_cmd_on_cmd164[] = {
+0x55, 0x03, 0x15, 0x80, };
+
+static char truly_720p_cmd_on_cmd165[] = {
+0x35, 0x00, 0x15, 0x80, };
+
+static char truly_720p_cmd_on_cmd166[] = {
+0x11, 0x00, 0x05, 0x80, };
+
+static char truly_720p_cmd_on_cmd167[] = {
+0x29, 0x00, 0x05, 0x80, };
+
+
+static struct mipi_dsi_cmd truly_720p_cmd_on_command[] = {
+{ 0xc , truly_720p_cmd_on_cmd0, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd1, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd2, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd3, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd4, 0x00},
+{ 0x10 , truly_720p_cmd_on_cmd5, 0x00},
+{ 0x10 , truly_720p_cmd_on_cmd6, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd7, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd8, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd9, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd10, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd11, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd12, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd13, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd14, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd15, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd16, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd17, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd18, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd19, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd20, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd21, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd22, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd23, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd24, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd25, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd26, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd27, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd28, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd29, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd30, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd31, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd32, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd33, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd34, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd35, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd36, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd37, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd38, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd39, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd40, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd41, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd42, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd43, 0x00},
+{ 0x18 , truly_720p_cmd_on_cmd44, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd45, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd46, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd47, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd48, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd49, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd50, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd51, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd52, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd53, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd54, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd55, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd56, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd57, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd58, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd59, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd60, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd61, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd62, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd63, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd64, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd65, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd66, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd67, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd68, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd69, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd70, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd71, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd72, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd73, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd74, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd75, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd76, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd77, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd78, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd79, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd80, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd81, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd82, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd83, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd84, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd85, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd86, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd87, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd88, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd89, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd90, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd91, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd92, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd93, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd94, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd95, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd96, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd97, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd98, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd99, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd100, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd101, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd102, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd103, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd104, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd105, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd106, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd107, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd108, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd109, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd110, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd111, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd112, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd113, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd114, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd115, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd116, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd117, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd118, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd119, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd120, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd121, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd122, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd123, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd124, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd125, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd126, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd127, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd128, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd129, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd130, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd131, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd132, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd133, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd134, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd135, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd136, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd137, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd138, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd139, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd140, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd141, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd142, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd143, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd144, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd145, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd146, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd147, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd148, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd149, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd150, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd151, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd152, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd153, 0x00},
+{ 0xc , truly_720p_cmd_on_cmd154, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd155, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd156, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd157, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd158, 0x00},
+{ 0x8 , truly_720p_cmd_on_cmd159, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd160, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd161, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd162, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd163, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd164, 0x00},
+{ 0x4 , truly_720p_cmd_on_cmd165, 0xc8},
+{ 0x4 , truly_720p_cmd_on_cmd166, 0x78},
+{ 0x4 , truly_720p_cmd_on_cmd167, 0x0a},
+};
+#define TRULY_720P_CMD_ON_COMMAND 168
+
+
+static char truly_720p_cmd_off_cmd0[] = {
+0x28, 0x00, 0x05, 0x80 };
+
+
+static char truly_720p_cmd_off_cmd1[] = {
+0x10, 0x00, 0x05, 0x80 };
+
+
+static struct mipi_dsi_cmd truly_720p_cmd_off_command[] = {
+{ 0x4 , truly_720p_cmd_off_cmd0, 0x0},
+{ 0x4 , truly_720p_cmd_off_cmd1, 0x0}
+};
+#define TRULY_720P_CMD_OFF_COMMAND 2
+
+
+static struct command_state truly_720p_cmd_state = {
+ 0, 1
+};
+
+/*---------------------------------------------------------------------------*/
+/* Command mode panel information */
+/*---------------------------------------------------------------------------*/
+
+static struct commandpanel_info truly_720p_cmd_command_panel = {
+ 1, 1, 1, 0, 0, 0x2c, 0, 0, 0, 1, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Video mode panel information */
+/*---------------------------------------------------------------------------*/
+
+static struct videopanel_info truly_720p_cmd_video_panel = {
+ 0, 0, 0, 0, 1, 1, 2, 0, 0x9
+};
+
+/*---------------------------------------------------------------------------*/
+/* Lane Configuration */
+/*---------------------------------------------------------------------------*/
+
+static struct lane_configuration truly_720p_cmd_lane_config = {
+ 4, 0, 1, 1, 1, 1, 0
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Panel Timing */
+/*---------------------------------------------------------------------------*/
+const uint32_t truly_720p_cmd_timings[] = {
+ 0x87, 0x2c, 0x12, 0x00, 0x40, 0x44, 0x16, 0x1e, 0x17, 0x03, 0x04, 0x00
+};
+
+static struct panel_timing truly_720p_cmd_timing_info = {
+ 0, 4, 0x04, 0x1b
+};
+
+static struct panel_reset_sequence truly_720p_cmd_panel_reset_seq = {
+{ 1, 0, 1, }, { 200, 200, 200, }, 2
+};
+
+/*---------------------------------------------------------------------------*/
+/* Backlight Settings */
+/*---------------------------------------------------------------------------*/
+
+static struct backlight truly_720p_cmd_backlight = {
+ 1, 1, 4095, 100, 1, "PMIC_8941"
+};
+
+#define TRULY_720P_CMD_SIGNATURE 0xFFFF
+
+#endif /*_TRULY_720P_CMD_H_*/
diff --git a/dev/gcdb/display/include/panel_truly_wuxga_video.h b/dev/gcdb/display/include/panel_truly_wuxga_video.h
index 136d31b..9379e42 100644
--- a/dev/gcdb/display/include/panel_truly_wuxga_video.h
+++ b/dev/gcdb/display/include/panel_truly_wuxga_video.h
@@ -139,6 +139,14 @@
1, 1, 4095, 100, 1, "PMIC_8941"
};
+/*---------------------------------------------------------------------------*/
+/* Dynamic fps supported frequencies by panel */
+/*---------------------------------------------------------------------------*/
+static const struct dfps_panel_info truly_wuxga_video_dfps = {
+ 1, 10, {48, 49, 50, 51, 52, 54, 56, 57, 58, 60}
+};
+
+
#define TRULY_WUXGA_VIDEO_SIGNATURE 0xFFFF
#endif /*_TRULY_WUXGA_VIDEO_H_*/
diff --git a/project/msm8952.mk b/project/msm8952.mk
index 09971c6..d7d74b9 100644
--- a/project/msm8952.mk
+++ b/project/msm8952.mk
@@ -41,7 +41,7 @@
DEFINES += CRYPTO_BAM=1
DEFINES += SPMI_CORE_V2=1
DEFINES += ABOOT_IGNORE_BOOT_HEADER_ADDRS=1
-DEFINES += TARGET_MAX_WLED_STRINGS=1
+DEFINES += TARGET_MAX_WLED_STRINGS=2
DEFINES += BAM_V170=1
diff --git a/project/msmtitanium.mk b/project/msmtitanium.mk
index dc275d7..d213104 100644
--- a/project/msmtitanium.mk
+++ b/project/msmtitanium.mk
@@ -89,6 +89,9 @@
CFLAGS += -Werror
+#enable user force reset feature
+DEFINES += USER_FORCE_RESET_SUPPORT=1
+
# Reset USB clock from target code
DEFINES += USB_RESET_FROM_CLK=1
diff --git a/target/msm8952/mdtp_defs.c b/target/msm8952/mdtp_defs.c
index 4518b06..51de785 100644
--- a/target/msm8952/mdtp_defs.c
+++ b/target/msm8952/mdtp_defs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -39,42 +39,6 @@
#define MDTP_EFUSE_ADDRESS_MSM8937 0x000A43B0 // QFPROM_CORR_SPARE_REG18_ROW0_LSB_ADDR
#define MDTP_EFUSE_START_MSM8937 0
-struct mdtp_ui_defs mdtp_ui_defs_msm8952 = {
- // Image dimensions
- 952, // error_msg_width;
- 143, // error_msg_height;
- 920, // main_text_width;
- 194, // main_text_height;
- 120, // pin_digit_width;
- 120, // pin_digit_height;
- 432, // ok_button_width;
- 106, // ok_button_height;
- 932, // digits_instructions_width;
- 112, // digits_instructions_height;
- 620, // pin_instructions_width;
- 137, // pin_instructions_height;
-
- // Image offsets
- 0x1000, // error_msg_offset;
- 0x65000, // initial_delay_offset;
- 0xE8000, // enter_pin_offset;
- 0x16B000, // invalid_pin_offset;
- 0x1EE000, // pin_digit_0_offset;
- 0xB000, // pin_digits_offset;
- 0x25C000, // pin_selected_digit_0_offset;
- 0x2CA000, // ok_button_offset;
- 0x2EC000, // selected_ok_button_offset;
- 0x30E000, // digits_instructions_offset;
- 0x35B000, // pin_instructions_offset;
-
- //Display settings
- 8 // digit_space;
-};
-
-struct mdtp_ui_defs mdtp_get_target_ui_defs()
-{
- return mdtp_ui_defs_msm8952;
-}
int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse)
{
diff --git a/target/msm8952/oem_panel.c b/target/msm8952/oem_panel.c
index fe7b8f2..3da5af1 100755
--- a/target/msm8952/oem_panel.c
+++ b/target/msm8952/oem_panel.c
@@ -61,6 +61,7 @@
#include "include/panel_hx8394f_720p_video.h"
#include "include/panel_truly_720p_video.h"
#include "include/panel_truly_wuxga_video.h"
+#include "include/panel_truly_720p_cmd.h"
/*---------------------------------------------------------------------------*/
/* static panel selection variable */
@@ -82,6 +83,7 @@
HX8394F_720P_VIDEO_PANEL,
TRULY_720P_VIDEO_PANEL,
TRULY_WUXGA_VIDEO_PANEL,
+ TRULY_720P_CMD_PANEL,
UNKNOWN_PANEL
};
@@ -109,7 +111,8 @@
{"r69006_1080p_video",R69006_1080P_VIDEO_PANEL},
{"hx8394f_720p_video", HX8394F_720P_VIDEO_PANEL},
{"truly_720p_video", TRULY_720P_VIDEO_PANEL},
- {"truly_wuxga_video", TRULY_WUXGA_VIDEO_PANEL}
+ {"truly_wuxga_video", TRULY_WUXGA_VIDEO_PANEL},
+ {"truly_720p_cmd", TRULY_720P_CMD_PANEL},
};
static uint32_t panel_id;
@@ -648,6 +651,33 @@
truly_wuxga_video_timings, TIMING_SIZE);
pinfo->mipi.signature = TRULY_WUXGA_VIDEO_SIGNATURE;
break;
+ case TRULY_720P_CMD_PANEL:
+ panelstruct->paneldata = &truly_720p_cmd_panel_data;
+ panelstruct->paneldata->panel_with_enable_gpio = 1;
+ panelstruct->panelres = &truly_720p_cmd_panel_res;
+ panelstruct->color = &truly_720p_cmd_color;
+ panelstruct->videopanel = &truly_720p_cmd_video_panel;
+ panelstruct->commandpanel = &truly_720p_cmd_command_panel;
+ panelstruct->state = &truly_720p_cmd_state;
+ panelstruct->laneconfig = &truly_720p_cmd_lane_config;
+ panelstruct->paneltiminginfo
+ = &truly_720p_cmd_timing_info;
+ panelstruct->panelresetseq
+ = &truly_720p_cmd_panel_reset_seq;
+ panelstruct->backlightinfo = &truly_720p_cmd_backlight;
+ pinfo->mipi.panel_on_cmds
+ = truly_720p_cmd_on_command;
+ pinfo->mipi.num_of_panel_on_cmds
+ = TRULY_720P_CMD_ON_COMMAND;
+ pinfo->mipi.panel_off_cmds
+ = truly_720p_cmd_off_command;
+ pinfo->mipi.num_of_panel_off_cmds
+ = TRULY_720P_CMD_OFF_COMMAND;
+ memcpy(phy_db->timing,
+ truly_720p_cmd_timings, TIMING_SIZE);
+ pinfo->mipi.signature = TRULY_720P_CMD_SIGNATURE;
+ pinfo->mipi.tx_eot_append = true;
+ break;
case UNKNOWN_PANEL:
default:
memset(panelstruct, 0, sizeof(struct panel_struct));
diff --git a/target/msm8994/mdtp_defs.c b/target/msm8994/mdtp_defs.c
index 65fb596..ce9e352 100644
--- a/target/msm8994/mdtp_defs.c
+++ b/target/msm8994/mdtp_defs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -32,42 +32,6 @@
#define MDTP_EFUSE_ADDRESS_MSM8994 0xFC4BC1F8 // QFPROM_CORR_SPARE_REG19_LSB_ADDR
#define MDTP_EFUSE_START_MSM8994 16
-struct mdtp_ui_defs mdtp_ui_defs_msm8994 = {
- // Image dimensions
- 1412, // error_msg_width;
- 212, // error_msg_height;
- 1364, // main_text_width;
- 288, // main_text_height;
- 180, // pin_digit_width;
- 180, // pin_digit_height;
- 644, // ok_button_width;
- 158, // ok_button_height;
- 1384, // digits_instructions_width;
- 166, // digits_instructions_height;
- 920, // pin_instructions_width;
- 204, // pin_instructions_height;
-
- // Image offsets
- 0x1000, // error_msg_offset;
- 0xDD000, // initial_delay_offset;
- 0x1FD000, // enter_pin_offset;
- 0x31D000, // invalid_pin_offset;
- 0x43D000, // pin_digit_0_offset;
- 0x18000, // pin_digits_offset;
- 0x52D000, // pin_selected_digit_0_offset;
- 0x61D000, // ok_button_offset;
- 0x668000, // selected_ok_button_offset;
- 0x6B3000, // digits_instructions_offset;
- 0x75C000, // pin_instructions_offset;
-
- //Display settings
- 12 // digit_space;
-};
-
-struct mdtp_ui_defs mdtp_get_target_ui_defs()
-{
- return mdtp_ui_defs_msm8994;
-}
int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse)
{
diff --git a/target/msm8996/mdtp_defs.c b/target/msm8996/mdtp_defs.c
index 195da03..d07d34d 100644
--- a/target/msm8996/mdtp_defs.c
+++ b/target/msm8996/mdtp_defs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-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
@@ -32,42 +32,7 @@
#define MDTP_EFUSE_ADDRESS_MSM8996 0x00070178 // QFPROM_CORR_ANTI_ROLLBACK_3_LSB_ADDR
#define MDTP_EFUSE_START_MSM8996 0
-struct mdtp_ui_defs mdtp_ui_defs_msm8996 = {
- // Image dimensions
- 1412, // error_msg_width;
- 212, // error_msg_height;
- 1364, // main_text_width;
- 288, // main_text_height;
- 180, // pin_digit_width;
- 180, // pin_digit_height;
- 644, // ok_button_width;
- 158, // ok_button_height;
- 1384, // digits_instructions_width;
- 166, // digits_instructions_height;
- 920, // pin_instructions_width;
- 204, // pin_instructions_height;
- // Image offsets
- 0x1000, // error_msg_offset;
- 0xDD000, // initial_delay_offset;
- 0x1FD000, // enter_pin_offset;
- 0x31D000, // invalid_pin_offset;
- 0x43D000, // pin_digit_0_offset;
- 0x18000, // pin_digits_offset;
- 0x52D000, // pin_selected_digit_0_offset;
- 0x61D000, // ok_button_offset;
- 0x668000, // selected_ok_button_offset;
- 0x6B3000, // digits_instructions_offset;
- 0x75C000, // pin_instructions_offset;
-
- //Display settings
- 12 // digit_space;
-};
-
-struct mdtp_ui_defs mdtp_get_target_ui_defs()
-{
- return mdtp_ui_defs_msm8996;
-}
int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse)
{
diff --git a/target/msmtitanium/init.c b/target/msmtitanium/init.c
index 952b33f..9d53acd 100644
--- a/target/msmtitanium/init.c
+++ b/target/msmtitanium/init.c
@@ -348,12 +348,16 @@
return _emmc_recovery_init();
}
+#define SMBCHG_USB_RT_STS 0x21310
+#define USBIN_UV_RT_STS BIT(0)
unsigned target_pause_for_battery_charge(void)
{
uint8_t pon_reason = pm8x41_get_pon_reason();
uint8_t is_cold_boot = pm8x41_get_is_cold_boot();
- dprintf(INFO, "%s : pon_reason is %d cold_boot:%d\n", __func__,
- pon_reason, is_cold_boot);
+ bool usb_present_sts = !(USBIN_UV_RT_STS &
+ pm8x41_reg_read(SMBCHG_USB_RT_STS));
+ dprintf(INFO, "%s : pon_reason is:0x%x cold_boot:%d usb_sts:%d\n", __func__,
+ pon_reason, is_cold_boot, usb_present_sts);
/* In case of fastboot reboot,adb reboot or if we see the power key
* pressed we do not want go into charger mode.
* fastboot reboot is warm boot with PON hard reset bit not set
@@ -362,7 +366,7 @@
if (is_cold_boot &&
(!(pon_reason & HARD_RST)) &&
(!(pon_reason & KPDPWR_N)) &&
- ((pon_reason & USB_CHG) || (pon_reason & DC_CHG) || (pon_reason & CBLPWR_N)))
+ usb_present_sts)
return 1;
else
return 0;
diff --git a/target/msmtitanium/mdtp_defs.c b/target/msmtitanium/mdtp_defs.c
index 04af8f1..b8dea09 100644
--- a/target/msmtitanium/mdtp_defs.c
+++ b/target/msmtitanium/mdtp_defs.c
@@ -32,42 +32,6 @@
#define MDTP_EFUSE_ADDRESS_MSM8953 0x000A4418 // QFPROM_CORR_SPARE_REG18_LSB
#define MDTP_EFUSE_START_MSM8953 0
-struct mdtp_ui_defs mdtp_ui_defs_msm8953 = {
- // Image dimensions
- 952, // error_msg_width;
- 143, // error_msg_height;
- 920, // main_text_width;
- 194, // main_text_height;
- 120, // pin_digit_width;
- 120, // pin_digit_height;
- 432, // ok_button_width;
- 106, // ok_button_height;
- 932, // digits_instructions_width;
- 112, // digits_instructions_height;
- 620, // pin_instructions_width;
- 137, // pin_instructions_height;
-
- // Image offsets
- 0x1000, // error_msg_offset;
- 0x65000, // initial_delay_offset;
- 0xE8000, // enter_pin_offset;
- 0x16B000, // invalid_pin_offset;
- 0x1EE000, // pin_digit_0_offset;
- 0xB000, // pin_digits_offset;
- 0x25C000, // pin_selected_digit_0_offset;
- 0x2CA000, // ok_button_offset;
- 0x2EC000, // selected_ok_button_offset;
- 0x30E000, // digits_instructions_offset;
- 0x35B000, // pin_instructions_offset;
-
- //Display settings
- 8 // digit_space;
-};
-
-struct mdtp_ui_defs mdtp_get_target_ui_defs()
-{
- return mdtp_ui_defs_msm8953;
-}
int mdtp_get_target_efuse(struct mdtp_target_efuse* target_efuse)
{
diff --git a/target/msmtitanium/oem_panel.c b/target/msmtitanium/oem_panel.c
index afbd5d8..9a4658e 100644
--- a/target/msmtitanium/oem_panel.c
+++ b/target/msmtitanium/oem_panel.c
@@ -246,6 +246,7 @@
= TRULY_WUXGA_VIDEO_OFF_COMMAND;
memcpy(phy_db->timing,
truly_wuxga_14nm_video_timings, MAX_TIMING_CONFIG * sizeof(uint32_t));
+ pinfo->dfps.panel_dfps = truly_wuxga_video_dfps;
pinfo->mipi.signature = TRULY_WUXGA_VIDEO_SIGNATURE;
break;
case UNKNOWN_PANEL:
diff --git a/target/msmtitanium/target_display.c b/target/msmtitanium/target_display.c
index 59b0453..28d5c50 100644
--- a/target/msmtitanium/target_display.c
+++ b/target/msmtitanium/target_display.c
@@ -265,39 +265,53 @@
struct qpnp_wled_config_data config = {0};
struct labibb_desc *labibb;
int display_type = 0;
+ bool swire_control = 0;
+ bool wled_avdd_control = 0;
labibb = pinfo->labibb;
if (labibb)
display_type = labibb->amoled_panel;
+ if (display_type) {
+ swire_control = labibb->swire_control;
+ wled_avdd_control = true;
+ } else {
+ swire_control = false;
+ wled_avdd_control = false;
+ }
+
config.display_type = display_type;
config.lab_init_volt = 4600000; /* fixed, see pmi register */
config.ibb_init_volt = 1400000; /* fixed, see pmi register */
+ config.lab_ibb_swire_control = swire_control;
+ config.wled_avdd_control = wled_avdd_control;
- if (labibb && labibb->force_config) {
- config.lab_min_volt = labibb->lab_min_volt;
- config.lab_max_volt = labibb->lab_max_volt;
- config.ibb_min_volt = labibb->ibb_min_volt;
- config.ibb_max_volt = labibb->ibb_max_volt;
- config.pwr_up_delay = labibb->pwr_up_delay;
- config.pwr_down_delay = labibb->pwr_down_delay;
- config.ibb_discharge_en = labibb->ibb_discharge_en;
- } else {
- /* default */
- config.pwr_up_delay = 3;
- config.pwr_down_delay = 3;
- config.ibb_discharge_en = 1;
- if (display_type) { /* amoled */
- config.lab_min_volt = 4600000;
- config.lab_max_volt = 4600000;
- config.ibb_min_volt = 4000000;
- config.ibb_max_volt = 4000000;
- } else { /* lcd */
- config.lab_min_volt = 5500000;
- config.lab_max_volt = 5500000;
- config.ibb_min_volt = 5500000;
- config.ibb_max_volt = 5500000;
+ if (!swire_control) {
+ if (labibb && labibb->force_config) {
+ config.lab_min_volt = labibb->lab_min_volt;
+ config.lab_max_volt = labibb->lab_max_volt;
+ config.ibb_min_volt = labibb->ibb_min_volt;
+ config.ibb_max_volt = labibb->ibb_max_volt;
+ config.pwr_up_delay = labibb->pwr_up_delay;
+ config.pwr_down_delay = labibb->pwr_down_delay;
+ config.ibb_discharge_en = labibb->ibb_discharge_en;
+ } else {
+ /* default */
+ config.pwr_up_delay = 3;
+ config.pwr_down_delay = 3;
+ config.ibb_discharge_en = 1;
+ if (display_type) { /* amoled */
+ config.lab_min_volt = 4600000;
+ config.lab_max_volt = 4600000;
+ config.ibb_min_volt = 4000000;
+ config.ibb_max_volt = 4000000;
+ } else { /* lcd */
+ config.lab_min_volt = 5500000;
+ config.lab_max_volt = 5500000;
+ config.ibb_min_volt = 5500000;
+ config.ibb_max_volt = 5500000;
+ }
}
}