From: Pengcheng Chen Date: Fri, 11 Jan 2019 09:40:36 +0000 (+0800) Subject: osd: afbc decode error when write afbc start before afbc reset [1/1] X-Git-Tag: khadas-vims-v0.9.6-release~961 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab40f4336cf6e6467ba1c4d1c089e608783455dc;p=platform%2Fkernel%2Flinux-amlogic.git 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 --- diff --git a/drivers/amlogic/media/osd/osd_rdma.c b/drivers/amlogic/media/osd/osd_rdma.c index 15b2043..f1d08ca 100644 --- a/drivers/amlogic/media/osd/osd_rdma.c +++ b/drivers/amlogic/media/osd/osd_rdma.c @@ -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);