diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 907436fdb5a4..d40706fb27d1 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -1853,6 +1853,8 @@ static void cec_pre_init(void) ao_ceca_init(); } + cec_config(cec_dev->tx_dev->cec_func_config, 1); + //need restore all logical address if (cec_dev->cec_num > ENABLE_ONE_CEC) cec_restore_logical_addr(CEC_B, cec_dev->cec_info.addr_enable); @@ -3777,8 +3779,6 @@ static int aml_cec_probe(struct platform_device *pdev) /* irq set */ cec_irq_enable(false); - /* default enable all function*/ - cec_config(CEC_FUNC_CFG_ALL, 1); /* for init */ cec_pre_init(); diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index f2b0eb748b9f..e9ff626fa46f 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -5362,6 +5362,7 @@ static int __init hdmitx_boot_para_setup(char *s) char *token; unsigned int token_len = 0; unsigned int token_offset = 0; + unsigned long list; unsigned int offset = 0; int size = strlen(s); @@ -5374,6 +5375,12 @@ static int __init hdmitx_boot_para_setup(char *s) if ((token_len == 3) && (strncmp(token, "off", token_len) == 0)) { init_flag |= INIT_FLAG_NOT_LOAD; + } else if (strncmp(token, "cec", 3) == 0) { + kstrtoul(token+3, 16, &list); + if ((list >= 0) && (list <= 0xff)) + hdmitx_device.cec_func_config = list; + pr_info("HDMI hdmi_cec_func_config:0x%x\n", + hdmitx_device.cec_func_config); } check_hdmiuboot_attr(token); } diff --git a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h index 0ae433ac54ea..58261d6fc369 100644 --- a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h +++ b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h @@ -478,6 +478,7 @@ struct hdmitx_dev { unsigned int cedst_en:1; /* configure in DTS */ unsigned int hdr_priority:1; unsigned int drm_feature;/*Direct Rander Management*/ + unsigned int cec_func_config; }; #define CMD_DDC_OFFSET (0x10 << 24)