mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
hdmirp: enable CEC physical address passing for non-repeater mode [1/4]
PD#SWPL-6988 Problem: Lack CEC physical address passing Solution: Pass CEC address from Tx to Rx in kernel Verify: T962X3 Change-Id: I67952d040478c0068e3f0ed777ecf40410a7767d Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com> Signed-off-by: Lei Yang <lei.yang@amlogic.com>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
#include "hdmi_rx_edid.h"
|
||||
|
||||
|
||||
#define RX_VER0 "ver.2019-05-01"
|
||||
#define RX_VER0 "ver.2019-05-07"
|
||||
/*
|
||||
*
|
||||
*
|
||||
|
||||
@@ -2716,3 +2716,16 @@ 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);
|
||||
|
||||
|
||||
@@ -434,6 +434,12 @@ 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,
|
||||
|
||||
@@ -47,6 +47,7 @@ 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);
|
||||
@@ -370,9 +371,3 @@ 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);
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ 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;
|
||||
|
||||
@@ -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_HPD_HIGH;
|
||||
rx.state = FSM_INIT;
|
||||
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_HPD_HIGH;
|
||||
rx.state = FSM_INIT;
|
||||
rx.err_rec_mode = ERR_REC_EQ_RETRY;
|
||||
}
|
||||
}
|
||||
@@ -2935,12 +2935,34 @@ 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) {
|
||||
|
||||
@@ -305,16 +305,14 @@ int Edid_Parse_check_HDMI_VSDB(struct hdmitx_dev *hdev,
|
||||
}
|
||||
|
||||
set_vsdb_phy_addr(hdev, &info->vsdb_phy_addr, &buff[BlockAddr]);
|
||||
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 ((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;
|
||||
|
||||
Reference in New Issue
Block a user