From: apollo.ling Date: Tue, 4 Aug 2020 02:45:06 +0000 (+0800) Subject: h265: add print_lcu_error to control lcu related printings [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aabcdab0b1d3f1ff02291a2d0fcce00482ebfefc;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git h265: add print_lcu_error to control lcu related printings [1/1] PD#SWPL-30945 Problem: 183 consecutive repeated lcu Kernel prints per second, which may make the system hang Solution: add print_lcu_error to control lcu related printings Verify: u215 Change-Id: I4bd8d301bfc72ffbcf9e5768b6688d7412928c29 Signed-off-by: apollo.ling --- diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index b420997..ab44fad 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -191,6 +191,7 @@ static unsigned int decode_timeout_val = 200; static u32 run_ready_min_buf_num = 2; static u32 disable_ip_mode; +static u32 print_lcu_error = 1; /*data_resend_policy: bit 0, stream base resend data when decoding buf empty */ @@ -6394,10 +6395,11 @@ static void check_pic_decoded_error_pre(struct hevc_state_s *hevc, hevc->cur_pic->error_mark = 1; } if (hevc->cur_pic->error_mark) { - hevc_print(hevc, 0, - "cur lcu idx = %d, (total %d), set error_mark\n", - current_lcu_idx, - hevc->lcu_x_num_pre*hevc->lcu_y_num_pre); + if (print_lcu_error) + hevc_print(hevc, 0, + "cur lcu idx = %d, (total %d), set error_mark\n", + current_lcu_idx, + hevc->lcu_x_num_pre*hevc->lcu_y_num_pre); if (is_log_enable(hevc)) add_log(hevc, "cur lcu idx = %d, (total %d), set error_mark", @@ -6447,10 +6449,11 @@ static void check_pic_decoded_error(struct hevc_state_s *hevc, hevc->cur_pic->error_mark = 1; if (hevc->cur_pic->error_mark) { - hevc_print(hevc, 0, - "cur lcu idx = %d, (total %d), set error_mark\n", - current_lcu_idx, - hevc->lcu_x_num*hevc->lcu_y_num); + if (print_lcu_error) + hevc_print(hevc, 0, + "cur lcu idx = %d, (total %d), set error_mark\n", + current_lcu_idx, + hevc->lcu_x_num*hevc->lcu_y_num); if (((hevc->i_only & 0x4) == 0) && hevc->cur_pic->POC && ( hevc->cur_pic->slice_type == 0) && ((hevc->cur_pic->POC + MAX_BUF_NUM) < hevc->iPrevPOC)) { hevc_print(hevc, 0, @@ -14052,6 +14055,10 @@ module_param(decode_timeout_val, uint, 0664); MODULE_PARM_DESC(decode_timeout_val, "\n h265 decode_timeout_val\n"); +module_param(print_lcu_error, uint, 0664); +MODULE_PARM_DESC(print_lcu_error, + "\n h265 print_lcu_error\n"); + module_param(data_resend_policy, uint, 0664); MODULE_PARM_DESC(data_resend_policy, "\n h265 data_resend_policy\n");