video: black_threshold valid when vscale_skip=8 && hscale_skip=1 [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Wed, 19 Jun 2019 09:47:20 +0000 (17:47 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 1 Jul 2019 05:53:42 +0000 (22:53 -0700)
PD#TV-6827

Problem:
when input source is 4k and output axis's height <228, screen blank

Solution:
1. need set echo 20 250 > /sys/class/video/black_threshold,
when video scaler can't process, disable video
2. black_threshold valid when vscale_skip_count=8 && hscale_skip_count=1

Verify:
t972

Change-Id: I4459c9989adf4c8acb6061756393384cee6f438f
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index a5cacf3..2b4d322 100644 (file)
@@ -6375,8 +6375,12 @@ static bool black_threshold_check(u8 id)
                return ret;
 
        if ((layer->layer_width <= black_threshold_width)
-               || (layer->layer_height <= black_threshold_height))
-               ret = true;
+               || (layer->layer_height <= black_threshold_height)) {
+               if (cur_frame_par &&
+                       (cur_frame_par->vscale_skip_count == 8) &&
+                               (cur_frame_par->hscale_skip_count == 1))
+                       ret = true;
+       }
        return ret;
 }