vdec: fix parser permision rights confusion [1/1]
authorapollo.ling <apollo.ling@amlogic.com>
Fri, 24 Jul 2020 11:45:00 +0000 (19:45 +0800)
committerApollo Ling <apollo.ling@amlogic.com>
Mon, 3 Aug 2020 05:47:33 +0000 (22:47 -0700)
PD#SWPL-29762

Problem:
When secure and non secure mode at the same time,persion rights conflicted

Solution:
correct the parser permision rights confusion.

Verify:
u215

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

index ff91179cc3c17734d85872f85419adf4030f4014..537092703e96aaeb11a1a0fc2bedb8f89bf112c3 100644 (file)
@@ -3114,9 +3114,9 @@ void vdec_prepare_run(struct vdec_s *vdec, unsigned long mask)
        if (!vdec_core_with_input(mask))
                return;
 
-       if (secure && vdec_stream_based(vdec) && force_nosecure_even_drm)
+       if (vdec_stream_based(vdec) && !vdec_secure(vdec))
        {
-               secure = 0;
+               tee_config_device_secure(DMC_DEV_ID_PARSER, 0);
        }
        if (input->target == VDEC_INPUT_TARGET_VLD)
                tee_config_device_secure(DMC_DEV_ID_VDEC, secure);