osd: afbc decode error when write afbc start before afbc reset [1/1]

PD#SWPL-4016

Problem:
afbc decode error when write afbc start before afbc reset reg

Solution:
replace invalid reg when found afbc start before afbc reset reg

Verify:
test pass on franklin

Change-Id: Ia01608fe4d5c6132d0b54e63c48560e9e77bfe0a
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
Pengcheng Chen
2019-01-11 17:40:36 +08:00
committed by Dongjin Kim
parent 0676e97324
commit bc54541d6e

View File

@@ -405,6 +405,17 @@ static inline int wrtie_reg_internal(u32 addr, u32 val)
/* TODO remove the Done write operation to save the time */
request_item.addr = OSD_RDMA_FLAG_REG;
request_item.val = OSD_RDMA_STATUS_MARK_TBL_DONE;
/* afbc start before afbc reset will cause afbc decode error */
if (addr == VIU_SW_RESET) {
int i = 0;
for (i = 0; i < item_count; i++) {
if (rdma_table[i].addr == VPU_MAFBC_COMMAND) {
rdma_table[i].addr = VIU_OSD1_TEST_RDDATA;
rdma_table[i].val = 0x0;
}
}
}
osd_rdma_mem_cpy(
&rdma_table[item_count],
&request_item, 8);