Merge "msm: mdss: hdmi: parse extended EDID block map"
This commit is contained in:
commit
1569dc4f6c
1 changed files with 32 additions and 21 deletions
|
@ -2290,6 +2290,7 @@ int hdmi_edid_parser(void *input)
|
||||||
u16 ieee_reg_id;
|
u16 ieee_reg_id;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
u32 i = 0;
|
u32 i = 0;
|
||||||
|
u32 cea_idx = 1;
|
||||||
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
|
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
|
||||||
|
|
||||||
if (!edid_ctrl) {
|
if (!edid_ctrl) {
|
||||||
|
@ -2316,7 +2317,7 @@ int hdmi_edid_parser(void *input)
|
||||||
|
|
||||||
/* EDID_CEA_EXTENSION_FLAG[0x7E] - CEC extension byte */
|
/* EDID_CEA_EXTENSION_FLAG[0x7E] - CEC extension byte */
|
||||||
num_of_cea_blocks = edid_buf[EDID_BLOCK_SIZE - 2];
|
num_of_cea_blocks = edid_buf[EDID_BLOCK_SIZE - 2];
|
||||||
DEV_DBG("%s: No. of CEA blocks is [%u]\n", __func__,
|
DEV_DBG("%s: No. of CEA/Extended EDID blocks is [%u]\n", __func__,
|
||||||
num_of_cea_blocks);
|
num_of_cea_blocks);
|
||||||
|
|
||||||
/* Find out any CEA extension blocks following block 0 */
|
/* Find out any CEA extension blocks following block 0 */
|
||||||
|
@ -2335,30 +2336,40 @@ int hdmi_edid_parser(void *input)
|
||||||
num_of_cea_blocks = MAX_EDID_BLOCKS - 1;
|
num_of_cea_blocks = MAX_EDID_BLOCKS - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for valid CEA block */
|
if (edid_buf[EDID_BLOCK_SIZE] == 0xF0) {
|
||||||
if (edid_buf[EDID_BLOCK_SIZE] != 2) {
|
DEV_DBG("%s: Extended EDID Block Map found\n", __func__);
|
||||||
DEV_ERR("%s: Invalid CEA block\n", __func__);
|
edid_buf += EDID_BLOCK_SIZE;
|
||||||
num_of_cea_blocks = 0;
|
cea_idx++;
|
||||||
goto bail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* goto to CEA extension edid block */
|
for (i = cea_idx; i <= num_of_cea_blocks; i++) {
|
||||||
edid_buf += EDID_BLOCK_SIZE;
|
|
||||||
|
|
||||||
ieee_reg_id = hdmi_edid_extract_ieee_reg_id(edid_ctrl, edid_buf);
|
/* check for valid CEA block */
|
||||||
DEV_DBG("%s: ieee_reg_id = 0x%08x\n", __func__, ieee_reg_id);
|
if (edid_buf[EDID_BLOCK_SIZE] != 2) {
|
||||||
if (ieee_reg_id == EDID_IEEE_REG_ID)
|
DEV_ERR("%s: Not a CEA block\n", __func__);
|
||||||
edid_ctrl->sink_mode = SINK_MODE_HDMI;
|
edid_buf += EDID_BLOCK_SIZE;
|
||||||
else
|
continue;
|
||||||
edid_ctrl->sink_mode = SINK_MODE_DVI;
|
}
|
||||||
|
|
||||||
hdmi_edid_extract_sink_caps(edid_ctrl, edid_buf);
|
/* goto to CEA extension edid block */
|
||||||
hdmi_edid_extract_latency_fields(edid_ctrl, edid_buf);
|
edid_buf += EDID_BLOCK_SIZE;
|
||||||
hdmi_edid_extract_dc(edid_ctrl, edid_buf);
|
|
||||||
hdmi_edid_extract_speaker_allocation_data(edid_ctrl, edid_buf);
|
ieee_reg_id = hdmi_edid_extract_ieee_reg_id(edid_ctrl,
|
||||||
hdmi_edid_extract_audio_data_blocks(edid_ctrl, edid_buf);
|
edid_buf);
|
||||||
hdmi_edid_extract_3d_present(edid_ctrl, edid_buf);
|
DEV_DBG("%s: ieee_reg_id = 0x%08x\n", __func__, ieee_reg_id);
|
||||||
hdmi_edid_extract_extended_data_blocks(edid_ctrl, edid_buf);
|
if (ieee_reg_id == EDID_IEEE_REG_ID)
|
||||||
|
edid_ctrl->sink_mode = SINK_MODE_HDMI;
|
||||||
|
else
|
||||||
|
edid_ctrl->sink_mode = SINK_MODE_DVI;
|
||||||
|
|
||||||
|
hdmi_edid_extract_sink_caps(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_latency_fields(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_dc(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_speaker_allocation_data(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_audio_data_blocks(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_3d_present(edid_ctrl, edid_buf);
|
||||||
|
hdmi_edid_extract_extended_data_blocks(edid_ctrl, edid_buf);
|
||||||
|
}
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
for (i = 1; i <= num_of_cea_blocks; i++) {
|
for (i = 1; i <= num_of_cea_blocks; i++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue