Revert "Revert "fbcon: use soft cursor instead of hardware cursor""
authorNick Xie <nick@khadas.com>
Thu, 28 May 2020 02:21:22 +0000 (10:21 +0800)
committerNick Xie <nick@khadas.com>
Thu, 28 May 2020 02:21:22 +0000 (10:21 +0800)
This reverts commit a92f714662f95d3cf79789e8973904cacf560db0.

arch/arm64/configs/kvims_defconfig
drivers/amlogic/media/osd/osd_fb.c

index e023c2b..76c24d1 100644 (file)
@@ -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
index 5097d47..8c9bb95 100644 (file)
@@ -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,