media_module: fixed avs bus lock issue [1/1]
authorPeng yixin <yixin.peng@amlogic.com>
Thu, 3 Sep 2020 02:19:54 +0000 (10:19 +0800)
committerYixin Peng <yixin.peng@amlogic.com>
Fri, 4 Sep 2020 02:07:42 +0000 (19:07 -0700)
PD#SWPL-32609

Problem:
Sometimes the avs decoder driver remove,
the hardware did not stop completely, causing bus
lock issue.

Solution:
Resolve this problem by reset the
decoder hardware to stop it when avs driver remove.

Verify:
AB311

Change-Id: I79a83068e6cd83134e2430aee4c0a8f32a440436
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
drivers/frame_provider/decoder/avs/avs.c

index 3dfc79924697c568822c8524e946a7c3d85341b3..ab9fa701503d196eb22f6937a7e239f08315df3e 100644 (file)
@@ -1813,6 +1813,8 @@ static int amvdec_avs_remove(struct platform_device *pdev)
 
 
        amvdec_disable();
+       if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_TM2)
+               vdec_reset_core(NULL);
        pic_type = 0;
        if (mm_blk_handle) {
                decoder_bmmu_box_free(mm_blk_handle);