h264: T5 small window playback abnormally [1/1]
authorPeng Yixin <yixin.peng@amlogic.com>
Tue, 3 Nov 2020 11:37:47 +0000 (19:37 +0800)
committerYixin Peng <yixin.peng@amlogic.com>
Thu, 5 Nov 2020 07:47:30 +0000 (00:47 -0700)
PD#SWPL-36213

Problem:
Because 4K 264 used dw0, there is no YUV output buffer,
result this problem.

Solution:
T5 set default double write 3 to resolve this issue

Verify:
T5

Change-Id: I6e8b8de4fc5a1c9089ce0ff270443d014d522df7
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c

index bfdf4f4c8d663559a0ee4a65785ca4178ee950be..b40051fde185194c332189d3321d1bfda8522f6e 100644 (file)
@@ -9938,6 +9938,9 @@ static int ammvdec_h264_probe(struct platform_device *pdev)
        } else
                hw->double_write_mode = double_write_mode;
 
+       if (get_cpu_major_id() == AM_MESON_CPU_MAJOR_ID_T5)
+               hw->double_write_mode = 3;
+
        if (force_config_fence) {
                hw->enable_fence = true;
                hw->fence_usage = (force_config_fence >> 4) & 0xf;
@@ -9959,8 +9962,10 @@ static int ammvdec_h264_probe(struct platform_device *pdev)
                        hw->canvas_mode = pdata->canvas_mode;
        }
 
-       if (hw->mmu_enable)
+       if (hw->mmu_enable) {
+                       hw->canvas_mode = CANVAS_BLKMODE_LINEAR;
                        hw->double_write_mode &= 0xffff;
+       }
 
        if (pdata->parallel_dec == 1) {
                int i;