mmpeg2: fix 0 address crash issue [1/1]
authorHui Zhang <hui.zhang@amlogic.com>
Mon, 25 May 2020 16:51:48 +0000 (00:51 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Mon, 25 May 2020 17:14:03 +0000 (01:14 +0800)
PD#SWPL-25585

Problem:
this issue is introduced by gerrit 110569
0 memory address been polluted by lmem hw.

Solution:
add the missed DMA address config in canvas
init

Verify:
ac214

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: I12e276be5d3fee1fd9043215507981a3412e6d42

drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c

index d53788ecdf28f3691aaf115877a7fb3bfc232db0..4e3ffcde6506117068bf1e4f42e5fe7f88712bec 100644 (file)
@@ -2438,7 +2438,8 @@ static void vmpeg12_canvas_init(struct vdec_mpeg12_hw_s *hw)
                                pr_err("%s: failed to alloc cc buffer\n", __func__);
                                return;
                        }
-
+                       hw->buf_start = decbuf_start;
+                       WRITE_VREG(MREG_CO_MV_START, hw->buf_start);
                        WRITE_VREG(MREG_CC_ADDR, hw->ccbuf_phyAddress);
                } else {
                        if (vdec->parallel_dec == 1) {