From bb5972904221edc0baf2bf4b99a3d21d373a000e Mon Sep 17 00:00:00 2001 From: Lei Qian Date: Mon, 20 May 2019 18:10:05 +0800 Subject: [PATCH] Revert "hdmirp: enable CEC physical address passing for non-repeater mode [1/4]" This reverts commit 92d3423bdb6eabe309f662b6c25fd2e4006f9c1f. --- .../media/vin/tvin/hdmirx/hdmi_rx_drv.h | 2 +- .../media/vin/tvin/hdmirx/hdmi_rx_edid.c | 13 ---------- .../media/vin/tvin/hdmirx/hdmi_rx_edid.h | 6 ----- .../media/vin/tvin/hdmirx/hdmi_rx_repeater.c | 7 ++++- .../media/vin/tvin/hdmirx/hdmi_rx_repeater.h | 1 - .../media/vin/tvin/hdmirx/hdmi_rx_wrapper.c | 26 ++----------------- .../vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c | 18 +++++++------ 7 files changed, 19 insertions(+), 54 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h index 943a97b90801..ad8c8ce9b8f0 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -34,7 +34,7 @@ #include "hdmi_rx_edid.h" -#define RX_VER0 "ver.2019-05-07" +#define RX_VER0 "ver.2019-05-01" /* * * diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.c index 91ba1ee59788..6fcf4cc58206 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.c @@ -2716,16 +2716,3 @@ int rx_set_hdr_lumi(unsigned char *data, int len) } EXPORT_SYMBOL(rx_set_hdr_lumi); -void rx_edid_physical_addr(int a, int b, int c, int d) -{ - tx_hpd_event = E_RCV; - up_phy_addr = ((d & 0xf) << 12) | - ((c & 0xf) << 8) | - ((b & 0xf) << 4) | - ((a & 0xf) << 0); - - /* if (log_level & EDID_LOG) */ - rx_pr("\nup_phy_addr = %x\n", up_phy_addr); -} -EXPORT_SYMBOL(rx_edid_physical_addr); - diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.h index 9a3d43f53c76..134f7008840a 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_edid.h @@ -434,12 +434,6 @@ struct edid_data_s { unsigned int checksum; }; -enum tx_hpd_event_e { - E_IDLE = 0, - E_EXE = 1, - E_RCV = 2, -}; - enum hdmi_vic_e { /* Refer to CEA 861-D */ HDMI_UNKNOWN = 0, diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c index 155d5ca8837f..e3a1e3d765f9 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c @@ -47,7 +47,6 @@ static unsigned char receive_edid[MAX_RECEIVE_EDID]; int receive_edid_len = MAX_RECEIVE_EDID; MODULE_PARM_DESC(receive_edid, "\n receive_edid\n"); module_param_array(receive_edid, byte, &receive_edid_len, 0664); -int tx_hpd_event; int edid_len; MODULE_PARM_DESC(edid_len, "\n edid_len\n"); module_param(edid_len, int, 0664); @@ -371,3 +370,9 @@ void rx_repeat_hpd_state(bool plug) } EXPORT_SYMBOL(rx_repeat_hpd_state); +void rx_edid_physical_addr(int a, int b, int c, int d) +{ +} +EXPORT_SYMBOL(rx_edid_physical_addr); + + diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.h index 7426848500f4..da190fb404e2 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.h @@ -63,7 +63,6 @@ struct hdcp_hw_info_s { }; extern int receive_edid_len; -extern int tx_hpd_event; extern bool new_edid; extern int hdcp_array_len; extern int hdcp_len; diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c index 658e756f26b4..d8c5841a57ef 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c @@ -2212,7 +2212,7 @@ void rx_main_state_machine(void) } else if (rx.err_rec_mode == ERR_REC_HPD_RST) { rx_set_cur_hpd(0); rx.phy.cable_clk = 0; - rx.state = FSM_INIT; + rx.state = FSM_HPD_HIGH; rx.err_rec_mode = ERR_REC_EQ_RETRY; } rx_set_eq_run_state(E_EQ_START); @@ -2306,7 +2306,7 @@ void rx_main_state_machine(void) } else if (rx.err_rec_mode == ERR_REC_HPD_RST) { rx_set_cur_hpd(0); rx.phy.cable_clk = 0; - rx.state = FSM_INIT; + rx.state = FSM_HPD_HIGH; rx.err_rec_mode = ERR_REC_EQ_RETRY; } } @@ -2935,34 +2935,12 @@ int hdmirx_debug(const char *buf, int size) return 0; } -void rx_dw_edid_monitor(void) -{ - if (!hdmi_cec_en) - return; - if (tx_hpd_event == E_RCV) { - if (rx.open_fg) - fsm_restart(); - rx_set_port_hpd(ALL_PORTS, 0); - hdmi_rx_top_edid_update(); - hpd_wait_cnt = 0; - tx_hpd_event = E_EXE; - } else if (tx_hpd_event == E_EXE) { - if (!rx.open_fg) - hpd_wait_cnt++; - if (!rx_hpd_keep_low()) { - rx_set_port_hpd(ALL_PORTS, 1); - tx_hpd_event = E_IDLE; - } - } -} - void hdmirx_timer_handler(unsigned long arg) { struct hdmirx_dev_s *devp = (struct hdmirx_dev_s *)arg; rx_5v_monitor(); rx_check_repeat(); - rx_dw_edid_monitor(); if (rx.open_fg) { rx_nosig_monitor(); if (!hdmirx_repeat_support() || !rx.firm_change) { diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c index c87fe54fbd24..ece6fd294b50 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c @@ -305,14 +305,16 @@ int Edid_Parse_check_HDMI_VSDB(struct hdmitx_dev *hdev, } set_vsdb_phy_addr(hdev, &info->vsdb_phy_addr, &buff[BlockAddr]); - if ((check_fbc_special(&hdev->EDID_buf[0])) || - (check_fbc_special(&hdev->EDID_buf1[0]))) - rx_edid_physical_addr(0, 0, 0, 0); - else - rx_edid_physical_addr(info->vsdb_phy_addr.a, - info->vsdb_phy_addr.b, - info->vsdb_phy_addr.c, - info->vsdb_phy_addr.d); + if (hdev->repeater_tx) { + if ((check_fbc_special(&hdev->EDID_buf[0])) || + (check_fbc_special(&hdev->EDID_buf1[0]))) + rx_edid_physical_addr(0, 0, 0, 0); + else + rx_edid_physical_addr(info->vsdb_phy_addr.a, + info->vsdb_phy_addr.b, + info->vsdb_phy_addr.c, + info->vsdb_phy_addr.d); + } if (temp_addr >= VSpecificBoundary) ret = -1;