Merge "ODROID-N2: osd: support flexible fb size with free scale option" into odroidn2-4.9.y

This commit is contained in:
Joy Cho
2019-02-13 11:47:23 +09:00
committed by Gerrit Code Review

View File

@@ -396,6 +396,16 @@ static int osd_set_fb_var(int index, const struct vinfo_s *vinfo)
return 0;
}
static void osd_set_fb_parameters(int index, const struct vinfo_s *vinfo)
{
osd_set_free_scale_enable_hw(index, 0);
osd_set_free_scale_mode_hw(index, 1);
osd_set_free_scale_axis_hw(index, 0, 0, vinfo->width, vinfo->height);
osd_set_window_axis_hw(index, 0, 0, vinfo->width, vinfo->height);
osd_enable_hw(index, 1);
}
#endif /* CONFIG_ARCH_MESON64_ODROID_COMMON */
phys_addr_t get_fb_rmem_paddr(int index)
@@ -3942,6 +3952,11 @@ static int osd_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(osd_attrs_viu2); i++)
ret = device_create_file(fbi->dev, &osd_attrs_viu2[i]);
}
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (index == DEV_OSD0)
osd_set_fb_parameters(DEV_OSD0, vinfo);
#endif
}
#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND
early_suspend.level = EARLY_SUSPEND_LEVEL_STOP_DRAWING;