From: Nick Xie Date: Thu, 28 May 2020 02:21:22 +0000 (+0800) Subject: Revert "Revert "fbcon: use soft cursor instead of hardware cursor"" X-Git-Tag: khadas-vims-v0.9.6-release~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c0adcc656834c713e72a22f695e18ccfadf66c2;p=platform%2Fkernel%2Flinux-amlogic.git Revert "Revert "fbcon: use soft cursor instead of hardware cursor"" This reverts commit a92f714662f95d3cf79789e8973904cacf560db0. --- diff --git a/arch/arm64/configs/kvims_defconfig b/arch/arm64/configs/kvims_defconfig index e023c2b12f4e..76c24d1e0d3a 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 5097d47ad175..8c9bb9591ce8 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) { @@ -1890,6 +1894,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; @@ -1912,6 +1917,7 @@ static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var) return 0; } +#endif static int osd_sync(struct fb_info *info) { @@ -1929,10 +1935,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,