From f2c3099fadc315f36e9975ce41c580651a7ea852 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Wed, 28 Feb 2018 10:47:08 +0800 Subject: [PATCH] media_module: fix vmh264 mosaic issue PD#160726 for longtime run, some stream error might cause pic_dc hardware in wrong state, it can't be recovery, so this hardware module need to be reset at beginning of decoding slice. mosaic issue will be gone Change-Id: I850ecfc08b45a66e15ce9a41dbf1d550fe55f640 Signed-off-by: Hui Zhang --- .../media_modules/frame_provider/decoder/h264_multi/vmh264.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c index d8b6b86bfdee..327e562841b9 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c @@ -4357,6 +4357,9 @@ static int vh264_hw_ctx_restore(struct vdec_h264_hw_s *hw) SET_VREG_MASK(MDEC_PIC_DC_CTRL, 1<<17); #endif + SET_VREG_MASK(MDEC_PIC_DC_CTRL, 0xbf << 24); + CLEAR_VREG_MASK(MDEC_PIC_DC_CTRL, 0xbf << 24); + #if 1 /* #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8 */ /* pr_info("vh264 meson8 prot init\n"); */ WRITE_VREG(MDEC_PIC_DC_THRESH, 0x404038aa);