dolby: fix 5008 crc error [1/1]

PD#SWPL-10487

Problem:
1.tb39 new case 5008, dm version is 3,
core3 raw_metadata overflow
2.core3 raw_metadata 207 overwrite core3 clkgate_ctrl
and core3 swap_ctrl0 andsawp_ctrl1 reg.

Solution:
1.Increase raw_metadata size to 512
2.Force dv_mode to DOLBY_VISION_OUTPUT_MODE_IPT, output
ipt444 12bit for 5008.
3.Dont set core3 metadata reg when scramble disabled or
metedata size > 204

Verify:
verified on sm1

Change-Id: I459736eb42eb14fe3fe0dc054eb6693c88967741
Signed-off-by: yao liu <yao.liu@amlogic.com>
This commit is contained in:
yao liu
2019-06-28 10:07:23 +08:00
committed by Chris KIM
parent 197b26c8a4
commit c3c23ba99a
2 changed files with 26 additions and 13 deletions

View File

@@ -2407,19 +2407,30 @@ static int dolby_core3_set(
p_core3_dm_regs[i]);
/* from addr 0x18 */
count = md_count;
for (i = 0; i < count; i++) {
if (scramble_en) {
if (md_count > 204) {
pr_dolby_error("core3 metadata size %d > 204 !\n",
md_count);
} else {
count = md_count;
for (i = 0; i < count; i++) {
#ifdef FORCE_HDMI_META
if ((i == 20) && (p_core3_md_regs[i] == 0x5140a3e))
VSYNC_WR_DV_REG(DOLBY_CORE3_REG_START + 0x24 + i,
(p_core3_md_regs[i] & 0xffffff00) | 0x80);
else
if ((i == 20) &&
(p_core3_md_regs[i] == 0x5140a3e))
VSYNC_WR_DV_REG(
DOLBY_CORE3_REG_START + 0x24 + i,
(p_core3_md_regs[i] &
0xffffff00) | 0x80);
else
#endif
VSYNC_WR_DV_REG(DOLBY_CORE3_REG_START + 0x24 + i,
p_core3_md_regs[i]);
VSYNC_WR_DV_REG(DOLBY_CORE3_REG_START +
0x24 + i, p_core3_md_regs[i]);
}
for (; i < 30; i++)
VSYNC_WR_DV_REG(DOLBY_CORE3_REG_START +
0x24 + i, 0);
}
}
for (; i < 30; i++)
VSYNC_WR_DV_REG(DOLBY_CORE3_REG_START + 0x24 + i, 0);
/* from addr 0x90 */
/* core3 metadata program done */
@@ -5229,10 +5240,12 @@ int dolby_vision_parse_metadata(
&src_format,
&ret_flags);
if (ret_flags && req.dv_enhance_exist
&& (frame_count == 0))
&& (frame_count == 0)) {
vf_notify_provider_by_name("dvbldec",
VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL,
(void *)&req);
pr_info("bypass mel\n");
}
if (ret_flags == 1) {
mel_flag = true;
}
@@ -5418,7 +5431,7 @@ int dolby_vision_parse_metadata(
&current_mode, check_format)) {
if (!dolby_vision_wait_init)
dolby_vision_set_toggle_flag(1);
pr_dolby_dbg("[dolby_vision_parse_metadata] output change from %d to %d\n",
pr_info("[dolby_vision_parse_metadata] output change from %d to %d\n",
dolby_vision_mode, current_mode);
dolby_vision_mode = current_mode;
if (is_dolby_vision_stb_mode())

View File

@@ -359,7 +359,7 @@ struct dm_lut_ipcore_s {
/** @brief hdmi metadata for IPCORE 3 */
struct md_reister_ipcore_3_s {
uint32_t raw_metadata[128];
uint32_t raw_metadata[512];
uint32_t size;
};