Skip to content

Commit

Permalink
BACKPORT: cec: wake up on CEC_OC_ROUTING_INFORMATION
Browse files Browse the repository at this point in the history
Change-Id: Ia00c6fd0f3471b66f4370c7f2659900c94554b1e
  • Loading branch information
Portisch authored and tobetter committed May 3, 2020
1 parent 47fb8f9 commit dee7956
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void cec_routing_change(void)
{
unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
cec_dbg_print(", phy_addr_ab:0x", phy_addr_ab);
cec_dbg_print("0x80, phy_addr_ab:0x", phy_addr_ab);
cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
cec_dbg_print(", msg[4]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[4]);
cec_dbg_print(", msg[5]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[5]);
Expand All @@ -467,6 +467,26 @@ void cec_routing_change(void)
}
}

static void cec_routing_information(void)
{
unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
cec_dbg_print("0x81, phy_addr_ab:0x", phy_addr_ab);
cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
cec_dbg_print(", msg[2]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[2]);
cec_dbg_print(", msg[3]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[3]);
cec_dbg_prints("\n");

if ((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) {
if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
/* wake up if routing destination is self */
if ((phy_addr_ab == cec_msg.buf[cec_msg.rx_read_pos].msg[2]) &&
(phy_addr_cd == cec_msg.buf[cec_msg.rx_read_pos].msg[3]))
cec_msg.cec_power = 0x1;
}
}
}

static void cec_device_vendor_id(void)
{
unsigned char msg[5];
Expand Down Expand Up @@ -591,6 +611,9 @@ static unsigned int cec_handle_message(void)
case CEC_OC_ROUTING_CHANGE:
cec_routing_change();
break;
case CEC_OC_ROUTING_INFORMATION:
cec_routing_information();
break;
case CEC_OC_GIVE_DEVICE_POWER_STATUS:
cec_report_device_power_status(source);
break;
Expand Down

0 comments on commit dee7956

Please sign in to comment.