From 3ed1ed03b6c9c2e16189aa2d0dfb20c069061456 Mon Sep 17 00:00:00 2001 From: xindong.xu Date: Fri, 09 Mar 2018 11:14:14 +0000 Subject: Merge "cec: add cec version define in dts & cts 9.3" into amlogic-4.9-dev --- diff --git a/arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts b/arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts index 0182b36..f84243c 100644 --- a/arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts +++ b/arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts @@ -630,7 +630,7 @@ status = "okay"; vendor_id = <0x000000>; cec_osd_string = "MBox"; /* Max Chars: 14 */ - cec_version = <6>; /* 5: 1.4, 6: 2.0 */ + cec_version = <5>; /* 5: 1.4, 6: 2.0 */ port_num = <1>; arc_port_mask = <0x0>; interrupts = <0 199 1>; diff --git a/arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts b/arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts index cc9e30d..7d33297 100644 --- a/arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts +++ b/arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts @@ -727,7 +727,7 @@ status = "okay"; vendor_id = <0x000000>; cec_osd_string = "MBox"; /* Max Chars: 14 */ - cec_version = <6>; /* 5: 1.4, 6: 2.0 */ + cec_version = <5>; /* 5: 1.4, 6: 2.0 */ port_num = <1>; arc_port_mask = <0x0>; interrupts = <0 199 1>; diff --git a/arch/arm64/boot/dts/amlogic/gxl_p231_1g.dts b/arch/arm64/boot/dts/amlogic/gxl_p231_1g.dts index 6730a2e..0134f74 100644 --- a/arch/arm64/boot/dts/amlogic/gxl_p231_1g.dts +++ b/arch/arm64/boot/dts/amlogic/gxl_p231_1g.dts @@ -643,7 +643,7 @@ status = "okay"; vendor_id = <0x000000>; cec_osd_string = "MBox"; /* Max Chars: 14 */ - cec_version = <6>; /* 5: 1.4, 6: 2.0 */ + cec_version = <5>; /* 5: 1.4, 6: 2.0 */ port_num = <1>; arc_port_mask = <0x0>; interrupts = <0 199 1>; diff --git a/arch/arm64/boot/dts/amlogic/gxl_p231_2g.dts b/arch/arm64/boot/dts/amlogic/gxl_p231_2g.dts index 42b48db..cc3599f 100644 --- a/arch/arm64/boot/dts/amlogic/gxl_p231_2g.dts +++ b/arch/arm64/boot/dts/amlogic/gxl_p231_2g.dts @@ -643,7 +643,7 @@ status = "okay"; vendor_id = <0x000000>; cec_osd_string = "MBox"; /* Max Chars: 14 */ - cec_version = <6>; /* 5: 1.4, 6: 2.0 */ + cec_version = <5>; /* 5: 1.4, 6: 2.0 */ port_num = <1>; arc_port_mask = <0x0>; interrupts = <0 199 1>; diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index aa2b4fe..e2245f7 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -775,10 +775,20 @@ static inline bool is_feature_abort_msg(const unsigned char *msg, int len) return false; } +static inline bool is_report_phy_addr_msg(const unsigned char *msg, int len) +{ + if (!msg || len < 4) + return false; + if (msg[1] == CEC_OC_REPORT_PHYSICAL_ADDRESS) + return true; + return false; +} + static bool need_nack_repeat_msg(const unsigned char *msg, int len, int t) { if (len == last_cec_msg->len && - (is_poll_message(msg[0]) || is_feature_abort_msg(msg, len)) && + (is_poll_message(msg[0]) || is_feature_abort_msg(msg, len) || + is_report_phy_addr_msg(msg, len)) && last_cec_msg->last_result == CEC_FAIL_NACK && jiffies - last_cec_msg->last_jiffies < t) { return true; @@ -1039,7 +1049,7 @@ int cec_ll_tx(const unsigned char *msg, unsigned char len) mutex_lock(&cec_dev->cec_mutex); /* make sure we got valid physical address */ if (len >= 2 && msg[1] == CEC_OC_REPORT_PHYSICAL_ADDRESS) - check_physical_addr_valid(20); + check_physical_addr_valid(3); try_again: reinit_completion(&cec_dev->tx_ok); diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index ef1182a..c173cec 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -18,7 +18,7 @@ #ifndef __AO_CEC_H__ #define __AO_CEC_H__ -#define CEC_DRIVER_VERSION "2018/02/05\n" +#define CEC_DRIVER_VERSION "2018/02/22\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec" -- cgit