fbcon: use soft cursor instead of hardware cursor
authorNick Xie <nick@khadas.com>
Thu, 25 Jul 2019 12:52:10 +0000 (20:52 +0800)
committerNick Xie <nick@khadas.com>
Thu, 25 Jul 2019 12:52:10 +0000 (20:52 +0800)
Signed-off-by: Nick Xie <nick@khadas.com>
arch/arm64/configs/kvims_defconfig
drivers/amlogic/media/osd/osd_fb.c

index 6911f30..1870645 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 c4bcbb3..2dff4e1 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)
 {
@@ -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,