vdec: force vdec status to VDEC_STATUS_CONNECTED when disconnect timeout [1/1]
authorapollo.ling <apollo.ling@amlogic.com>
Sat, 4 Jul 2020 10:19:50 +0000 (18:19 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Wed, 8 Jul 2020 05:19:34 +0000 (22:19 -0700)
PD#SWPL-28414

Problem:
vdec_disconnect timeout,vdec can not be removed from connected list

Solution:
force vdec status to VDEC_STATUS_CONNECTED when disconnect timeout

Verify:
S905C1-AC232

Change-Id: I53053b794dc669923d0d4809dc909c7654614010
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
drivers/frame_provider/decoder/utils/vdec.c

index ee17be0dce29d11b836c3bcdc1e7c2563b4d2c44..32b7b15af9316b0923bab629eae37fa881056ceb 100644 (file)
@@ -2160,7 +2160,8 @@ int vdec_disconnect(struct vdec_s *vdec)
 
        return 0;
 discon_timeout:
-       pr_err("%s timeout!!! status: 0x%x\n", __func__, vdec->status);
+       pr_err("%s timeout!!! status: 0x%x force it to 2\n", __func__, vdec->status);
+       vdec_set_status(vdec, VDEC_STATUS_CONNECTED);
        return 0;
 }
 EXPORT_SYMBOL(vdec_disconnect);