From: Nick Xie Date: Thu, 25 Jul 2019 12:52:10 +0000 (+0800) Subject: fbcon: use soft cursor instead of hardware cursor X-Git-Tag: khadas-vims-v0.9.6-release~525 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2da0df06c3df7c5af2ab636564a70278004aa11;p=platform%2Fkernel%2Flinux-amlogic.git fbcon: use soft cursor instead of hardware cursor Signed-off-by: Nick Xie --- 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,