From: Peng Yixin Date: Tue, 3 Nov 2020 11:37:47 +0000 (+0800) Subject: h264: T5 small window playback abnormally [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=be4a9cbf3afc80df818419f731dc79551df6ca9d;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git h264: T5 small window playback abnormally [1/1] 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 --- diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index bfdf4f4..b40051f 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -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;