hdmirx: fix deadlock issue

PD#164867: fix deadlock issue

Revert "hdmirx: add new atmos edid handle method"

This reverts commit 6bf27f9a5a.

Change-Id: Ica0d99c9b4b3f05ccb86c85693c5cc4d2871bd7a
Signed-off-by: Lei Qian <lei.qian@amlogic.com>
This commit is contained in:
Lei Qian
2018-05-10 21:17:58 +08:00
parent 9eef6844fe
commit bf91668e9c
4 changed files with 22 additions and 78 deletions

View File

@@ -34,7 +34,7 @@
//#include "hdmi_rx_edid.h"
#define RX_VER0 "ver.2018-05-04"
#define RX_VER0 "ver.2018-04-24"
/*
*
*

View File

@@ -36,7 +36,7 @@
#include "hdmi_rx_hw.h"
static unsigned char edid_temp[EDID_SIZE];
static char edid_buf[MAX_EDID_BUF_SIZE] = {0x0};
static char edid_buf[MAX_EDID_BUF_SIZE];
static int edid_size;
struct edid_data_s tmp_edid_data;
int arc_port_id;
@@ -52,13 +52,6 @@ bool new_hdr_lum;
MODULE_PARM_DESC(new_hdr_lum, "\n new_hdr_lum\n");
module_param(new_hdr_lum, bool, 0664);
/*
* 1:reset hpd after atmos edid update
* 0:not reset hpd after atmos edid update
*/
bool atmos_edid_update_hpd_en = 1;
/* hdmi1.4 edid */
static unsigned char edid_14[] = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
@@ -382,35 +375,19 @@ unsigned char *edid_list[] = {
unsigned char rx_get_edid_index(void)
{
/* if ((edid_mode == 0) && */
/* edid_size > 4 && */
/* edid_buf[0] == 'E' && */
/* edid_buf[1] == 'D' && */
/* edid_buf[2] == 'I' && */
/* edid_buf[3] == 'D') { */
/* rx_pr("edid: use Top edid\n"); */
/* return EDID_LIST_BUFF; */
/* } else { */
/* if (edid_mode == 0) */
/* return EDID_LIST_14; */
/* else if (edid_mode < EDID_LIST_NUM) */
/* return edid_mode; */
/* else */
/* return EDID_LIST_14; */
/* } */
if ((edid_mode < EDID_LIST_NUM) &&
(edid_mode > EDID_LIST_BUFF))
return edid_mode;
else {
if ((edid_mode == 0) &&
edid_size > 4 &&
edid_buf[0] == 'E' &&
edid_buf[1] == 'D' &&
edid_buf[2] == 'I' &&
edid_buf[3] == 'D')
if (edid_mode == 0) {
if ((edid_buf[0] == 'E') &&
(edid_buf[1] == 'D') &&
(edid_buf[2] == 'I') &&
(edid_buf[3] == 'D')) {
rx_pr("edid: use Top edid\n");
return EDID_LIST_BUFF;
}
return EDID_LIST_BUFF;
} else
return EDID_LIST_14;
} else if (edid_mode < EDID_LIST_NUM)
return edid_mode;
else
return EDID_LIST_14;
}
unsigned char *rx_get_edid_buffer(unsigned char index)
@@ -719,10 +696,9 @@ unsigned char rx_parse_arc_aud_type(const unsigned char *buff)
((aud_data & 0xff) == 1)) {
if (!need_support_atmos_bit) {
need_support_atmos_bit = true;
hdmi_rx_top_edid_update();
if (rx.open_fg) {
if (atmos_edid_update_hpd_en)
rx_send_hpd_pulse();
hdmi_rx_top_edid_update();
rx_send_hpd_pulse();
rx_pr("*update edid-atmos*\n");
} else
pre_port = 0xff;
@@ -730,10 +706,9 @@ unsigned char rx_parse_arc_aud_type(const unsigned char *buff)
} else {
if (need_support_atmos_bit) {
need_support_atmos_bit = false;
hdmi_rx_top_edid_update();
if (rx.open_fg) {
if (atmos_edid_update_hpd_en)
rx_send_hpd_pulse();
hdmi_rx_top_edid_update();
rx_send_hpd_pulse();
rx_pr("*update edid-no atmos*\n");
} else
pre_port = 0xff;
@@ -743,30 +718,6 @@ unsigned char rx_parse_arc_aud_type(const unsigned char *buff)
return 0;
}
/*
* audio parse the atmos info and inform hdmirx via a flag
*/
void rx_set_atmos_flag(bool en)
{
if (need_support_atmos_bit != en) {
need_support_atmos_bit = en;
hdmi_rx_top_edid_update();
if (rx.open_fg) {
if (atmos_edid_update_hpd_en)
rx_send_hpd_pulse();
rx_pr("*update edid-atmos*\n");
} else
pre_port = 0xff;
}
}
EXPORT_SYMBOL(rx_set_atmos_flag);
bool rx_get_atmos_flag(void)
{
return need_support_atmos_bit;
}
EXPORT_SYMBOL(rx_get_atmos_flag);
unsigned char get_atmos_offset(unsigned char *p_edid)
{
unsigned char max_offset = 0;
@@ -804,10 +755,7 @@ unsigned char rx_edid_update_atmos(unsigned char *p_edid)
if (offset == 0)
rx_pr("can not find atmos info\n");
else {
if (need_support_atmos_bit)
p_edid[offset] = 1;
else
p_edid[offset] = 0;
p_edid[offset] = 1;
rx_pr("offset = %d\n", offset);
}
return 0;
@@ -835,8 +783,8 @@ unsigned int hdmi_rx_top_edid_update(void)
rx_get_edid_size(edid_index));
}
/* if (need_support_atmos_bit) */
rx_edid_update_atmos(pedid_data);
if (need_support_atmos_bit)
rx_edid_update_atmos(pedid_data);
/* caculate physical address and checksum */
sts = rx_edid_cal_phy_addr(brepeat,

View File

@@ -17,7 +17,7 @@
#define EDID_SIZE 256
#define EDID_HDR_SIZE 7
#define MAX_EDID_BUF_SIZE (256+4)
#define MAX_EDID_BUF_SIZE 512
#define MAX_HDR_LUMI 3
/* CEA861F Table 44~46 CEA data block tag code*/
@@ -534,7 +534,6 @@ enum hdmi_vic_e {
extern int edid_mode;
extern int port_map;
extern bool new_hdr_lum;
extern bool atmos_edid_update_hpd_en;
int rx_set_hdr_lumi(unsigned char *data, int len);
void rx_edid_physical_addr(int a, int b, int c, int d);
unsigned char rx_parse_arc_aud_type(const unsigned char *buff);

View File

@@ -1518,8 +1518,6 @@ int rx_set_global_variable(const char *buf, int size)
if (set_pr_var(tmpbuf, sig_unstable_reset_hpd_max, value, &index, ret))
return pr_var(sig_unstable_reset_hpd_max, index);
#endif
if (set_pr_var(tmpbuf, atmos_edid_update_hpd_en, value, &index, ret))
return pr_var(atmos_edid_update_hpd_en, index);
if (set_pr_var(tmpbuf, suspend_pddq_sel, value, &index, ret))
return pr_var(suspend_pddq_sel, index);
if (set_pr_var(tmpbuf, aud_ch_map, value, &index, ret))
@@ -1620,7 +1618,6 @@ void rx_get_global_variable(const char *buf)
pr_var(enable_hpd_reset, i++);
pr_var(sig_unstable_reset_hpd_max, i++);
#endif
pr_var(atmos_edid_update_hpd_en, i++);
pr_var(suspend_pddq_sel, i++);
pr_var(aud_ch_map, i++);
}