From ca75bec43e49c57a8bc9bebde62d962eff12a265 Mon Sep 17 00:00:00 2001 From: "yuanfa.zhuang" Date: Fri, 8 Jan 2021 17:53:05 +0800 Subject: [PATCH] vdec: secure mustn't check data [1/1] 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 Change-Id: Ie83985ebeaffd9d9c4ed96f20be7c17e724d657b --- drivers/frame_provider/decoder/h265/vh265.c | 6 ++++-- drivers/frame_provider/decoder/vav1/vav1.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index d59fae4..2c6a35e 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -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; diff --git a/drivers/frame_provider/decoder/vav1/vav1.c b/drivers/frame_provider/decoder/vav1/vav1.c index d545ed4..826b140 100644 --- a/drivers/frame_provider/decoder/vav1/vav1.c +++ b/drivers/frame_provider/decoder/vav1/vav1.c @@ -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) -- 2.20.1