From 2c85c1f633cee971fed6579311125c66c38ac442 Mon Sep 17 00:00:00 2001 From: Joy Cho Date: Wed, 20 Mar 2019 11:12:26 +0900 Subject: [PATCH] osd: Update overscan logic at booting stage Change-Id: I0df7d807e55452604b228a46df9e83027ef19211 --- drivers/amlogic/media/osd/osd_fb.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c index 77724e5571f4..0bec6097851d 100644 --- a/drivers/amlogic/media/osd/osd_fb.c +++ b/drivers/amlogic/media/osd/osd_fb.c @@ -424,14 +424,18 @@ static void osd_set_fb_parameters(int index, const struct vinfo_s *vinfo) osd_set_free_scale_mode_hw(index, 1); osd_set_free_scale_axis_hw(index, 0, 0, (vinfo->width - 1), (vinfo->height - 1)); - - /* OVERSCAN */ - overscan_window(vinfo, overscan_ratio, &left, &top, &width, &height); - osd_set_window_axis_hw(index, left, top, width, height); - osd_set_free_scale_enable_hw(index, 0x10001); + if (overscan_ratio == 100) { + osd_set_window_axis_hw(index, 0, 0, + (vinfo->width - 1), (vinfo->height - 1)); + } else { + /* OVERSCAN */ + overscan_window(vinfo, overscan_ratio, + &left, &top, &width, &height); + osd_set_window_axis_hw(index, left, top, width, height); + osd_set_free_scale_enable_hw(index, 0x10001); + } osd_enable_hw(index, 1); - } static int __init overscan_setup(char *str)