ODROID-COMMON: osd: Adjust osd scaler and vout serve to fit in KODI

Change-Id: Iab2b015061ba29fd407282be21509d01165b3d50
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Joy Cho
2019-07-17 14:08:50 +09:00
committed by Dongjin Kim
parent a5da5e7df7
commit 6f7138e3ac
5 changed files with 43 additions and 2 deletions

View File

@@ -692,6 +692,11 @@ 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 (fbdev->fb_index < osd_hw.osd_meson_dev.viu1_osd_count) {
vinfo = get_current_vinfo();
if (!vinfo) {

View File

@@ -2802,6 +2802,12 @@ 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) {
xres_virtual = xres;
yres_virtual = yres;
}
#endif /* CONFIG_ARCH_MESON64_ODROID_COMMON */
osd_hw.buffer_alloc[index] = 1;
pan_data.x_start = xoffset;
@@ -2886,6 +2892,9 @@ void osd_setup_hw(u32 index,
osd_log_info("osd[%d] out_addr_id =0x%x\n",
index, osd_hw.osd_afbcd[index].out_addr_id);
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
set_osd_logo_freescaler();
#endif
if (osd_hw.osd_meson_dev.osd_ver == OSD_SIMPLE)
osd_update_phy_addr(0);
#ifdef CONFIG_AMLOGIC_MEDIA_CANVAS

View File

@@ -32,6 +32,9 @@
#include "osd_log.h"
#include "osd.h"
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
#include "osd_fb.h"
#endif
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -191,6 +194,16 @@ int set_osd_logo_freescaler(void)
s32 dst_y_start = 0, dst_y_end = 0;
s32 target_x_end = 0, target_y_end = 0;
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
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;
}
#endif
if (logo_info.loaded == 0)
return 0;

View File

@@ -495,7 +495,9 @@ static int set_disp_mode_auto(void)
(strncmp(info->name, "ntsc_m", 6) == 0) ||
(strncmp(info->name, "pal_m", 5) == 0) ||
(strncmp(info->name, "pal_n", 5) == 0) ||
#if !defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
(strncmp(info->name, "panel", 5) == 0) ||
#endif
(strncmp(info->name, "null", 4) == 0)) {
pr_info(SYS "%s not valid hdmi mode\n", info->name);
hdev->hwop.cntlconfig(hdev, CONF_CLR_AVI_PACKET, 0);
@@ -606,10 +608,12 @@ static int set_disp_mode_auto(void)
hdev->mux_hpd_if_pin_high_flag = 0;
}
/* If current display is NOT panel, needn't TURNOFF_HDMIHW */
#if !defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (strncmp(mode, "panel", 5) == 0) {
hdev->hwop.cntl(hdev, HDMITX_HWCMD_TURNOFF_HDMIHW,
(hdev->hpdmode == 2)?1:0);
}
#endif
}
hdmitx_set_audio(hdev, &(hdev->cur_audio_param));
if (hdev->cedst_policy) {

View File

@@ -399,7 +399,12 @@ static ssize_t vout_mode_show(struct class *class,
{
int ret = 0;
ret = snprintf(buf, VMODE_NAME_LEN_MAX, "%s\n", vout_mode);
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (strncmp(vout_mode, "custombuilt", 11) == 0)
ret = snprintf(buf, VMODE_NAME_LEN_MAX, "%s\n", "panel");
else
#endif
ret = snprintf(buf, VMODE_NAME_LEN_MAX, "%s\n", vout_mode);
return ret;
}
@@ -422,7 +427,12 @@ static ssize_t vout_axis_show(struct class *class,
{
int ret = 0;
ret = snprintf(buf, 64, "%s\n", vout_axis);
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (strncmp(vout_mode, "custombuilt", 11) == 0)
ret = snprintf(buf, 64, "%s\n", "0 0 1920 1080 0 0");
else
#endif
ret = snprintf(buf, 64, "%s\n", vout_axis);
return ret;
}