From: ckkim Date: Thu, 29 Oct 2020 09:24:13 +0000 (+0900) Subject: ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in... X-Git-Tag: hardkernel-4.9.236-104~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0427609dc95c93d0989b1b2dea84b9c41f2ba4ba;p=platform%2Fkernel%2Flinux-amlogic.git ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in S922(N2/N2+). Change-Id: I7a16dd2cbde63d8b716aab17d85fb9dc1157e2ff --- diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c index ebe36aa9eb9b..f0d0a21b621e 100644 --- a/drivers/amlogic/media/osd/osd_fb.c +++ b/drivers/amlogic/media/osd/osd_fb.c @@ -53,6 +53,11 @@ #ifdef CONFIG_INSTABOOT #include #endif + +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) +#include +#endif + /* Local Headers */ #include "osd.h" #include "osd_fb.h" @@ -692,10 +697,10 @@ static int osd_set_par(struct fb_info *info) output_index = get_output_device_id(fbdev->fb_index); -#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) - info->var.xres_virtual = info->var.xres; - info->var.yres_virtual = info->var.yres; -#endif + if (board_is_odroidn2()) { + info->var.xres_virtual = info->var.xres; + info->var.yres_virtual = info->var.yres; + } if (fbdev->fb_index < osd_hw.osd_meson_dev.viu1_osd_count) { vinfo = get_current_vinfo(); diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 31e93390032f..a0e03fd828d7 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -59,6 +59,10 @@ #include #endif +#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) +#include +#endif + /* Local Headers */ #include "osd_canvas.h" #include "osd_prot.h" @@ -2802,8 +2806,9 @@ void osd_setup_hw(u32 index, int update_geometry = 0; u32 w = (color->bpp * xres_virtual + 7) >> 3; u32 i; + #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) - if (index == 0) { + if (board_is_odroidn2() && (index == 0)) { xres_virtual = xres; yres_virtual = yres; } @@ -2893,7 +2898,8 @@ void osd_setup_hw(u32 index, index, osd_hw.osd_afbcd[index].out_addr_id); #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) - set_osd_logo_freescaler(); + if (board_is_odroidn2()) + set_osd_logo_freescaler(); #endif if (osd_hw.osd_meson_dev.osd_ver == OSD_SIMPLE) osd_update_phy_addr(0); diff --git a/drivers/amlogic/media/osd/osd_logo.c b/drivers/amlogic/media/osd/osd_logo.c index 49d26014706b..15af781e6e20 100644 --- a/drivers/amlogic/media/osd/osd_logo.c +++ b/drivers/amlogic/media/osd/osd_logo.c @@ -33,6 +33,7 @@ #include "osd.h" #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) +#include #include "osd_fb.h" #endif @@ -195,12 +196,14 @@ int set_osd_logo_freescaler(void) s32 target_x_end = 0, target_y_end = 0; #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON) - struct osd_fb_dev_s *fb_dev; + if (board_is_odroidn2()) { + struct osd_fb_dev_s *fb_dev; - fb_dev = gp_fbdev_list[0]; - if (fb_dev) { - logo_info.fb_width = fb_dev->fb_info->var.xres; - logo_info.fb_height = fb_dev->fb_info->var.yres; + fb_dev = gp_fbdev_list[0]; + if (fb_dev) { + logo_info.fb_width = fb_dev->fb_info->var.xres; + logo_info.fb_height = fb_dev->fb_info->var.yres; + } } #endif