mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ODROID-N2: osd: support flexible fb size with free scale option
Change-Id: I87a63eda62b96e3d54cb88f92e16364ba8250acf
This commit is contained in:
@@ -385,6 +385,18 @@ struct ion_handle *fb_ion_handle[OSD_COUNT][OSD_MAX_BUF_NUM];
|
||||
|
||||
static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var);
|
||||
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
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)
|
||||
{
|
||||
if (index < 0 || index > 1)
|
||||
@@ -4403,6 +4415,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;
|
||||
|
||||
Reference in New Issue
Block a user