vdec: secure mustn't check data [1/1]
authoryuanfa.zhuang <yuanfa.zhuang@amlogic.com>
Fri, 8 Jan 2021 09:53:05 +0000 (17:53 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Sat, 9 Jan 2021 10:11:33 +0000 (02:11 -0800)
PD#SWPL-40788

Problem:
Secure access to catch data will crash

Solution:
Add conditions to allow dump data

Verify:
U21BQ-S905X2

Signed-off-by: yuanfa.zhuang <yuanfa.zhuang@amlogic.com>
Change-Id: Ie83985ebeaffd9d9c4ed96f20be7c17e724d657b

drivers/frame_provider/decoder/h265/vh265.c
drivers/frame_provider/decoder/vav1/vav1.c

index d59fae4369b5a4a8754bb9bdb040d703fd36951c..2c6a35e86f7f40eec7bfd90e84df91ae1bb8649b 100644 (file)
@@ -13583,7 +13583,8 @@ static void run(struct vdec_s *vdec, unsigned long mask,
        hevc->dec_result = DEC_RESULT_NONE;
        if (vdec_frame_based(vdec) &&
                ((get_dbg_flag(hevc) & PRINT_FLAG_VDEC_STATUS)
-               || is_log_enable(hevc)))
+               || is_log_enable(hevc)) &&
+               !vdec_secure(vdec))
                check_sum = get_data_check_sum(hevc, r);
 
        if (is_log_enable(hevc))
@@ -13610,7 +13611,8 @@ static void run(struct vdec_s *vdec, unsigned long mask,
                hevc->start_shift_bytes
                );
        if ((get_dbg_flag(hevc) & PRINT_FRAMEBASE_DATA) &&
-               input_frame_based(vdec)) {
+               input_frame_based(vdec) &&
+               !vdec_secure(vdec)) {
                int jj;
                u8 *data = NULL;
 
index d545ed43f03e9dd51c42f78269faf2d5437fc11d..826b140333d78fcf189c221f5e6d8c679f22dc45 100644 (file)
@@ -9735,7 +9735,7 @@ static void run_front(struct vdec_s *vdec)
 
        av1_frame_mode_pts_save(hw);
        if (debug & PRINT_FLAG_VDEC_STATUS) {
-               if (vdec_frame_based(vdec) && hw->chunk) {
+               if (vdec_frame_based(vdec) && hw->chunk && !vdec_secure(vdec)) {
                        u8 *data = NULL;
 
                        if (!hw->chunk->block->is_mapped)