diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/avs/avs.c b/drivers/amlogic/media_modules/frame_provider/decoder/avs/avs.c index dc0fcb158578..7cea6cc80378 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/avs/avs.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/avs/avs.c @@ -14,6 +14,7 @@ * more details. * */ +#define DEBUG #include #include #include @@ -1102,7 +1103,7 @@ static int vavs_prot_init(void) #ifdef ENABLE_USER_DATA WRITE_VREG(AV_SCRATCH_N, (u32)(user_data_buffer_phys - buf_offset)); - pr_info("AV_SCRATCH_N = 0x%x\n", READ_VREG(AV_SCRATCH_N)); + pr_debug("AV_SCRATCH_N = 0x%x\n", READ_VREG(AV_SCRATCH_N)); #endif return r; @@ -1517,7 +1518,7 @@ static s32 vavs_init(void) } if (size == 1) - pr_info ("tee load ok"); + pr_info("tee load ok\n"); if (get_cpu_type() >= MESON_CPU_MAJOR_ID_GXM) size = amvdec_loadmc_ex(VFORMAT_AVS, "avs_gxm", buf); @@ -1641,7 +1642,7 @@ static int amvdec_avs_probe(struct platform_device *pdev) __func__); return -ENOMEM; } - pr_info("user_data_buffer = 0x%p, user_data_buffer_phys = 0x%x\n", + pr_debug("user_data_buffer = 0x%p, user_data_buffer_phys = 0x%x\n", user_data_buffer, (u32)user_data_buffer_phys); } #endif @@ -1749,9 +1750,9 @@ static int amvdec_avs_remove(struct platform_device *pdev) mm_blk_handle = NULL; } #ifdef DEBUG_PTS - pr_info("pts hit %d, pts missed %d, i hit %d, missed %d\n", pts_hit, + pr_debug("pts hit %d, pts missed %d, i hit %d, missed %d\n", pts_hit, pts_missed, pts_i_hit, pts_i_missed); - pr_info("total frame %d, avi_flag %d, rate %d\n", total_frame, avi_flag, + pr_debug("total frame %d, avi_flag %d, rate %d\n", total_frame, avi_flag, vavs_amstream_dec_info.rate); #endif kfree(gvs); diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c index 0fe1a772b40f..b6d963ee3f52 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c @@ -49,6 +49,7 @@ /*#define TEST_NO_BUF*/ /*#define HEVC_PIC_STRUCT_SUPPORT*/ #define MULTI_INSTANCE_SUPPORT +#define USE_UNINIT_SEMA /* .buf_size = 0x100000*16, //4k2k , 0x100000 per buffer */ @@ -8501,7 +8502,7 @@ static int h265_task_handle(void *data) hevc_print(hevc, 0, "uninit list\n"); hevc->uninit_list = 0; #ifdef USE_UNINIT_SEMA - if (use_cma) + if (use_cma && hevc->init_flag) up(&hevc->h265_uninit_done_sema); #endif } @@ -9024,8 +9025,10 @@ static int vh265_stop(struct hevc_state_s *hevc) hevc->uninit_list = 1; up(&h265_sema); #ifdef USE_UNINIT_SEMA - ret = down_interruptible( - &hevc->h265_uninit_done_sema); + if (hevc->init_flag) { + ret = down_interruptible( + &hevc->h265_uninit_done_sema); + } #else while (hevc->uninit_list) /* wait uninit complete */ msleep(20); @@ -9139,8 +9142,10 @@ static int vmh265_stop(struct hevc_state_s *hevc) reset_process_time(hevc); vdec_schedule_work(&hevc->work); #ifdef USE_UNINIT_SEMA - ret = down_interruptible( - &hevc->h265_uninit_done_sema); + if (hevc->init_flag) { + ret = down_interruptible( + &hevc->h265_uninit_done_sema); + } #else while (hevc->uninit_list) /* wait uninit complete */ msleep(20); @@ -9229,8 +9234,9 @@ static void vh265_work(struct work_struct *work) hevc_print(hevc, 0, "uninit list\n"); hevc->uninit_list = 0; #ifdef USE_UNINIT_SEMA - if (use_cma) + if (use_cma && hevc->init_flag) { up(&hevc->h265_uninit_done_sema); + } #endif return; } diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/vc1/vvc1.c b/drivers/amlogic/media_modules/frame_provider/decoder/vc1/vvc1.c index 039ae971c002..4e07f538edfc 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/vc1/vvc1.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/vc1/vvc1.c @@ -14,7 +14,7 @@ * more details. * */ - +#define DEBUG #include #include #include @@ -1057,7 +1057,7 @@ static s32 vvc1_init(void) } if (size == 1) - pr_info ("tee load ok"); + pr_info("tee load ok\n"); else if (amvdec_loadmc_ex(VFORMAT_VC1, NULL, buf) < 0) { amvdec_disable(); vfree(buf); @@ -1180,9 +1180,9 @@ static int amvdec_vc1_remove(struct platform_device *pdev) } #ifdef DEBUG_PTS - pr_info("pts hit %d, pts missed %d, i hit %d, missed %d\n", pts_hit, + pr_debug("pts hit %d, pts missed %d, i hit %d, missed %d\n", pts_hit, pts_missed, pts_i_hit, pts_i_missed); - pr_info("total frame %d, avi_flag %d, rate %d\n", + pr_debug("total frame %d, avi_flag %d, rate %d\n", total_frame, avi_flag, vvc1_amstream_dec_info.rate); #endif