h265: add print_lcu_error to control lcu related printings [1/1]
authorapollo.ling <apollo.ling@amlogic.com>
Tue, 4 Aug 2020 02:45:06 +0000 (10:45 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Tue, 4 Aug 2020 06:08:47 +0000 (23:08 -0700)
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 <apollo.ling@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index b420997a236f728871e7a3fc12ebee62412df49c..ab44fad2278dae10341c07cf20f142de2e815e66 100644 (file)
@@ -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");