From c2da0df06c3df7c5af2ab636564a70278004aa11 Mon Sep 17 00:00:00 2001 From: Nick Xie Date: Thu, 25 Jul 2019 20:52:10 +0800 Subject: [PATCH] fbcon: use soft cursor instead of hardware cursor Signed-off-by: Nick Xie --- arch/arm64/configs/kvims_defconfig | 1 - drivers/amlogic/media/osd/osd_fb.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm64/configs/kvims_defconfig b/arch/arm64/configs/kvims_defconfig index 6911f30..1870645 100644 --- a/arch/arm64/configs/kvims_defconfig +++ b/arch/arm64/configs/kvims_defconfig @@ -322,7 +322,6 @@ CONFIG_AMLOGIC_MEDIA_FB=y CONFIG_AMLOGIC_MEDIA_FB_OSD_SYNC_FENCE=y CONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA=y CONFIG_AMLOGIC_MEDIA_FB_OSD2_ENABLE=y -CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR=y CONFIG_AMLOGIC_MEDIA_DEINTERLACE=y CONFIG_AMLOGIC_MEDIA_VIN=y CONFIG_AMLOGIC_MEDIA_TVIN=y diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c index c4bcbb3..2dff4e17 100644 --- a/drivers/amlogic/media/osd/osd_fb.c +++ b/drivers/amlogic/media/osd/osd_fb.c @@ -385,7 +385,11 @@ struct ion_handle *fb_ion_handle[OSD_COUNT][OSD_MAX_BUF_NUM]; }; #endif +#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var); +#endif + +extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); static int osd_set_fb_var(int index, const struct vinfo_s *vinfo) { @@ -1884,6 +1888,7 @@ static int osd_pan_display(struct fb_var_screeninfo *var, return 0; } +#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var) { s16 startx = 0, starty = 0; @@ -1905,6 +1910,7 @@ static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var) return 0; } +#endif static int osd_sync(struct fb_info *info) { @@ -1922,10 +1928,16 @@ static struct fb_ops osd_ops = { .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, +#if !defined(CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR) + .fb_cursor = soft_cursor, +#else #ifdef CONFIG_FB_SOFT_CURSOR .fb_cursor = soft_cursor, #endif +#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR .fb_cursor = osd_cursor, +#endif +#endif .fb_ioctl = osd_ioctl, #ifdef CONFIG_COMPAT .fb_compat_ioctl = osd_compat_ioctl, -- 2.7.4