From 278ced8afbcba725fb4ca9776de06443ccce168f Mon Sep 17 00:00:00 2001 From: pengcheng chen Date: Thu, 24 May 2018 14:43:55 +0800 Subject: [PATCH] osd: updated vinfo when it is not null every frame PD#167032: osd: updated vinfo when it is not null every frame Change-Id: If914fc39d014e2a1c2db564d427292977edc7530 Signed-off-by: pengcheng chen --- drivers/amlogic/media/osd/osd_hw.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 371f511..8b3bf48 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -6418,15 +6418,15 @@ static void osd_setting_old_hwc(void) int osd_setting_blend(void) { int ret; - const struct vinfo_s *vinfo; + struct vinfo_s *vinfo; vinfo = get_current_vinfo(); if (vinfo) { - osd_hw.vinfo_width = vinfo->width; - osd_hw.vinfo_height = vinfo->height; - } else { - osd_hw.vinfo_width = 1920; - osd_hw.vinfo_height = 1080; + if ((strcmp(vinfo->name, "invalid")) && + (strcmp(vinfo->name, "null"))) { + osd_hw.vinfo_width = vinfo->width; + osd_hw.vinfo_height = vinfo->height; + } } if (osd_hw.osd_meson_dev.osd_ver < OSD_HIGH_ONE) @@ -7072,6 +7072,8 @@ void osd_init_hw(u32 logo_loaded, u32 osd_probe, //osd_hw.osd_blend_mode = OSD_BLEND_NONE; osd_hw.background_w = 1920; osd_hw.background_h = 1080; + osd_hw.vinfo_width = 1920; + osd_hw.vinfo_height = 1080; for (idx = 0; idx < osd_hw.osd_meson_dev.osd_count; idx++) { osd_hw.premult_en[idx] = 0; osd_hw.osd_afbcd[idx].format = COLOR_INDEX_32_ABGR; -- 2.7.4