author | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2019-03-13 08:27:46 (GMT) |
---|---|---|
committer | Gerrit Code Review <gituser@droid04> | 2019-03-13 08:27:46 (GMT) |
commit | e8743d12d88c1afdbafacd57436f1a389ad527cb (patch) | |
tree | fa586bad5b2171ca605c53f6947a20ce4720b2d7 | |
parent | bc1d9e680740ede3ad37469c59e9e24f3ff12fc6 (diff) | |
parent | 086909a38ae320a0691463c1b157da21a91076bc (diff) | |
download | common-e8743d12d88c1afdbafacd57436f1a389ad527cb.zip common-e8743d12d88c1afdbafacd57436f1a389ad527cb.tar.gz common-e8743d12d88c1afdbafacd57436f1a389ad527cb.tar.bz2 |
Merge "hdmirx: add the phy addr update with tx hpd" into p-amlogic
4 files changed, 35 insertions, 13 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 fb37a2f..eae4f61 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -46,7 +46,7 @@ * * */ -#define RX_VER2 "ver.2018/09/06" +#define RX_VER2 "ver.2018/11/22" /*print type*/ #define LOG_EN 0x01 diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c index aeacfca..9a49ebe 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c @@ -38,6 +38,7 @@ #include <linux/arm-smccc.h> /* Local include */ +#include "hdmi_rx_repeater.h" #include "hdmi_rx_drv.h" #include "hdmi_rx_hw.h" #include "hdmi_rx_edid.h" @@ -1194,8 +1195,7 @@ void rx_hdcp14_config(const struct hdmi_rx_hdcp *hdcp) rx_pr("hdcp1.4 normal mode\n"); } if (rx.chip_id != CHIP_ID_TXHD) { - hdmirx_wr_bits_dwc(DWC_HDCP_RPT_CTRL, - REPEATER, hdcp->repeat ? 1 : 0); + rx_set_repeat_signal(hdcp->repeat); /* nothing attached downstream */ hdmirx_wr_dwc(DWC_HDCP_RPT_BSTATUS, 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 47bff53..b77f77c 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c @@ -102,8 +102,26 @@ bool hdmirx_is_key_write(void) void rx_check_repeat(void) { - if (!hdmirx_repeat_support()) + if (!hdmirx_repeat_support()) { + if (rx.hdcp.repeat != repeat_plug) { + rx.hdcp.repeat = repeat_plug; + if (!repeat_plug) { + memset(&receive_edid, 0, sizeof(receive_edid)); + up_phy_addr = 0; + new_edid = true; + } + if (rx.open_fg) + rx_set_cur_hpd(0); + } + + if (new_edid) { + hdmi_rx_top_edid_update(); + if (rx.open_fg) + rx_send_hpd_pulse(); + new_edid = 0; + } return; + } if (rx.hdcp.repeat != repeat_plug) { rx_set_repeat_signal(repeat_plug); @@ -301,8 +319,11 @@ bool rx_set_repeat_aksv(unsigned char *data, int len, int depth, void rx_set_repeat_signal(bool repeat) { - rx.hdcp.repeat = repeat; - hdmirx_wr_bits_dwc(DWC_HDCP_RPT_CTRL, REPEATER, repeat); + if (hdmirx_repeat_support()) { + rx.hdcp.repeat = repeat; + hdmirx_wr_bits_dwc(DWC_HDCP_RPT_CTRL, REPEATER, repeat); + } else + hdmirx_wr_bits_dwc(DWC_HDCP_RPT_CTRL, REPEATER, 0); } bool rx_set_receive_hdcp(unsigned char *data, int len, int depth, @@ -323,7 +344,8 @@ EXPORT_SYMBOL(rx_set_receive_hdcp); void rx_repeat_hpd_state(bool plug) { - repeat_plug = plug; + if (!hdmirx_repeat_support()) + repeat_plug = plug; } EXPORT_SYMBOL(rx_repeat_hpd_state); @@ -335,8 +357,11 @@ EXPORT_SYMBOL(rx_repeat_hdcp_ver); void rx_edid_physical_addr(int a, int b, int c, int d) { - up_phy_addr = ((d & 0xf) << 12) | ((c & 0xf) << 8) | ((b & - 0xf) << 4) | (a & 0xf); + if (!hdmirx_repeat_support()) { + up_phy_addr = ((d & 0xf) << 12) | ((c & 0xf) << 8) | ((b & + 0xf) << 4) | (a & 0xf); + new_edid = true; + } } EXPORT_SYMBOL(rx_edid_physical_addr); 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 f6959ab..923ee51 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c @@ -1810,10 +1810,7 @@ void hdmirx_open_port(enum tvin_port_e port) //rx.wait_no_sig_cnt = 0; vic_check_en = true; dvi_check_en = true; - if (hdmirx_repeat_support()) - rx.hdcp.repeat = repeat_plug; - else - rx.hdcp.repeat = 0; + rx.hdcp.repeat = repeat_plug; if ((pre_port != rx.port) || (rx_get_cur_hpd_sts() == 0) || |