ODROID-COMMON:osd: Adjust osd scaler and vout serve to fit in KODI. Only works in S922(N2/N2+).

Change-Id: I7a16dd2cbde63d8b716aab17d85fb9dc1157e2ff
This commit is contained in:
ckkim
2020-10-29 18:24:13 +09:00
parent 3fb04f4ee0
commit 0427609dc9
3 changed files with 25 additions and 11 deletions

View File

@@ -53,6 +53,11 @@
#ifdef CONFIG_INSTABOOT
#include <linux/amlogic/instaboot/instaboot.h>
#endif
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
#include <linux/platform_data/board_odroid.h>
#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();

View File

@@ -59,6 +59,10 @@
#include <linux/amlogic/media/amdolbyvision/dolby_vision.h>
#endif
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
#include <linux/platform_data/board_odroid.h>
#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);

View File

@@ -33,6 +33,7 @@
#include "osd.h"
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
#include <linux/platform_data/board_odroid.h>
#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