All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: move soft_cursor into fbconsole
@ 2005-06-11  4:57 Jon Smirl
  2005-06-11  6:15 ` James Simmons
  2005-06-11 20:35 ` Geert Uytterhoeven
  0 siblings, 2 replies; 27+ messages in thread
From: Jon Smirl @ 2005-06-11  4:57 UTC (permalink / raw)
  To: fbdev, Antonino A. Daplas, James Simmons

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

James has indicated that the soft_cursor only works with fbconsole and
it won't work from user space. This means that soft_cursor is in the
way of using a hardware cursor from user space. This patch removes
soft_cursor from all of the drivers. So if the driver doesn't support
a hardware cursor fb_cursor is NULL.

I also fixed the three drivers with hardware implementation. These
drivers had cases where the hardware cursor had an error and then
returned the software one instead. Now they return -ENODEV when they
can't use the hardware one.

In console/bitlbt.c I made this change:
	/* First try the hardware cursor */
	if (info->fbops->fb_cursor)
		err = info->fbops->fb_cursor(info, &cursor);
	/* if that doesn't exist or didn't work, use the software one */
	if (err)
		soft_cursor(info, &cursor);

The effect of all of this is the make a clear path for getting to
hardware cursors without triggering the soft_cursor fallback.
Triggering of the fallback was moved into fb_console. This also lets
me remove the softcursor module from memory when fb_console is not
loaded.

Give this a try and let me know what you think. 

-- 
Jon Smirl
jonsmirl@gmail.com

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 28168 bytes --]

diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c
--- a/drivers/video/68328fb.c
+++ b/drivers/video/68328fb.c
@@ -113,7 +113,6 @@ static struct fb_ops mc68x328fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= mc68x328fb_mmap,
 };
 
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -926,7 +926,6 @@ static struct fb_ops acornfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_mmap	= acornfb_mmap,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -332,7 +332,6 @@ static struct fb_ops clcdfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= clcdfb_mmap,
 };
 
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -114,7 +114,7 @@
    +----------+---------------------------------------------+----------+-------+
    |          |                ^                            |          |       |
    |          |                |upper_margin                |          |       |
-   |          |                ¥                            |          |       |
+   |          |                                            |          |       |
    +----------###############################################----------+-------+
    |          #                ^                            #          |       |
    |          #                |                            #          |       |
@@ -135,15 +135,15 @@
    |          #                |                            #          |       |
    |          #                |                            #          |       |
    |          #                |                            #          |       |
-   |          #                ¥                            #          |       |
+   |          #                                            #          |       |
    +----------###############################################----------+-------+
    |          |                ^                            |          |       |
    |          |                |lower_margin                |          |       |
-   |          |                ¥                            |          |       |
+   |          |                                            |          |       |
    +----------+---------------------------------------------+----------+-------+
    |          |                ^                            |          |       |
    |          |                |vsync_len                   |          |       |
-   |          |                ¥                            |          |       |
+   |          |                                            |          |       |
    +----------+---------------------------------------------+----------+-------+
 
 
@@ -327,7 +327,7 @@
    CCIR -> PAL
    -----------
 
-      - a scanline is 64 µs long, of which 52.48 µs are visible. This is about
+      - a scanline is 64 s long, of which 52.48 s are visible. This is about
         736 visible 70 ns pixels per line.
       - we have 625 scanlines, of which 575 are visible (interlaced); after
         rounding this becomes 576.
@@ -335,7 +335,7 @@
    RETMA -> NTSC
    -------------
 
-      - a scanline is 63.5 µs long, of which 53.5 µs are visible.  This is about
+      - a scanline is 63.5 s long, of which 53.5 s are visible.  This is about
         736 visible 70 ns pixels per line.
       - we have 525 scanlines, of which 485 are visible (interlaced); after
         rounding this becomes 484.
@@ -802,7 +802,7 @@ static u_short ecs_palette[32];
 
 static u_short do_vmode_full = 0;	/* Change the Video Mode */
 static u_short do_vmode_pan = 0;	/* Update the Video Mode */
-static short do_blank = 0;		/* (Un)Blank the Screen (±1) */
+static short do_blank = 0;		/* (Un)Blank the Screen (1) */
 static u_short do_cursor = 0;		/* Move the Cursor */
 
 
@@ -1185,7 +1185,6 @@ static struct fb_ops amifb_ops = {
 	.fb_fillrect	= amifb_fillrect,
 	.fb_copyarea	= amifb_copyarea,
 	.fb_imageblit	= amifb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl	= amifb_ioctl,
 };
 
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -106,7 +106,6 @@ static struct fb_ops asiliantfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* Calculate the ratios for the dot clocks without using a single long long
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -480,7 +480,6 @@ static struct fb_ops aty128fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 #ifdef CONFIG_PMAC_BACKLIGHT
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -26,7 +26,7 @@
  *			   Anthony Tong <atong@uiuc.edu>
  *
  *  Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern
- *  Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug.
+ *  Many Thanks to Ville Syrj��for patches and fixing nasting 16 bit color bug.
  *
  *  This file is subject to the terms and conditions of the GNU General Public
  *  License. See the file COPYING in the main directory of this archive for
@@ -292,7 +292,6 @@ static struct fb_ops atyfb_ops = {
 	.fb_fillrect	= atyfb_fillrect,
 	.fb_copyarea	= atyfb_copyarea,
 	.fb_imageblit	= atyfb_imageblit,
-	.fb_cursor	= soft_cursor,
 #ifdef __sparc__
 	.fb_mmap	= atyfb_mmap,
 #endif
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1873,7 +1873,6 @@ static struct fb_ops radeonfb_ops = {
 	.fb_fillrect		= radeonfb_fillrect,
 	.fb_copyarea		= radeonfb_copyarea,
 	.fb_imageblit		= radeonfb_imageblit,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -51,7 +51,6 @@ static struct fb_ops bw2_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= bw2_mmap,
 	.fb_ioctl		= bw2_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* OBio addresses for the bwtwo registers */
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -49,7 +49,6 @@ static struct fb_ops cg14_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= cg14_mmap,
 	.fb_ioctl		= cg14_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 #define CG14_MCR_INTENABLE_SHIFT	7
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -50,7 +50,6 @@ static struct fb_ops cg3_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= cg3_mmap,
 	.fb_ioctl		= cg3_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -54,7 +54,6 @@ static struct fb_ops cg6_ops = {
 	.fb_sync		= cg6_sync,
 	.fb_mmap		= cg6_mmap,
 	.fb_ioctl		= cg6_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* Offset of interesting structures in the OBIO space */
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -104,7 +104,6 @@ static struct fb_ops chipsfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int chipsfb_check_var(struct fb_var_screeninfo *var,
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -548,7 +548,6 @@ static struct fb_ops cirrusfb_ops = {
 	.fb_fillrect	= cirrusfb_fillrect,
 	.fb_copyarea	= cirrusfb_copyarea,
 	.fb_imageblit	= cirrusfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*--- Hardware Specific Routines -------------------------------------------*/
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -219,7 +219,6 @@ static struct fb_ops clps7111fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int 
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -248,6 +248,7 @@ static void bit_cursor(struct vc_data *v
 	int y = real_y(p, vc->vc_y);
 	int attribute, use_sw = (vc->vc_cursor_type & 0x10);
 	char *src;
+	int err = -ENODEV;
 
 	cursor.set = 0;
 
@@ -383,7 +384,12 @@ static void bit_cursor(struct vc_data *v
 	cursor.image.depth = 1;
 	cursor.rop = ROP_XOR;
 
-	info->fbops->fb_cursor(info, &cursor);
+	/* First try the hardware cursor */
+	if (info->fbops->fb_cursor)
+		err = info->fbops->fb_cursor(info, &cursor);
+	/* if that doesn't exist or didn't work, use the software one */
+	if (err)
+		soft_cursor(info, &cursor);
 
 	ops->cursor_reset = 0;
 }
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -176,7 +176,6 @@ static struct fb_ops controlfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1064,7 +1064,6 @@ static struct fb_ops cyber2000fb_ops = {
 	.fb_fillrect	= cyber2000fb_fillrect,
 	.fb_copyarea	= cyber2000fb_copyarea,
 	.fb_imageblit	= cyber2000fb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_sync	= cyber2000fb_sync,
 };
 
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c
--- a/drivers/video/dnfb.c
+++ b/drivers/video/dnfb.c
@@ -114,7 +114,6 @@ static struct fb_ops dn_fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= dnfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 struct fb_var_screeninfo dnfb_var __devinitdata = {
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -482,7 +482,6 @@ static struct fb_ops epson1355fb_fbops =
 	.fb_imageblit 	= cfb_imageblit,
 	.fb_read 	= epson1355fb_read,
 	.fb_write 	= epson1355fb_write,
-	.fb_cursor 	= soft_cursor,
 };
 
 /* ------------------------------------------------------------------------- */
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -59,7 +59,6 @@ static struct fb_ops ffb_ops = {
 	.fb_ioctl		= ffb_ioctl,
 
 	/* XXX Use FFB hw cursor once fb cursor API is better understood... */
-	.fb_cursor		= soft_cursor,
 };
 
 /* Register layout and definitions */
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
--- a/drivers/video/fm2fb.c
+++ b/drivers/video/fm2fb.c
@@ -172,7 +172,6 @@ static struct fb_ops fm2fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
     /*
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -1038,7 +1038,6 @@ static struct fb_ops gbefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -213,7 +213,6 @@ static struct fb_ops gx1fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static struct fb_info * __init gx1fb_init_fbinfo(void)
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -262,7 +262,6 @@ static struct fb_ops hitfb_ops = {
 	.fb_fillrect	= hitfb_fillrect,
 	.fb_copyarea	= hitfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init hitfb_init(void)
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c
--- a/drivers/video/hpfb.c
+++ b/drivers/video/hpfb.c
@@ -193,7 +193,6 @@ static struct fb_ops hpfb_ops = {
 	.fb_fillrect	= hpfb_fillrect,
 	.fb_copyarea	= hpfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_sync	= hpfb_sync,
 };
 
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1420,7 +1420,7 @@ static int i810fb_cursor(struct fb_info 
 
 	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
 	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1344,7 +1344,6 @@ static struct fb_ops imsttfb_ops = {
 	.fb_fillrect	= imsttfb_fillrect,
 	.fb_copyarea	= imsttfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl 	= imsttfb_ioctl,
 };
 
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -302,7 +302,7 @@ static struct fb_ops imxfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= imxfb_blank,
-	.fb_cursor	= soft_cursor, /* FIXME: i.MX can do hardware cursor */
+	/* FIXME: i.MX can do hardware cursor */
 };
 
 /*
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -4,7 +4,7 @@
  * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
  * integrated graphics chips.
  *
- * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org>
+ * Copyright  2002, 2003 David Dawes <dawes@xfree86.org>
  *                   2004 Sylvain Meyer
  *
  * This driver consists of two parts.  The first part (intelfbdrv.c) provides
@@ -1486,7 +1486,7 @@ intelfb_cursor(struct fb_info *info, str
 #endif
 
 	if (!dinfo->hwcursor)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	intelfbhw_cursor_hide(dinfo);
 
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -669,7 +669,6 @@ static struct fb_ops kyrofb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __devinit kyrofb_probe(struct pci_dev *pdev,
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -51,7 +51,6 @@ static struct fb_ops leo_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= leo_mmap,
 	.fb_ioctl		= leo_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 #define LEO_OFF_LC_SS0_KRN	0x00200000UL
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -589,7 +589,6 @@ static struct fb_ops macfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 void __init macfb_setup(char *options)
diff --git a/drivers/video/matrox/matroxfb_accel.c b/drivers/video/matrox/matroxfb_accel.c
--- a/drivers/video/matrox/matroxfb_accel.c
+++ b/drivers/video/matrox/matroxfb_accel.c
@@ -122,7 +122,6 @@ void matrox_cfbX_init(WPMINFO2) {
 	ACCESS_FBINFO(fbops).fb_copyarea = cfb_copyarea;
 	ACCESS_FBINFO(fbops).fb_fillrect = cfb_fillrect;
 	ACCESS_FBINFO(fbops).fb_imageblit = cfb_imageblit;
-	ACCESS_FBINFO(fbops).fb_cursor = soft_cursor;
 
 	accel = (ACCESS_FBINFO(fbcon).var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT;
 
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -576,7 +576,6 @@ static struct fb_ops matroxfb_dh_ops = {
 	.fb_fillrect =	cfb_fillrect,
 	.fb_copyarea =	cfb_copyarea,
 	.fb_imageblit =	cfb_imageblit,
-	.fb_cursor =	soft_cursor,
 };
 
 static struct fb_var_screeninfo matroxfb_dh_defined = {
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c
--- a/drivers/video/maxinefb.c
+++ b/drivers/video/maxinefb.c
@@ -113,7 +113,6 @@ static struct fb_ops maxinefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init maxinefb_init(void)
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -1665,7 +1665,6 @@ static struct fb_ops neofb_ops = {
 	.fb_fillrect	= neofb_fillrect,
 	.fb_copyarea	= neofb_copyarea,
 	.fb_imageblit	= neofb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -894,7 +894,7 @@ static int nvidiafb_cursor(struct fb_inf
 	int i, set = cursor->set;
 
 	if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	NVShowHideCursor(par, 0);
 
@@ -1351,8 +1351,6 @@ static int __devinit nvidia_set_fbinfo(s
 	info->pixmap.size = 8 * 1024;
 	info->pixmap.flags = FB_PIXMAP_SYSTEM;
 
-	if (!hwcur)
-		info->fbops->fb_cursor = soft_cursor;
 	info->var.accel_flags = (!noaccel);
 
 	switch (par->Architecture) {
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -85,7 +85,6 @@ static struct fb_ops offb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
     /*
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -48,7 +48,6 @@ static struct fb_ops p9100_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= p9100_mmap,
 	.fb_ioctl		= p9100_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* P9100 control registers */
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -109,7 +109,6 @@ static struct fb_ops platinumfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -1034,7 +1034,6 @@ static struct fb_ops pm2fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c
--- a/drivers/video/pmag-ba-fb.c
+++ b/drivers/video/pmag-ba-fb.c
@@ -117,7 +117,6 @@ static struct fb_ops pmagbafb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init pmagbafb_init_one(int slot)
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c
--- a/drivers/video/pmagb-b-fb.c
+++ b/drivers/video/pmagb-b-fb.c
@@ -118,8 +118,7 @@ static struct fb_ops pmagbbfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
-};
+;
 
 int __init pmagbbfb_init_one(int slot)
 {
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -230,7 +230,6 @@ static struct fb_ops pvr2fb_ops = {
 	.fb_fillrect 	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static struct fb_videomode pvr2_modedb[] __initdata = {
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -417,7 +417,6 @@ static struct fb_ops pxafb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= pxafb_blank,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= pxafb_mmap,
 };
 
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -84,7 +84,6 @@ static struct fb_ops q40fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __init q40fb_probe(struct device *device)
diff --git a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
--- a/drivers/video/radeonfb.c
+++ b/drivers/video/radeonfb.c
@@ -2218,7 +2218,6 @@ static struct fb_ops radeonfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 #endif
-	.fb_cursor	= soft_cursor,
 };
 
 
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -1587,7 +1587,7 @@ static int rivafb_cursor(struct fb_info 
 
 	if (cursor->image.width > MAX_CURS ||
 	    cursor->image.height > MAX_CURS)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	par->riva.ShowHideCursor(&par->riva, 0);
 
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -378,7 +378,6 @@ static struct fb_ops s1d13xxxfb_fbops = 
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor
 };
 
 static int s1d13xxxfb_width_tab[2][4] __devinitdata = {
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -851,7 +851,6 @@ static struct fb_ops sa1100fb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= sa1100fb_blank,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= sa1100fb_mmap,
 };
 
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -1417,7 +1417,6 @@ static struct fb_ops savagefb_ops = {
 	.fb_copyarea    = cfb_copyarea,
 	.fb_imageblit   = cfb_imageblit,
 #endif
-	.fb_cursor      = soft_cursor,
 };
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -124,7 +124,6 @@ static struct fb_ops sgivwfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= sgivwfb_mmap,
 };
 
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -2269,7 +2269,6 @@ static struct fb_ops sisfb_ops = {
 	.fb_fillrect    = fbcon_sis_fillrect,
 	.fb_copyarea    = fbcon_sis_copyarea,
 	.fb_imageblit   = cfb_imageblit,
-	.fb_cursor      = soft_cursor,
 	.fb_sync        = fbcon_sis_sync,
 	.fb_ioctl       = sisfb_ioctl,
 #ifdef CONFIG_COMPAT
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -1382,7 +1382,6 @@ static struct fb_ops sstfb_ops = {
 	.fb_fillrect	= cfb_fillrect, /* sstfb_fillrect */
 	.fb_copyarea	= cfb_copyarea, /* sstfb_copyarea */
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl	= sstfb_ioctl,
 };
 
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -1147,7 +1147,6 @@ static struct fb_ops stifb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor      = soft_cursor,
 };
 
 
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -52,7 +52,6 @@ static struct fb_ops tcx_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= tcx_mmap,
 	.fb_ioctl		= tcx_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* THC definitions */
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -4,7 +4,7 @@
  *
  * Author: Hannu Mallat <hmallat@cc.hut.fi>
  *
- * Copyright © 1999 Hannu Mallat
+ * Copyright  1999 Hannu Mallat
  * All rights reserved
  *
  * Created      : Thu Sep 23 18:17:43 1999, hmallat
@@ -184,7 +184,6 @@ static struct fb_ops tdfxfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 #endif
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -63,7 +63,6 @@ static struct fb_ops tgafb_ops = {
 	.fb_fillrect		= tgafb_fillrect,
 	.fb_copyarea		= tgafb_copyarea,
 	.fb_imageblit		= tgafb_imageblit,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -1282,7 +1282,6 @@ static struct fb_ops tridentfb_ops = {
 	.fb_fillrect = tridentfb_fillrect,
 	.fb_copyarea= tridentfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
-	.fb_cursor = soft_cursor,
 };
 
 module_init(tridentfb_init);
diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c
--- a/drivers/video/tx3912fb.c
+++ b/drivers/video/tx3912fb.c
@@ -89,7 +89,6 @@ static struct fb_ops tx3912fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int tx3912fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
--- a/drivers/video/valkyriefb.c
+++ b/drivers/video/valkyriefb.c
@@ -135,7 +135,6 @@ static struct fb_ops valkyriefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* Sets the video mode according to info->var */
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -179,7 +179,6 @@ static struct fb_ops vesafb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __init vesafb_setup(char *options)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -90,7 +90,6 @@ static struct fb_ops vfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= vfb_mmap,
 };
 
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1326,7 +1326,6 @@ static struct fb_ops vga16fb_ops = {
 	.fb_fillrect	= vga16fb_fillrect,
 	.fb_copyarea	= vga16fb_copyarea,
 	.fb_imageblit	= vga16fb_imageblit,
-	.fb_cursor      = soft_cursor,
 };
 
 #ifndef MODULE
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -473,7 +473,6 @@ static struct fb_ops w100fb_ops = {
 	.fb_fillrect = cfb_fillrect,
 	.fb_copyarea = cfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
-	.fb_cursor = soft_cursor,
 };
 
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11  4:57 PATCH: move soft_cursor into fbconsole Jon Smirl
@ 2005-06-11  6:15 ` James Simmons
  2005-06-11 13:10   ` Jon Smirl
  2005-06-11 13:23   ` Jon Smirl
  2005-06-11 20:35 ` Geert Uytterhoeven
  1 sibling, 2 replies; 27+ messages in thread
From: James Simmons @ 2005-06-11  6:15 UTC (permalink / raw)
  To: Jon Smirl; +Cc: fbdev, Antonino A. Daplas, James Simmons


Ug no. I see in the future more drivers using hardware cursors instead.
We would be carry around extra software cursor code in the the framebuffer 
console all the time. We need to properly fix the cursor code. Unfortunely 
that will take more work. In the mean time please encourage people to 
support hardware cursors. Even crappy cards have hardware cursors most of 
the time.

On Sat, 11 Jun 2005, Jon Smirl wrote:

> James has indicated that the soft_cursor only works with fbconsole and
> it won't work from user space. This means that soft_cursor is in the
> way of using a hardware cursor from user space. This patch removes
> soft_cursor from all of the drivers. So if the driver doesn't support
> a hardware cursor fb_cursor is NULL.
> 
> I also fixed the three drivers with hardware implementation. These
> drivers had cases where the hardware cursor had an error and then
> returned the software one instead. Now they return -ENODEV when they
> can't use the hardware one.
> 
> In console/bitlbt.c I made this change:
> 	/* First try the hardware cursor */
> 	if (info->fbops->fb_cursor)
> 		err = info->fbops->fb_cursor(info, &cursor);
> 	/* if that doesn't exist or didn't work, use the software one */
> 	if (err)
> 		soft_cursor(info, &cursor);
> 
> The effect of all of this is the make a clear path for getting to
> hardware cursors without triggering the soft_cursor fallback.
> Triggering of the fallback was moved into fb_console. This also lets
> me remove the softcursor module from memory when fb_console is not
> loaded.
> 
> Give this a try and let me know what you think. 
> 
> -- 
> Jon Smirl
> jonsmirl@gmail.com
> 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11  6:15 ` James Simmons
@ 2005-06-11 13:10   ` Jon Smirl
  2005-06-11 13:23   ` Jon Smirl
  1 sibling, 0 replies; 27+ messages in thread
From: Jon Smirl @ 2005-06-11 13:10 UTC (permalink / raw)
  To: James Simmons; +Cc: fbdev, Antonino A. Daplas, James Simmons

On 6/11/05, James Simmons <jsimmons@www.infradead.org> wrote:
> 
> Ug no. I see in the future more drivers using hardware cursors instead.
> We would be carry around extra software cursor code in the the framebuffer
> console all the time. We need to properly fix the cursor code. Unfortunely
> that will take more work. In the mean time please encourage people to
> support hardware cursors. Even crappy cards have hardware cursors most of
> the time.

The way things are now I can't use the hardware cursors without
triggering the software one.  The way I changed it user space (when
the interface is finished) will get hardware or nothing. fbconsole
will get the same hardware or nothing, but if nothing it implements a
software cursor.

The question here is who is responsible for generating a software
cursor, is it the hardware driver's responsibility or the app using
the system? fbconsole would be considered an app using the system.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11  6:15 ` James Simmons
  2005-06-11 13:10   ` Jon Smirl
@ 2005-06-11 13:23   ` Jon Smirl
  1 sibling, 0 replies; 27+ messages in thread
From: Jon Smirl @ 2005-06-11 13:23 UTC (permalink / raw)
  To: James Simmons; +Cc: fbdev, Antonino A. Daplas, James Simmons

On 6/11/05, James Simmons <jsimmons@www.infradead.org> wrote:
> 
> Ug no. I see in the future more drivers using hardware cursors instead.
> We would be carry around extra software cursor code in the the framebuffer
> console all the time. We need to properly fix the cursor code. Unfortunely
> that will take more work. In the mean time please encourage people to
> support hardware cursors. Even crappy cards have hardware cursors most of
> the time.

Also, I didn't delete the fb_cursor field. I just removed all of the
assignments of .fb_cursor = soft_cursor. The field is still there and
defaulting to null, except in the three drivers with hardware cursors
where it is set.

For a driver to implement software cursors it has to know the location
of the scanout buffer, scanbuffer format, etc. I not sure if all of
this is always know for user space apps. The hardware cursor doesn't
need as much info about the framebuffer.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11  4:57 PATCH: move soft_cursor into fbconsole Jon Smirl
  2005-06-11  6:15 ` James Simmons
@ 2005-06-11 20:35 ` Geert Uytterhoeven
  2005-06-11 22:01   ` Jon Smirl
  1 sibling, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2005-06-11 20:35 UTC (permalink / raw)
  To: fbdev; +Cc: Antonino A. Daplas, James Simmons

On Sat, 11 Jun 2005, Jon Smirl wrote:
> James has indicated that the soft_cursor only works with fbconsole and
> it won't work from user space. This means that soft_cursor is in the
> way of using a hardware cursor from user space. This patch removes
> soft_cursor from all of the drivers. So if the driver doesn't support
> a hardware cursor fb_cursor is NULL.
> 
> I also fixed the three drivers with hardware implementation. These
> drivers had cases where the hardware cursor had an error and then
> returned the software one instead. Now they return -ENODEV when they
> can't use the hardware one.
> 
> In console/bitlbt.c I made this change:
> 	/* First try the hardware cursor */
> 	if (info->fbops->fb_cursor)
> 		err = info->fbops->fb_cursor(info, &cursor);
> 	/* if that doesn't exist or didn't work, use the software one */
> 	if (err)
> 		soft_cursor(info, &cursor);
> 
> The effect of all of this is the make a clear path for getting to
> hardware cursors without triggering the soft_cursor fallback.
> Triggering of the fallback was moved into fb_console. This also lets
> me remove the softcursor module from memory when fb_console is not
> loaded.
> 
> Give this a try and let me know what you think. 

This patch corrupts some comments in drivers/video/amifb.c.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11 20:35 ` Geert Uytterhoeven
@ 2005-06-11 22:01   ` Jon Smirl
  2005-06-12  7:43     ` Geert Uytterhoeven
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-11 22:01 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Antonino A. Daplas, James Simmons

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

On 6/11/05, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> This patch corrupts some comments in drivers/video/amifb.c.

This should fix it. I touched up a few other places with unintended
changes. I don't think all of the fbdev files have been authored using
the same codepage.


-- 
Jon Smirl
jonsmirl@gmail.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: soft_cursor.patch --]
[-- Type: text/x-diff; name="soft_cursor.patch", Size: 23996 bytes --]

diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c
--- a/drivers/video/68328fb.c
+++ b/drivers/video/68328fb.c
@@ -113,7 +113,6 @@ static struct fb_ops mc68x328fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= mc68x328fb_mmap,
 };
 
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -926,7 +926,6 @@ static struct fb_ops acornfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_mmap	= acornfb_mmap,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -332,7 +332,6 @@ static struct fb_ops clcdfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= clcdfb_mmap,
 };
 
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -1185,7 +1185,6 @@ static struct fb_ops amifb_ops = {
 	.fb_fillrect	= amifb_fillrect,
 	.fb_copyarea	= amifb_copyarea,
 	.fb_imageblit	= amifb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl	= amifb_ioctl,
 };
 
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -106,7 +106,6 @@ static struct fb_ops asiliantfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* Calculate the ratios for the dot clocks without using a single long long
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -480,7 +480,6 @@ static struct fb_ops aty128fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 #ifdef CONFIG_PMAC_BACKLIGHT
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -292,7 +292,6 @@ static struct fb_ops atyfb_ops = {
 	.fb_fillrect	= atyfb_fillrect,
 	.fb_copyarea	= atyfb_copyarea,
 	.fb_imageblit	= atyfb_imageblit,
-	.fb_cursor	= soft_cursor,
 #ifdef __sparc__
 	.fb_mmap	= atyfb_mmap,
 #endif
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1873,7 +1873,6 @@ static struct fb_ops radeonfb_ops = {
 	.fb_fillrect		= radeonfb_fillrect,
 	.fb_copyarea		= radeonfb_copyarea,
 	.fb_imageblit		= radeonfb_imageblit,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -51,7 +51,6 @@ static struct fb_ops bw2_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= bw2_mmap,
 	.fb_ioctl		= bw2_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* OBio addresses for the bwtwo registers */
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -49,7 +49,6 @@ static struct fb_ops cg14_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= cg14_mmap,
 	.fb_ioctl		= cg14_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 #define CG14_MCR_INTENABLE_SHIFT	7
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -50,7 +50,6 @@ static struct fb_ops cg3_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= cg3_mmap,
 	.fb_ioctl		= cg3_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -54,7 +54,6 @@ static struct fb_ops cg6_ops = {
 	.fb_sync		= cg6_sync,
 	.fb_mmap		= cg6_mmap,
 	.fb_ioctl		= cg6_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* Offset of interesting structures in the OBIO space */
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -104,7 +104,6 @@ static struct fb_ops chipsfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int chipsfb_check_var(struct fb_var_screeninfo *var,
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -548,7 +548,6 @@ static struct fb_ops cirrusfb_ops = {
 	.fb_fillrect	= cirrusfb_fillrect,
 	.fb_copyarea	= cirrusfb_copyarea,
 	.fb_imageblit	= cirrusfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*--- Hardware Specific Routines -------------------------------------------*/
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -219,7 +219,6 @@ static struct fb_ops clps7111fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int 
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -248,6 +248,7 @@ static void bit_cursor(struct vc_data *v
 	int y = real_y(p, vc->vc_y);
 	int attribute, use_sw = (vc->vc_cursor_type & 0x10);
 	char *src;
+	int err = -ENODEV;
 
 	cursor.set = 0;
 
@@ -383,7 +384,12 @@ static void bit_cursor(struct vc_data *v
 	cursor.image.depth = 1;
 	cursor.rop = ROP_XOR;
 
-	info->fbops->fb_cursor(info, &cursor);
+	/* First try the hardware cursor */
+	if (info->fbops->fb_cursor)
+		err = info->fbops->fb_cursor(info, &cursor);
+	/* if that doesn't exist or didn't work, use the software one */
+	if (err)
+		soft_cursor(info, &cursor);
 
 	ops->cursor_reset = 0;
 }
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -176,7 +176,6 @@ static struct fb_ops controlfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1064,7 +1064,6 @@ static struct fb_ops cyber2000fb_ops = {
 	.fb_fillrect	= cyber2000fb_fillrect,
 	.fb_copyarea	= cyber2000fb_copyarea,
 	.fb_imageblit	= cyber2000fb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_sync	= cyber2000fb_sync,
 };
 
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c
--- a/drivers/video/dnfb.c
+++ b/drivers/video/dnfb.c
@@ -114,7 +114,6 @@ static struct fb_ops dn_fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= dnfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 struct fb_var_screeninfo dnfb_var __devinitdata = {
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -482,7 +482,6 @@ static struct fb_ops epson1355fb_fbops =
 	.fb_imageblit 	= cfb_imageblit,
 	.fb_read 	= epson1355fb_read,
 	.fb_write 	= epson1355fb_write,
-	.fb_cursor 	= soft_cursor,
 };
 
 /* ------------------------------------------------------------------------- */
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -59,7 +59,6 @@ static struct fb_ops ffb_ops = {
 	.fb_ioctl		= ffb_ioctl,
 
 	/* XXX Use FFB hw cursor once fb cursor API is better understood... */
-	.fb_cursor		= soft_cursor,
 };
 
 /* Register layout and definitions */
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
--- a/drivers/video/fm2fb.c
+++ b/drivers/video/fm2fb.c
@@ -172,7 +172,6 @@ static struct fb_ops fm2fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
     /*
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -1038,7 +1038,6 @@ static struct fb_ops gbefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
--- a/drivers/video/geode/gx1fb_core.c
+++ b/drivers/video/geode/gx1fb_core.c
@@ -213,7 +213,6 @@ static struct fb_ops gx1fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static struct fb_info * __init gx1fb_init_fbinfo(void)
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -262,7 +262,6 @@ static struct fb_ops hitfb_ops = {
 	.fb_fillrect	= hitfb_fillrect,
 	.fb_copyarea	= hitfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init hitfb_init(void)
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c
--- a/drivers/video/hpfb.c
+++ b/drivers/video/hpfb.c
@@ -193,7 +193,6 @@ static struct fb_ops hpfb_ops = {
 	.fb_fillrect	= hpfb_fillrect,
 	.fb_copyarea	= hpfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_sync	= hpfb_sync,
 };
 
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1420,7 +1420,7 @@ static int i810fb_cursor(struct fb_info 
 
 	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
 	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1344,7 +1344,6 @@ static struct fb_ops imsttfb_ops = {
 	.fb_fillrect	= imsttfb_fillrect,
 	.fb_copyarea	= imsttfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl 	= imsttfb_ioctl,
 };
 
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -302,7 +302,7 @@ static struct fb_ops imxfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= imxfb_blank,
-	.fb_cursor	= soft_cursor, /* FIXME: i.MX can do hardware cursor */
+	/* FIXME: i.MX can do hardware cursor */
 };
 
 /*
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -1486,7 +1486,7 @@ intelfb_cursor(struct fb_info *info, str
 #endif
 
 	if (!dinfo->hwcursor)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	intelfbhw_cursor_hide(dinfo);
 
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -669,7 +669,6 @@ static struct fb_ops kyrofb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __devinit kyrofb_probe(struct pci_dev *pdev,
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -51,7 +51,6 @@ static struct fb_ops leo_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= leo_mmap,
 	.fb_ioctl		= leo_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 #define LEO_OFF_LC_SS0_KRN	0x00200000UL
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -589,7 +589,6 @@ static struct fb_ops macfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 void __init macfb_setup(char *options)
diff --git a/drivers/video/matrox/matroxfb_accel.c b/drivers/video/matrox/matroxfb_accel.c
--- a/drivers/video/matrox/matroxfb_accel.c
+++ b/drivers/video/matrox/matroxfb_accel.c
@@ -122,7 +122,6 @@ void matrox_cfbX_init(WPMINFO2) {
 	ACCESS_FBINFO(fbops).fb_copyarea = cfb_copyarea;
 	ACCESS_FBINFO(fbops).fb_fillrect = cfb_fillrect;
 	ACCESS_FBINFO(fbops).fb_imageblit = cfb_imageblit;
-	ACCESS_FBINFO(fbops).fb_cursor = soft_cursor;
 
 	accel = (ACCESS_FBINFO(fbcon).var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT;
 
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -576,7 +576,6 @@ static struct fb_ops matroxfb_dh_ops = {
 	.fb_fillrect =	cfb_fillrect,
 	.fb_copyarea =	cfb_copyarea,
 	.fb_imageblit =	cfb_imageblit,
-	.fb_cursor =	soft_cursor,
 };
 
 static struct fb_var_screeninfo matroxfb_dh_defined = {
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c
--- a/drivers/video/maxinefb.c
+++ b/drivers/video/maxinefb.c
@@ -113,7 +113,6 @@ static struct fb_ops maxinefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init maxinefb_init(void)
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -1665,7 +1665,6 @@ static struct fb_ops neofb_ops = {
 	.fb_fillrect	= neofb_fillrect,
 	.fb_copyarea	= neofb_copyarea,
 	.fb_imageblit	= neofb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -894,7 +894,7 @@ static int nvidiafb_cursor(struct fb_inf
 	int i, set = cursor->set;
 
 	if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	NVShowHideCursor(par, 0);
 
@@ -1351,8 +1351,6 @@ static int __devinit nvidia_set_fbinfo(s
 	info->pixmap.size = 8 * 1024;
 	info->pixmap.flags = FB_PIXMAP_SYSTEM;
 
-	if (!hwcur)
-		info->fbops->fb_cursor = soft_cursor;
 	info->var.accel_flags = (!noaccel);
 
 	switch (par->Architecture) {
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -85,7 +85,6 @@ static struct fb_ops offb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
     /*
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -48,7 +48,6 @@ static struct fb_ops p9100_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= p9100_mmap,
 	.fb_ioctl		= p9100_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* P9100 control registers */
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -109,7 +109,6 @@ static struct fb_ops platinumfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -1034,7 +1034,6 @@ static struct fb_ops pm2fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c
--- a/drivers/video/pmag-ba-fb.c
+++ b/drivers/video/pmag-ba-fb.c
@@ -117,7 +117,6 @@ static struct fb_ops pmagbafb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 int __init pmagbafb_init_one(int slot)
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c
--- a/drivers/video/pmagb-b-fb.c
+++ b/drivers/video/pmagb-b-fb.c
@@ -118,8 +118,7 @@ static struct fb_ops pmagbbfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
-};
+;
 
 int __init pmagbbfb_init_one(int slot)
 {
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -230,7 +230,6 @@ static struct fb_ops pvr2fb_ops = {
 	.fb_fillrect 	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static struct fb_videomode pvr2_modedb[] __initdata = {
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -417,7 +417,6 @@ static struct fb_ops pxafb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= pxafb_blank,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= pxafb_mmap,
 };
 
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -84,7 +84,6 @@ static struct fb_ops q40fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __init q40fb_probe(struct device *device)
diff --git a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
--- a/drivers/video/radeonfb.c
+++ b/drivers/video/radeonfb.c
@@ -2218,7 +2218,6 @@ static struct fb_ops radeonfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 #endif
-	.fb_cursor	= soft_cursor,
 };
 
 
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -1587,7 +1587,7 @@ static int rivafb_cursor(struct fb_info 
 
 	if (cursor->image.width > MAX_CURS ||
 	    cursor->image.height > MAX_CURS)
-		return soft_cursor(info, cursor);
+		return -ENODEV;
 
 	par->riva.ShowHideCursor(&par->riva, 0);
 
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -378,7 +378,6 @@ static struct fb_ops s1d13xxxfb_fbops = 
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor
 };
 
 static int s1d13xxxfb_width_tab[2][4] __devinitdata = {
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -851,7 +851,6 @@ static struct fb_ops sa1100fb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= sa1100fb_blank,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= sa1100fb_mmap,
 };
 
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -1417,7 +1417,6 @@ static struct fb_ops savagefb_ops = {
 	.fb_copyarea    = cfb_copyarea,
 	.fb_imageblit   = cfb_imageblit,
 #endif
-	.fb_cursor      = soft_cursor,
 };
 
 /* --------------------------------------------------------------------- */
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -124,7 +124,6 @@ static struct fb_ops sgivwfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= sgivwfb_mmap,
 };
 
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -2269,7 +2269,6 @@ static struct fb_ops sisfb_ops = {
 	.fb_fillrect    = fbcon_sis_fillrect,
 	.fb_copyarea    = fbcon_sis_copyarea,
 	.fb_imageblit   = cfb_imageblit,
-	.fb_cursor      = soft_cursor,
 	.fb_sync        = fbcon_sis_sync,
 	.fb_ioctl       = sisfb_ioctl,
 #ifdef CONFIG_COMPAT
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -1382,7 +1382,6 @@ static struct fb_ops sstfb_ops = {
 	.fb_fillrect	= cfb_fillrect, /* sstfb_fillrect */
 	.fb_copyarea	= cfb_copyarea, /* sstfb_copyarea */
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_ioctl	= sstfb_ioctl,
 };
 
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -1147,7 +1147,6 @@ static struct fb_ops stifb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor      = soft_cursor,
 };
 
 
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -52,7 +52,6 @@ static struct fb_ops tcx_ops = {
 	.fb_imageblit		= cfb_imageblit,
 	.fb_mmap		= tcx_mmap,
 	.fb_ioctl		= tcx_ioctl,
-	.fb_cursor		= soft_cursor,
 };
 
 /* THC definitions */
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -184,7 +184,6 @@ static struct fb_ops tdfxfb_ops = {
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
 #endif
-	.fb_cursor	= soft_cursor,
 };
 
 /*
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -63,7 +63,6 @@ static struct fb_ops tgafb_ops = {
 	.fb_fillrect		= tgafb_fillrect,
 	.fb_copyarea		= tgafb_copyarea,
 	.fb_imageblit		= tgafb_imageblit,
-	.fb_cursor		= soft_cursor,
 };
 
 
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -1282,7 +1282,6 @@ static struct fb_ops tridentfb_ops = {
 	.fb_fillrect = tridentfb_fillrect,
 	.fb_copyarea= tridentfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
-	.fb_cursor = soft_cursor,
 };
 
 module_init(tridentfb_init);
diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c
--- a/drivers/video/tx3912fb.c
+++ b/drivers/video/tx3912fb.c
@@ -89,7 +89,6 @@ static struct fb_ops tx3912fb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int tx3912fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
--- a/drivers/video/valkyriefb.c
+++ b/drivers/video/valkyriefb.c
@@ -135,7 +135,6 @@ static struct fb_ops valkyriefb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 /* Sets the video mode according to info->var */
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -179,7 +179,6 @@ static struct fb_ops vesafb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 };
 
 static int __init vesafb_setup(char *options)
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -90,7 +90,6 @@ static struct fb_ops vfb_ops = {
 	.fb_fillrect	= cfb_fillrect,
 	.fb_copyarea	= cfb_copyarea,
 	.fb_imageblit	= cfb_imageblit,
-	.fb_cursor	= soft_cursor,
 	.fb_mmap	= vfb_mmap,
 };
 
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1326,7 +1326,6 @@ static struct fb_ops vga16fb_ops = {
 	.fb_fillrect	= vga16fb_fillrect,
 	.fb_copyarea	= vga16fb_copyarea,
 	.fb_imageblit	= vga16fb_imageblit,
-	.fb_cursor      = soft_cursor,
 };
 
 #ifndef MODULE
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -473,7 +473,6 @@ static struct fb_ops w100fb_ops = {
 	.fb_fillrect = cfb_fillrect,
 	.fb_copyarea = cfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
-	.fb_cursor = soft_cursor,
 };
 
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-11 22:01   ` Jon Smirl
@ 2005-06-12  7:43     ` Geert Uytterhoeven
  2005-06-16  1:34       ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2005-06-12  7:43 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development; +Cc: Antonino A. Daplas, James Simmons

On Sat, 11 Jun 2005, Jon Smirl wrote:
> On 6/11/05, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > This patch corrupts some comments in drivers/video/amifb.c.
> 
> This should fix it. I touched up a few other places with unintended

Thx!

> changes. I don't think all of the fbdev files have been authored using
> the same codepage.

The original ones were ISO-8859-1 or -15 (anyone who puts EURO-signs in GPLed
source code? :-). But these days the preferred encoding is UTF-8.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-12  7:43     ` Geert Uytterhoeven
@ 2005-06-16  1:34       ` Jon Smirl
  2005-06-16  3:11         ` Antonino A. Daplas
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-16  1:34 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Antonino A. Daplas, James Simmons

Are there still issues with this patch?

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-16  1:34       ` Jon Smirl
@ 2005-06-16  3:11         ` Antonino A. Daplas
  2005-06-16  3:37           ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: Antonino A. Daplas @ 2005-06-16  3:11 UTC (permalink / raw)
  To: linux-fbdev-devel, Jon Smirl; +Cc: James Simmons

On Thursday 16 June 2005 09:34, Jon Smirl wrote:
> Are there still issues with this patch?

Maybe.  A few drivers will set the fb_cursor field to either
soft_cursor or the driver-specific cursor function, depending
on the kernel boot options or setting of the var.accel flag.

The changes required are probably minor.

Tony





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-16  3:11         ` Antonino A. Daplas
@ 2005-06-16  3:37           ` Jon Smirl
  2005-06-21  0:07             ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-16  3:37 UTC (permalink / raw)
  To: adaplas; +Cc: linux-fbdev-devel, James Simmons

On 6/15/05, Antonino A. Daplas <adaplas@hotpop.com> wrote:
> On Thursday 16 June 2005 09:34, Jon Smirl wrote:
> > Are there still issues with this patch?
> 
> Maybe.  A few drivers will set the fb_cursor field to either
> soft_cursor or the driver-specific cursor function, depending
> on the kernel boot options or setting of the var.accel flag.

I think there were three driver implementing hardware cursors. 
I tried to keep them working, they only needed minor touchups.

If they had fallbacks to the software cursor I removed those and
returned an error instead. Instead fbconsole will get the error and
switch to software cursor. If HW cursors are going to work from user
space they can't contain SW cursor fallbacks.

The patch should move softcursor.c into the fbconsole subdirectory but
I can't figure out how to do that with git yet.

> 
> The changes required are probably minor.
> 
> Tony
> 
> 
> 
> 


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-16  3:37           ` Jon Smirl
@ 2005-06-21  0:07             ` James Simmons
  2005-06-21  0:31               ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: James Simmons @ 2005-06-21  0:07 UTC (permalink / raw)
  To: Jon Smirl; +Cc: adaplas, linux-fbdev-devel, James Simmons


> On 6/15/05, Antonino A. Daplas <adaplas@hotpop.com> wrote:
> > On Thursday 16 June 2005 09:34, Jon Smirl wrote:
> > > Are there still issues with this patch?
> > 
> > Maybe.  A few drivers will set the fb_cursor field to either
> > soft_cursor or the driver-specific cursor function, depending
> > on the kernel boot options or setting of the var.accel flag.
> 
> I think there were three driver implementing hardware cursors. 
> I tried to keep them working, they only needed minor touchups.
> 
> If they had fallbacks to the software cursor I removed those and
> returned an error instead. Instead fbconsole will get the error and
> switch to software cursor. If HW cursors are going to work from user
> space they can't contain SW cursor fallbacks.
> 
> The patch should move softcursor.c into the fbconsole subdirectory but
> I can't figure out how to do that with git yet.
> 
> > 
> > The changes required are probably minor.
> > 
> > Tony

I agree we should not fall back to the software cursor when the hardware 
cursor fails. Do we really want to eliminate the cursor from the device 
interface if it is not a hardware cursor? Shouldn't the cursor always 
work? That is the question.
 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-21  0:07             ` James Simmons
@ 2005-06-21  0:31               ` Jon Smirl
  2005-06-24  0:09                 ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-21  0:31 UTC (permalink / raw)
  To: James Simmons; +Cc: adaplas, linux-fbdev-devel, James Simmons

On 6/20/05, James Simmons <jsimmons@www.infradead.org> wrote:
> I agree we should not fall back to the software cursor when the hardware
> cursor fails. Do we really want to eliminate the cursor from the device
> interface if it is not a hardware cursor? Shouldn't the cursor always
> work? That is the question.

I don't think there really is a choice here. Fbdev has to implement
the hardware cursor. The software one is application specific.
fbconsole and X implement it completely differently. I don't think
there is a way to implement a general software cursor.

fbdev provides hardware or nothing
if no hardware cursor, cursor is up to app
fbconsole and X then provide two different fallback schemes.

For example I don't think we have enough info to implement X's
software cursor in the fbdev driver. We would need some way to know
when X is updating the screen via paint or buffer swaps. Wouldn't that
be a total mess for fbdev to track and a new API would be needed.

We just never noticed the problem before since only one client
(fbconsole) was using the cursor. Current X is programming the
hardware cursor from user space.

After this change it would probably be cleaner to just eliminate the
softcursor module and compile softcursor into fbconsole. softcursor.c
would be moved to the fbconsole subdir if you can figure out how to
tell git to do a mv. But we can always save these changes for later.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-21  0:31               ` Jon Smirl
@ 2005-06-24  0:09                 ` James Simmons
  2005-06-24 12:26                   ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: James Simmons @ 2005-06-24  0:09 UTC (permalink / raw)
  To: Jon Smirl; +Cc: adaplas, Linux Fbdev development list


> For example I don't think we have enough info to implement X's
> software cursor in the fbdev driver. We would need some way to know
> when X is updating the screen via paint or buffer swaps. Wouldn't that
> be a total mess for fbdev to track and a new API would be needed.

    I was pondering this and you are right. For the software cursor you 
need to blend the cursor image with what data is in the framebuffer at that 
location. If we have a concurrent thread that updates that area of the 
framebuffer then we would have to notify the cursor of the change to 
update that region of the screen with proper data. There is no clean way 
to do this. 
	Now I was thinking instead of a massive move of the the software 
cursor we add a flag FBINFO_HWACCEL_CURSOR to tell us if we are using a
hardware cursor. This way for the sysfs interface you can test to see if 
it is a hardware cursor and only allow userland to access a hardware 
cursor. Here is a patch for that. People please try it out.


diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-06-23 16:45:21.000000000 -0700
@@ -219,8 +219,8 @@
 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
 	info->sprite.flags = FB_PIXMAP_IO;
 
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	info->fbops->fb_cursor = atyfb_cursor;
-
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
--- linus-2.6/drivers/video/i810/i810_main.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-06-23 16:47:50.000000000 -0700
@@ -1375,7 +1375,6 @@
 	decode_var(&info->var, par);
 	i810_load_regs(par);
 	i810_init_cursor(par);
-
 	encode_fix(&info->fix, info);
 
 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
@@ -1387,6 +1386,7 @@
 		info->pixmap.scan_align = 1;
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	return 0;
 }
 
@@ -1420,7 +1420,7 @@
 
 	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
 	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+		return -ENXIO;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-23 17:04:24.000000000 -0700
@@ -117,14 +117,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
@@ -242,7 +238,7 @@
 static char *mode       = NULL;
 
 module_param(accel, bool, S_IRUGO);
-MODULE_PARM_DESC(accel, "Enable console acceleration");
+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
 module_param(vram, int, S_IRUGO);
 MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
 module_param(voffset, int, S_IRUGO);
@@ -498,7 +494,7 @@
 {
 	struct fb_info *info;
 	struct intelfb_info *dinfo;
-	int i, j, err, dvo;
+	int i, err, dvo;
 	int aperture_size, stolen_size;
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
@@ -841,13 +837,6 @@
 	if (bailearly == 5)
 		bailout(dinfo);
 
-	for (i = 0; i < 16; i++) {
-		j = color_table[i];
-		dinfo->palette[i].red = default_red[j];
-		dinfo->palette[i].green = default_grn[j];
-		dinfo->palette[i].blue = default_blu[j];
-	}
-
 	if (bailearly == 6)
 		bailout(dinfo);
 
@@ -1328,9 +1317,10 @@
 	if (ACCEL(dinfo, info)) {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
-		FBINFO_HWACCEL_IMAGEBLIT;
+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
 	} else {
-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
+		FBINFO_HWACCEL_CURSOR;
 	}
 	kfree(hw);
 	return 0;
@@ -1359,10 +1349,6 @@
 			green >>= 8;
 			blue >>= 8;
 
-			dinfo->palette[regno].red = red;
-			dinfo->palette[regno].green = green;
-			dinfo->palette[regno].blue = blue;
-
 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
 					    transp);
 		}
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-06-23 17:03:59.000000000 -0700
@@ -234,7 +234,6 @@
 
 	/* palette */
 	u32 pseudo_palette[17];
-	struct { u8 red, green, blue, pad; } palette[256];
 
 	/* chip info */
 	int pci_chipset;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-06-23 16:32:22.000000000 -0700
@@ -29,14 +29,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-06-23 16:51:38.000000000 -0700
@@ -1300,6 +1300,7 @@
 	    | FBINFO_HWACCEL_IMAGEBLIT
 	    | FBINFO_HWACCEL_FILLRECT
 	    | FBINFO_HWACCEL_COPYAREA
+	    | FBINFO_HWACCEL_CURSOR
 	    | FBINFO_HWACCEL_YPAN;
 
 	fb_videomode_to_modelist(info->monspecs.modedb,
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
--- linus-2.6/drivers/video/riva/fbdev.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-06-23 16:51:14.000000000 -0700
@@ -1704,7 +1704,8 @@
 		    | FBINFO_HWACCEL_YPAN
 		    | FBINFO_HWACCEL_COPYAREA
 		    | FBINFO_HWACCEL_FILLRECT
-	            | FBINFO_HWACCEL_IMAGEBLIT;
+	            | FBINFO_HWACCEL_IMAGEBLIT
+		    | FBINFO_HWACCEL_CURSOR;
 
 	/* Accel seems to not work properly on NV30 yet...*/
 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
--- linus-2.6/include/linux/fb.h	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/include/linux/fb.h	2005-06-23 16:44:55.000000000 -0700
@@ -702,6 +702,7 @@
 #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
 #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
 #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
+#define FBINFO_HWACCEL_CURSOR		0x8000 /* optional */
 
 #define FBINFO_MISC_USEREVENT          0x10000 /* event request
 						  from userspace */




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24  0:09                 ` James Simmons
@ 2005-06-24 12:26                   ` Jon Smirl
  2005-06-24 16:17                     ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-24 12:26 UTC (permalink / raw)
  To: James Simmons; +Cc: adaplas, Linux Fbdev development list

On 6/23/05, James Simmons <jsimmons@www.infradead.org> wrote:
>         Now I was thinking instead of a massive move of the the software
> cursor we add a flag FBINFO_HWACCEL_CURSOR to tell us if we are using a
> hardware cursor. This way for the sysfs interface you can test to see if
> it is a hardware cursor and only allow userland to access a hardware
> cursor. Here is a patch for that. People please try it out.

Your code will work, but it is conceptually what we want to do?
Software cursors are application specific. The soft cursor implemented
in fbdev really belongs to fbconsole.  If we get another in-kernel
user with a different update pattern (maybe they use the GPU) they
will want a different soft cursor. Shouldn't we just move the current
soft cursor into fbconsole? Given that software cursors are
application specific fbdev should not contain one.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24 12:26                   ` Jon Smirl
@ 2005-06-24 16:17                     ` James Simmons
  2005-06-24 16:27                       ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: James Simmons @ 2005-06-24 16:17 UTC (permalink / raw)
  To: Jon Smirl; +Cc: James Simmons, adaplas, Linux Fbdev development list


> >         Now I was thinking instead of a massive move of the the software
> > cursor we add a flag FBINFO_HWACCEL_CURSOR to tell us if we are using a
> > hardware cursor. This way for the sysfs interface you can test to see if
> > it is a hardware cursor and only allow userland to access a hardware
> > cursor. Here is a patch for that. People please try it out.
> 
> Your code will work, but it is conceptually what we want to do?
> Software cursors are application specific. The soft cursor implemented
> in fbdev really belongs to fbconsole.  If we get another in-kernel
> user with a different update pattern (maybe they use the GPU) they
> will want a different soft cursor. Shouldn't we just move the current
> soft cursor into fbconsole? Given that software cursors are
> application specific fbdev should not contain one.

The only reason I'm against that is then when the developer with the 
different update pattern will create a new fbconsole. We could end up 
with several fbconsoles. I really like to keep it down to one. So I rather 
deal with several cursor implementation instead of several fbconsoles.
Also remember that the software cursor is generically wrapped around the
the imageblit function. Since imageblit is independent of the update 
pattern we will be okay.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24 16:17                     ` James Simmons
@ 2005-06-24 16:27                       ` Jon Smirl
  2005-06-24 17:13                         ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-24 16:27 UTC (permalink / raw)
  To: James Simmons; +Cc: James Simmons, adaplas, Linux Fbdev development list

On 6/24/05, James Simmons <jsimmons@www.infradead.org> wrote:
> 
> > >         Now I was thinking instead of a massive move of the the software
> > > cursor we add a flag FBINFO_HWACCEL_CURSOR to tell us if we are using a
> > > hardware cursor. This way for the sysfs interface you can test to see if
> > > it is a hardware cursor and only allow userland to access a hardware
> > > cursor. Here is a patch for that. People please try it out.
> >
> > Your code will work, but it is conceptually what we want to do?
> > Software cursors are application specific. The soft cursor implemented
> > in fbdev really belongs to fbconsole.  If we get another in-kernel
> > user with a different update pattern (maybe they use the GPU) they
> > will want a different soft cursor. Shouldn't we just move the current
> > soft cursor into fbconsole? Given that software cursors are
> > application specific fbdev should not contain one.
> 
> The only reason I'm against that is then when the developer with the
> different update pattern will create a new fbconsole. We could end up
> with several fbconsoles. I really like to keep it down to one. So I rather
> deal with several cursor implementation instead of several fbconsoles.
> Also remember that the software cursor is generically wrapped around the
> the imageblit function. Since imageblit is independent of the update
> pattern we will be okay.

To address your concern, leave softcursor as an fbdev module. But we
do need to remove all of those .fb_cursor = softcursor from all of the
fbdev modules. As long as those are there we can only have one
softcursor implementation.

Then any in-kernel user does this:
       /* First try the hardware cursor */
       if (info->fbops->fb_cursor)
               err = info->fbops->fb_cursor(info, &cursor);
       /* if that doesn't exist or didn't work, use the software one */
       if (err)
               soft_cursor(info, &cursor);

I want to remove the fallback to softcursor logic from fbdev, I don't
care if the softcursor modules stays part of fbdev, it's the fallback
logic that doesn't belong in the drivers. There is no need for all of
the drivers to reference softcursor.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24 16:27                       ` Jon Smirl
@ 2005-06-24 17:13                         ` James Simmons
  2005-06-24 17:25                           ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: James Simmons @ 2005-06-24 17:13 UTC (permalink / raw)
  To: Jon Smirl; +Cc: James Simmons, adaplas, Linux Fbdev development list


> To address your concern, leave softcursor as an fbdev module. But we
> do need to remove all of those .fb_cursor = softcursor from all of the
> fbdev modules. As long as those are there we can only have one
> softcursor implementation.

Does this patch work for you? It reports to userland that no cursor is 
avaiable if the fbdev driver is using the software cursor.

diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-06-24 09:04:12.000000000 -0700
@@ -219,8 +219,8 @@
 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
 	info->sprite.flags = FB_PIXMAP_IO;
 
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	info->fbops->fb_cursor = atyfb_cursor;
-
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/fbsysfs.c fbdev-2.6/drivers/video/fbsysfs.c
--- linus-2.6/drivers/video/fbsysfs.c	2005-06-14 11:51:24.000000000 -0700
+++ fbdev-2.6/drivers/video/fbsysfs.c	2005-06-24 09:46:33.000000000 -0700
@@ -311,13 +311,19 @@
 static ssize_t store_cursor(struct class_device *class_device,
 			    const char * buf, size_t count)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
 static ssize_t show_cursor(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810.h fbdev-2.6/drivers/video/i810/i810.h
--- linus-2.6/drivers/video/i810/i810.h	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810.h	2005-06-24 09:04:12.000000000 -0700
@@ -201,7 +201,6 @@
 #define HAS_ACCELERATION            2
 #define ALWAYS_SYNC                 4
 #define LOCKUP                      8
-#define USE_HWCUR                  16
 
 struct gtt_data {
 	struct agp_memory *i810_fb_memory;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
--- linus-2.6/drivers/video/i810/i810_main.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-06-24 09:04:12.000000000 -0700
@@ -1375,7 +1375,6 @@
 	decode_var(&info->var, par);
 	i810_load_regs(par);
 	i810_init_cursor(par);
-
 	encode_fix(&info->fix, info);
 
 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
@@ -1387,6 +1386,7 @@
 		info->pixmap.scan_align = 1;
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	return 0;
 }
 
@@ -1418,9 +1418,8 @@
 	struct i810fb_par *par = (struct i810fb_par *)info->par;
 	u8 __iomem *mmio = par->mmio_start_virtual;
 
-	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
-	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+	if (!par->dev_flags & LOCKUP)
+		return -ENXIO;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-24 09:04:12.000000000 -0700
@@ -117,14 +117,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
@@ -242,7 +238,7 @@
 static char *mode       = NULL;
 
 module_param(accel, bool, S_IRUGO);
-MODULE_PARM_DESC(accel, "Enable console acceleration");
+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
 module_param(vram, int, S_IRUGO);
 MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
 module_param(voffset, int, S_IRUGO);
@@ -498,7 +494,7 @@
 {
 	struct fb_info *info;
 	struct intelfb_info *dinfo;
-	int i, j, err, dvo;
+	int i, err, dvo;
 	int aperture_size, stolen_size;
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
@@ -841,13 +837,6 @@
 	if (bailearly == 5)
 		bailout(dinfo);
 
-	for (i = 0; i < 16; i++) {
-		j = color_table[i];
-		dinfo->palette[i].red = default_red[j];
-		dinfo->palette[i].green = default_grn[j];
-		dinfo->palette[i].blue = default_blu[j];
-	}
-
 	if (bailearly == 6)
 		bailout(dinfo);
 
@@ -1328,9 +1317,10 @@
 	if (ACCEL(dinfo, info)) {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
-		FBINFO_HWACCEL_IMAGEBLIT;
+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
 	} else {
-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
+		FBINFO_HWACCEL_CURSOR;
 	}
 	kfree(hw);
 	return 0;
@@ -1359,10 +1349,6 @@
 			green >>= 8;
 			blue >>= 8;
 
-			dinfo->palette[regno].red = red;
-			dinfo->palette[regno].green = green;
-			dinfo->palette[regno].blue = blue;
-
 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
 					    transp);
 		}
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-06-24 09:04:12.000000000 -0700
@@ -234,7 +234,6 @@
 
 	/* palette */
 	u32 pseudo_palette[17];
-	struct { u8 red, green, blue, pad; } palette[256];
 
 	/* chip info */
 	int pci_chipset;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-06-24 09:04:13.000000000 -0700
@@ -29,14 +29,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-06-24 09:04:13.000000000 -0700
@@ -1300,6 +1300,7 @@
 	    | FBINFO_HWACCEL_IMAGEBLIT
 	    | FBINFO_HWACCEL_FILLRECT
 	    | FBINFO_HWACCEL_COPYAREA
+	    | FBINFO_HWACCEL_CURSOR
 	    | FBINFO_HWACCEL_YPAN;
 
 	fb_videomode_to_modelist(info->monspecs.modedb,
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
--- linus-2.6/drivers/video/riva/fbdev.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-06-24 09:04:13.000000000 -0700
@@ -1704,7 +1704,8 @@
 		    | FBINFO_HWACCEL_YPAN
 		    | FBINFO_HWACCEL_COPYAREA
 		    | FBINFO_HWACCEL_FILLRECT
-	            | FBINFO_HWACCEL_IMAGEBLIT;
+	            | FBINFO_HWACCEL_IMAGEBLIT
+		    | FBINFO_HWACCEL_CURSOR;
 
 	/* Accel seems to not work properly on NV30 yet...*/
 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
--- linus-2.6/include/linux/fb.h	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/include/linux/fb.h	2005-06-24 09:04:13.000000000 -0700
@@ -702,6 +702,7 @@
 #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
 #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
 #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
+#define FBINFO_HWACCEL_CURSOR		0x8000 /* required */
 
 #define FBINFO_MISC_USEREVENT          0x10000 /* event request
 						  from userspace */


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24 17:13                         ` James Simmons
@ 2005-06-24 17:25                           ` Jon Smirl
  2005-07-01 23:32                             ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-06-24 17:25 UTC (permalink / raw)
  To: James Simmons; +Cc: James Simmons, adaplas, Linux Fbdev development list

Why are you trying to preserve all of the ".fb_cursor = soft_cursor,"
assignments in the drivers? What purpose do they serve that can't be
handled by a simple test like this:

Then any in-kernel user does this:
      /* First try the hardware cursor */
      if (info->fbops->fb_cursor)
              err = info->fbops->fb_cursor(info, &cursor);
      /* if that doesn't exist or didn't work, use the software one */
      if (err)
              soft_cursor(info, &cursor);

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-06-24 17:25                           ` Jon Smirl
@ 2005-07-01 23:32                             ` James Simmons
  2005-07-01 23:52                               ` Sylvain Meyer
                                                 ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: James Simmons @ 2005-07-01 23:32 UTC (permalink / raw)
  To: Jon Smirl; +Cc: James Simmons, adaplas, Linux Fbdev development list


> Why are you trying to preserve all of the ".fb_cursor = soft_cursor,"
> assignments in the drivers? What purpose do they serve that can't be
> handled by a simple test like this:
> 
> Then any in-kernel user does this:
>       /* First try the hardware cursor */
>       if (info->fbops->fb_cursor)
>               err = info->fbops->fb_cursor(info, &cursor);
>       /* if that doesn't exist or didn't work, use the software one */
>       if (err)
>               soft_cursor(info, &cursor);

I don't want to make a patch that touches all the drivers. Th epatch I 
posted is a nice simple patch. If there are no other arguments against it 
I like to submit it to Andrew.

diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-06-24 09:04:12.000000000 -0700
@@ -219,8 +219,8 @@
 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
 	info->sprite.flags = FB_PIXMAP_IO;
 
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	info->fbops->fb_cursor = atyfb_cursor;
-
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/fbsysfs.c fbdev-2.6/drivers/video/fbsysfs.c
--- linus-2.6/drivers/video/fbsysfs.c	2005-06-14 11:51:24.000000000 -0700
+++ fbdev-2.6/drivers/video/fbsysfs.c	2005-06-24 09:46:33.000000000 -0700
@@ -311,13 +311,19 @@
 static ssize_t store_cursor(struct class_device *class_device,
 			    const char * buf, size_t count)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
 static ssize_t show_cursor(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810.h fbdev-2.6/drivers/video/i810/i810.h
--- linus-2.6/drivers/video/i810/i810.h	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810.h	2005-06-24 09:04:12.000000000 -0700
@@ -201,7 +201,6 @@
 #define HAS_ACCELERATION            2
 #define ALWAYS_SYNC                 4
 #define LOCKUP                      8
-#define USE_HWCUR                  16
 
 struct gtt_data {
 	struct agp_memory *i810_fb_memory;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
--- linus-2.6/drivers/video/i810/i810_main.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-06-24 09:04:12.000000000 -0700
@@ -1375,7 +1375,6 @@
 	decode_var(&info->var, par);
 	i810_load_regs(par);
 	i810_init_cursor(par);
-
 	encode_fix(&info->fix, info);
 
 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
@@ -1387,6 +1386,7 @@
 		info->pixmap.scan_align = 1;
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	return 0;
 }
 
@@ -1418,9 +1418,8 @@
 	struct i810fb_par *par = (struct i810fb_par *)info->par;
 	u8 __iomem *mmio = par->mmio_start_virtual;
 
-	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
-	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+	if (!par->dev_flags & LOCKUP)
+		return -ENXIO;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-24 09:04:12.000000000 -0700
@@ -117,14 +117,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
@@ -242,7 +238,7 @@
 static char *mode       = NULL;
 
 module_param(accel, bool, S_IRUGO);
-MODULE_PARM_DESC(accel, "Enable console acceleration");
+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
 module_param(vram, int, S_IRUGO);
 MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
 module_param(voffset, int, S_IRUGO);
@@ -498,7 +494,7 @@
 {
 	struct fb_info *info;
 	struct intelfb_info *dinfo;
-	int i, j, err, dvo;
+	int i, err, dvo;
 	int aperture_size, stolen_size;
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
@@ -841,13 +837,6 @@
 	if (bailearly == 5)
 		bailout(dinfo);
 
-	for (i = 0; i < 16; i++) {
-		j = color_table[i];
-		dinfo->palette[i].red = default_red[j];
-		dinfo->palette[i].green = default_grn[j];
-		dinfo->palette[i].blue = default_blu[j];
-	}
-
 	if (bailearly == 6)
 		bailout(dinfo);
 
@@ -1328,9 +1317,10 @@
 	if (ACCEL(dinfo, info)) {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
-		FBINFO_HWACCEL_IMAGEBLIT;
+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
 	} else {
-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
+		FBINFO_HWACCEL_CURSOR;
 	}
 	kfree(hw);
 	return 0;
@@ -1359,10 +1349,6 @@
 			green >>= 8;
 			blue >>= 8;
 
-			dinfo->palette[regno].red = red;
-			dinfo->palette[regno].green = green;
-			dinfo->palette[regno].blue = blue;
-
 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
 					    transp);
 		}
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-06-24 09:04:12.000000000 -0700
@@ -234,7 +234,6 @@
 
 	/* palette */
 	u32 pseudo_palette[17];
-	struct { u8 red, green, blue, pad; } palette[256];
 
 	/* chip info */
 	int pci_chipset;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-05-10 08:39:33.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-06-24 09:04:13.000000000 -0700
@@ -29,14 +29,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-06-24 09:04:13.000000000 -0700
@@ -1300,6 +1300,7 @@
 	    | FBINFO_HWACCEL_IMAGEBLIT
 	    | FBINFO_HWACCEL_FILLRECT
 	    | FBINFO_HWACCEL_COPYAREA
+	    | FBINFO_HWACCEL_CURSOR
 	    | FBINFO_HWACCEL_YPAN;
 
 	fb_videomode_to_modelist(info->monspecs.modedb,
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
--- linus-2.6/drivers/video/riva/fbdev.c	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-06-24 09:04:13.000000000 -0700
@@ -1704,7 +1704,8 @@
 		    | FBINFO_HWACCEL_YPAN
 		    | FBINFO_HWACCEL_COPYAREA
 		    | FBINFO_HWACCEL_FILLRECT
-	            | FBINFO_HWACCEL_IMAGEBLIT;
+	            | FBINFO_HWACCEL_IMAGEBLIT
+		    | FBINFO_HWACCEL_CURSOR;
 
 	/* Accel seems to not work properly on NV30 yet...*/
 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
--- linus-2.6/include/linux/fb.h	2005-06-22 17:09:52.000000000 -0700
+++ fbdev-2.6/include/linux/fb.h	2005-06-24 09:04:13.000000000 -0700
@@ -702,6 +702,7 @@
 #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
 #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
 #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
+#define FBINFO_HWACCEL_CURSOR		0x8000 /* required */
 
 #define FBINFO_MISC_USEREVENT          0x10000 /* event request
 						  from userspace */


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-01 23:32                             ` James Simmons
@ 2005-07-01 23:52                               ` Sylvain Meyer
  2005-07-06 23:28                                 ` James Simmons
  2005-07-02  0:28                               ` Jon Smirl
  2005-07-02  0:56                               ` Jon Smirl
  2 siblings, 1 reply; 27+ messages in thread
From: Sylvain Meyer @ 2005-07-01 23:52 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Jon Smirl, James Simmons, adaplas

        James,

    In the intelfb driver, the hw cursor is decoupled from the graphic 
hw acceleration. So, this code is incorrect

@@ -1328,9 +1317,10 @@
 	if (ACCEL(dinfo, info)) {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
-		FBINFO_HWACCEL_IMAGEBLIT;
+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
 	} else {
-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
+		FBINFO_HWACCEL_CURSOR;
 	}
 	kfree(hw);
 	return 0;

should be something like this. I can come with a good patch if you want 
(now it's just a mail hack)

 	if (ACCEL(dinfo, info)) {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
		FBINFO_HWACCEL_IMAGEBLIT;
 	} else {
		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+       if (dinfo->hwcursor)
+               info->flags |= FBINFO_HWACCEL_CURSOR;

Regards
Sylvain

James Simmons a écrit:

>>Why are you trying to preserve all of the ".fb_cursor = soft_cursor,"
>>assignments in the drivers? What purpose do they serve that can't be
>>handled by a simple test like this:
>>
>>Then any in-kernel user does this:
>>      /* First try the hardware cursor */
>>      if (info->fbops->fb_cursor)
>>              err = info->fbops->fb_cursor(info, &cursor);
>>      /* if that doesn't exist or didn't work, use the software one */
>>      if (err)
>>              soft_cursor(info, &cursor);
>>    
>>
>
>I don't want to make a patch that touches all the drivers. Th epatch I 
>posted is a nice simple patch. If there are no other arguments against it 
>I like to submit it to Andrew.
>
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
>--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-05-10 08:39:33.000000000 -0700
>+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-06-24 09:04:12.000000000 -0700
>@@ -219,8 +219,8 @@
> 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
> 	info->sprite.flags = FB_PIXMAP_IO;
> 
>+	info->flags |= FBINFO_HWACCEL_CURSOR;
> 	info->fbops->fb_cursor = atyfb_cursor;
>-
> 	return 0;
> }
> 
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/fbsysfs.c fbdev-2.6/drivers/video/fbsysfs.c
>--- linus-2.6/drivers/video/fbsysfs.c	2005-06-14 11:51:24.000000000 -0700
>+++ fbdev-2.6/drivers/video/fbsysfs.c	2005-06-24 09:46:33.000000000 -0700
>@@ -311,13 +311,19 @@
> static ssize_t store_cursor(struct class_device *class_device,
> 			    const char * buf, size_t count)
> {
>-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
>+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
>+
>+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
>+		return -ENXIO;
> 	return 0;
> }
> 
> static ssize_t show_cursor(struct class_device *class_device, char *buf)
> {
>-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
>+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
>+
>+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
>+		return -ENXIO;
> 	return 0;
> }
> 
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810.h fbdev-2.6/drivers/video/i810/i810.h
>--- linus-2.6/drivers/video/i810/i810.h	2005-05-10 08:39:33.000000000 -0700
>+++ fbdev-2.6/drivers/video/i810/i810.h	2005-06-24 09:04:12.000000000 -0700
>@@ -201,7 +201,6 @@
> #define HAS_ACCELERATION            2
> #define ALWAYS_SYNC                 4
> #define LOCKUP                      8
>-#define USE_HWCUR                  16
> 
> struct gtt_data {
> 	struct agp_memory *i810_fb_memory;
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
>--- linus-2.6/drivers/video/i810/i810_main.c	2005-06-22 17:09:52.000000000 -0700
>+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-06-24 09:04:12.000000000 -0700
>@@ -1375,7 +1375,6 @@
> 	decode_var(&info->var, par);
> 	i810_load_regs(par);
> 	i810_init_cursor(par);
>-
> 	encode_fix(&info->fix, info);
> 
> 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
>@@ -1387,6 +1386,7 @@
> 		info->pixmap.scan_align = 1;
> 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
> 	}
>+	info->flags |= FBINFO_HWACCEL_CURSOR;
> 	return 0;
> }
> 
>@@ -1418,9 +1418,8 @@
> 	struct i810fb_par *par = (struct i810fb_par *)info->par;
> 	u8 __iomem *mmio = par->mmio_start_virtual;
> 
>-	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
>-	    par->dev_flags & LOCKUP)
>-		return soft_cursor(info, cursor);
>+	if (!par->dev_flags & LOCKUP)
>+		return -ENXIO;
> 
> 	if (cursor->image.width > 64 || cursor->image.height > 64)
> 		return -ENXIO;
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
>--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-22 17:09:52.000000000 -0700
>+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-24 09:04:12.000000000 -0700
>@@ -117,14 +117,10 @@
> #include <linux/slab.h>
> #include <linux/delay.h>
> #include <linux/fb.h>
>-#include <linux/console.h>
>-#include <linux/selection.h>
> #include <linux/ioport.h>
> #include <linux/init.h>
> #include <linux/pci.h>
> #include <linux/vmalloc.h>
>-#include <linux/kd.h>
>-#include <linux/vt_kern.h>
> #include <linux/pagemap.h>
> #include <linux/version.h>
> 
>@@ -242,7 +238,7 @@
> static char *mode       = NULL;
> 
> module_param(accel, bool, S_IRUGO);
>-MODULE_PARM_DESC(accel, "Enable console acceleration");
>+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
> module_param(vram, int, S_IRUGO);
> MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
> module_param(voffset, int, S_IRUGO);
>@@ -498,7 +494,7 @@
> {
> 	struct fb_info *info;
> 	struct intelfb_info *dinfo;
>-	int i, j, err, dvo;
>+	int i, err, dvo;
> 	int aperture_size, stolen_size;
> 	struct agp_kern_info gtt_info;
> 	int agp_memtype;
>@@ -841,13 +837,6 @@
> 	if (bailearly == 5)
> 		bailout(dinfo);
> 
>-	for (i = 0; i < 16; i++) {
>-		j = color_table[i];
>-		dinfo->palette[i].red = default_red[j];
>-		dinfo->palette[i].green = default_grn[j];
>-		dinfo->palette[i].blue = default_blu[j];
>-	}
>-
> 	if (bailearly == 6)
> 		bailout(dinfo);
> 
>@@ -1328,9 +1317,10 @@
> 	if (ACCEL(dinfo, info)) {
> 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
> 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
>-		FBINFO_HWACCEL_IMAGEBLIT;
>+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
> 	} else {
>-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
>+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
>+		FBINFO_HWACCEL_CURSOR;
> 	}
> 	kfree(hw);
> 	return 0;
>@@ -1359,10 +1349,6 @@
> 			green >>= 8;
> 			blue >>= 8;
> 
>-			dinfo->palette[regno].red = red;
>-			dinfo->palette[regno].green = green;
>-			dinfo->palette[regno].blue = blue;
>-
> 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
> 					    transp);
> 		}
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
>--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-05-10 08:39:33.000000000 -0700
>+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-06-24 09:04:12.000000000 -0700
>@@ -234,7 +234,6 @@
> 
> 	/* palette */
> 	u32 pseudo_palette[17];
>-	struct { u8 red, green, blue, pad; } palette[256];
> 
> 	/* chip info */
> 	int pci_chipset;
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
>--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-05-10 08:39:33.000000000 -0700
>+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-06-24 09:04:13.000000000 -0700
>@@ -29,14 +29,10 @@
> #include <linux/slab.h>
> #include <linux/delay.h>
> #include <linux/fb.h>
>-#include <linux/console.h>
>-#include <linux/selection.h>
> #include <linux/ioport.h>
> #include <linux/init.h>
> #include <linux/pci.h>
> #include <linux/vmalloc.h>
>-#include <linux/kd.h>
>-#include <linux/vt_kern.h>
> #include <linux/pagemap.h>
> #include <linux/version.h>
> 
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
>--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-06-22 17:09:52.000000000 -0700
>+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-06-24 09:04:13.000000000 -0700
>@@ -1300,6 +1300,7 @@
> 	    | FBINFO_HWACCEL_IMAGEBLIT
> 	    | FBINFO_HWACCEL_FILLRECT
> 	    | FBINFO_HWACCEL_COPYAREA
>+	    | FBINFO_HWACCEL_CURSOR
> 	    | FBINFO_HWACCEL_YPAN;
> 
> 	fb_videomode_to_modelist(info->monspecs.modedb,
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
>--- linus-2.6/drivers/video/riva/fbdev.c	2005-06-22 17:09:52.000000000 -0700
>+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-06-24 09:04:13.000000000 -0700
>@@ -1704,7 +1704,8 @@
> 		    | FBINFO_HWACCEL_YPAN
> 		    | FBINFO_HWACCEL_COPYAREA
> 		    | FBINFO_HWACCEL_FILLRECT
>-	            | FBINFO_HWACCEL_IMAGEBLIT;
>+	            | FBINFO_HWACCEL_IMAGEBLIT
>+		    | FBINFO_HWACCEL_CURSOR;
> 
> 	/* Accel seems to not work properly on NV30 yet...*/
> 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
>diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
>--- linus-2.6/include/linux/fb.h	2005-06-22 17:09:52.000000000 -0700
>+++ fbdev-2.6/include/linux/fb.h	2005-06-24 09:04:13.000000000 -0700
>@@ -702,6 +702,7 @@
> #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
> #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
> #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
>+#define FBINFO_HWACCEL_CURSOR		0x8000 /* required */
> 
> #define FBINFO_MISC_USEREVENT          0x10000 /* event request
> 						  from userspace */
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>_______________________________________________
>Linux-fbdev-devel mailing list
>Linux-fbdev-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
>
>  
>





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-01 23:32                             ` James Simmons
  2005-07-01 23:52                               ` Sylvain Meyer
@ 2005-07-02  0:28                               ` Jon Smirl
  2005-07-02  0:56                               ` Jon Smirl
  2 siblings, 0 replies; 27+ messages in thread
From: Jon Smirl @ 2005-07-02  0:28 UTC (permalink / raw)
  To: James Simmons; +Cc: James Simmons, adaplas, Linux Fbdev development list

On 7/1/05, James Simmons <jsimmons@www.infradead.org> wrote:
> I don't want to make a patch that touches all the drivers. Th epatch I
> posted is a nice simple patch. If there are no other arguments against it
> I like to submit it to Andrew.

But we agreed that having the drivers fallback to the softcursor is
the wrong general thing to do since it only works for fbconsole. Why
do we want to keep code in place when we agree that it is not needed?
All it does is add clutter to the driver code.

You don't need to make the patch, I already made it for you.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-01 23:32                             ` James Simmons
  2005-07-01 23:52                               ` Sylvain Meyer
  2005-07-02  0:28                               ` Jon Smirl
@ 2005-07-02  0:56                               ` Jon Smirl
  2005-07-23  5:05                                 ` Antonino A. Daplas
  2 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-07-02  0:56 UTC (permalink / raw)
  To: James Simmons; +Cc: James Simmons, adaplas, Linux Fbdev development list

Another way to think of this, let's make another member variable
.fb_hwcursor. When the driver has a hardware cusor is sets
.fb_hwcursor. If you want to use the software cursor use the exisiting
.fb_cursor.

If you think about it every driver is going to have the exact same
assignment .fb_cursor = soft_cursor. If every driver is going to have
exactly the same assignment, why do we need the variable?

It's the existence of the hardware cursor that varies from driver to
driver, that's the one we need the variable for.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-01 23:52                               ` Sylvain Meyer
@ 2005-07-06 23:28                                 ` James Simmons
  0 siblings, 0 replies; 27+ messages in thread
From: James Simmons @ 2005-07-06 23:28 UTC (permalink / raw)
  To: Sylvain Meyer; +Cc: Linux Fbdev development list


Yes please send me a proper patch.

On Sat, 2 Jul 2005, Sylvain Meyer wrote:

>         James,
> 
>     In the intelfb driver, the hw cursor is decoupled from the graphic 
> hw acceleration. So, this code is incorrect
> 
> @@ -1328,9 +1317,10 @@
>  	if (ACCEL(dinfo, info)) {
>  		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
>  		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
> -		FBINFO_HWACCEL_IMAGEBLIT;
> +		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
>  	} else {
> -		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
> +		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
> +		FBINFO_HWACCEL_CURSOR;
>  	}
>  	kfree(hw);
>  	return 0;
> 
> should be something like this. I can come with a good patch if you want 
> (now it's just a mail hack)
> 
>  	if (ACCEL(dinfo, info)) {
>  		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
>  		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
> 		FBINFO_HWACCEL_IMAGEBLIT;
>  	} else {
> 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
>  	}
> +       if (dinfo->hwcursor)
> +               info->flags |= FBINFO_HWACCEL_CURSOR;
> 
> Regards
> Sylvain
> 
> James Simmons a écrit:
> 
> >>Why are you trying to preserve all of the ".fb_cursor = soft_cursor,"
> >>assignments in the drivers? What purpose do they serve that can't be
> >>handled by a simple test like this:
> >>
> >>Then any in-kernel user does this:
> >>      /* First try the hardware cursor */
> >>      if (info->fbops->fb_cursor)
> >>              err = info->fbops->fb_cursor(info, &cursor);
> >>      /* if that doesn't exist or didn't work, use the software one */
> >>      if (err)
> >>              soft_cursor(info, &cursor);
> >>    
> >>
> >
> >I don't want to make a patch that touches all the drivers. Th epatch I 
> >posted is a nice simple patch. If there are no other arguments against it 
> >I like to submit it to Andrew.
> >
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
> >--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-05-10 08:39:33.000000000 -0700
> >+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-06-24 09:04:12.000000000 -0700
> >@@ -219,8 +219,8 @@
> > 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
> > 	info->sprite.flags = FB_PIXMAP_IO;
> > 
> >+	info->flags |= FBINFO_HWACCEL_CURSOR;
> > 	info->fbops->fb_cursor = atyfb_cursor;
> >-
> > 	return 0;
> > }
> > 
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/fbsysfs.c fbdev-2.6/drivers/video/fbsysfs.c
> >--- linus-2.6/drivers/video/fbsysfs.c	2005-06-14 11:51:24.000000000 -0700
> >+++ fbdev-2.6/drivers/video/fbsysfs.c	2005-06-24 09:46:33.000000000 -0700
> >@@ -311,13 +311,19 @@
> > static ssize_t store_cursor(struct class_device *class_device,
> > 			    const char * buf, size_t count)
> > {
> >-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
> >+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
> >+
> >+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
> >+		return -ENXIO;
> > 	return 0;
> > }
> > 
> > static ssize_t show_cursor(struct class_device *class_device, char *buf)
> > {
> >-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
> >+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
> >+
> >+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
> >+		return -ENXIO;
> > 	return 0;
> > }
> > 
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810.h fbdev-2.6/drivers/video/i810/i810.h
> >--- linus-2.6/drivers/video/i810/i810.h	2005-05-10 08:39:33.000000000 -0700
> >+++ fbdev-2.6/drivers/video/i810/i810.h	2005-06-24 09:04:12.000000000 -0700
> >@@ -201,7 +201,6 @@
> > #define HAS_ACCELERATION            2
> > #define ALWAYS_SYNC                 4
> > #define LOCKUP                      8
> >-#define USE_HWCUR                  16
> > 
> > struct gtt_data {
> > 	struct agp_memory *i810_fb_memory;
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
> >--- linus-2.6/drivers/video/i810/i810_main.c	2005-06-22 17:09:52.000000000 -0700
> >+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-06-24 09:04:12.000000000 -0700
> >@@ -1375,7 +1375,6 @@
> > 	decode_var(&info->var, par);
> > 	i810_load_regs(par);
> > 	i810_init_cursor(par);
> >-
> > 	encode_fix(&info->fix, info);
> > 
> > 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
> >@@ -1387,6 +1386,7 @@
> > 		info->pixmap.scan_align = 1;
> > 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
> > 	}
> >+	info->flags |= FBINFO_HWACCEL_CURSOR;
> > 	return 0;
> > }
> > 
> >@@ -1418,9 +1418,8 @@
> > 	struct i810fb_par *par = (struct i810fb_par *)info->par;
> > 	u8 __iomem *mmio = par->mmio_start_virtual;
> > 
> >-	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
> >-	    par->dev_flags & LOCKUP)
> >-		return soft_cursor(info, cursor);
> >+	if (!par->dev_flags & LOCKUP)
> >+		return -ENXIO;
> > 
> > 	if (cursor->image.width > 64 || cursor->image.height > 64)
> > 		return -ENXIO;
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
> >--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-22 17:09:52.000000000 -0700
> >+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-06-24 09:04:12.000000000 -0700
> >@@ -117,14 +117,10 @@
> > #include <linux/slab.h>
> > #include <linux/delay.h>
> > #include <linux/fb.h>
> >-#include <linux/console.h>
> >-#include <linux/selection.h>
> > #include <linux/ioport.h>
> > #include <linux/init.h>
> > #include <linux/pci.h>
> > #include <linux/vmalloc.h>
> >-#include <linux/kd.h>
> >-#include <linux/vt_kern.h>
> > #include <linux/pagemap.h>
> > #include <linux/version.h>
> > 
> >@@ -242,7 +238,7 @@
> > static char *mode       = NULL;
> > 
> > module_param(accel, bool, S_IRUGO);
> >-MODULE_PARM_DESC(accel, "Enable console acceleration");
> >+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
> > module_param(vram, int, S_IRUGO);
> > MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
> > module_param(voffset, int, S_IRUGO);
> >@@ -498,7 +494,7 @@
> > {
> > 	struct fb_info *info;
> > 	struct intelfb_info *dinfo;
> >-	int i, j, err, dvo;
> >+	int i, err, dvo;
> > 	int aperture_size, stolen_size;
> > 	struct agp_kern_info gtt_info;
> > 	int agp_memtype;
> >@@ -841,13 +837,6 @@
> > 	if (bailearly == 5)
> > 		bailout(dinfo);
> > 
> >-	for (i = 0; i < 16; i++) {
> >-		j = color_table[i];
> >-		dinfo->palette[i].red = default_red[j];
> >-		dinfo->palette[i].green = default_grn[j];
> >-		dinfo->palette[i].blue = default_blu[j];
> >-	}
> >-
> > 	if (bailearly == 6)
> > 		bailout(dinfo);
> > 
> >@@ -1328,9 +1317,10 @@
> > 	if (ACCEL(dinfo, info)) {
> > 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
> > 		FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT |
> >-		FBINFO_HWACCEL_IMAGEBLIT;
> >+		FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_CURSOR;
> > 	} else {
> >-		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
> >+		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | 
> >+		FBINFO_HWACCEL_CURSOR;
> > 	}
> > 	kfree(hw);
> > 	return 0;
> >@@ -1359,10 +1349,6 @@
> > 			green >>= 8;
> > 			blue >>= 8;
> > 
> >-			dinfo->palette[regno].red = red;
> >-			dinfo->palette[regno].green = green;
> >-			dinfo->palette[regno].blue = blue;
> >-
> > 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
> > 					    transp);
> > 		}
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
> >--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-05-10 08:39:33.000000000 -0700
> >+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-06-24 09:04:12.000000000 -0700
> >@@ -234,7 +234,6 @@
> > 
> > 	/* palette */
> > 	u32 pseudo_palette[17];
> >-	struct { u8 red, green, blue, pad; } palette[256];
> > 
> > 	/* chip info */
> > 	int pci_chipset;
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
> >--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-05-10 08:39:33.000000000 -0700
> >+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-06-24 09:04:13.000000000 -0700
> >@@ -29,14 +29,10 @@
> > #include <linux/slab.h>
> > #include <linux/delay.h>
> > #include <linux/fb.h>
> >-#include <linux/console.h>
> >-#include <linux/selection.h>
> > #include <linux/ioport.h>
> > #include <linux/init.h>
> > #include <linux/pci.h>
> > #include <linux/vmalloc.h>
> >-#include <linux/kd.h>
> >-#include <linux/vt_kern.h>
> > #include <linux/pagemap.h>
> > #include <linux/version.h>
> > 
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
> >--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-06-22 17:09:52.000000000 -0700
> >+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-06-24 09:04:13.000000000 -0700
> >@@ -1300,6 +1300,7 @@
> > 	    | FBINFO_HWACCEL_IMAGEBLIT
> > 	    | FBINFO_HWACCEL_FILLRECT
> > 	    | FBINFO_HWACCEL_COPYAREA
> >+	    | FBINFO_HWACCEL_CURSOR
> > 	    | FBINFO_HWACCEL_YPAN;
> > 
> > 	fb_videomode_to_modelist(info->monspecs.modedb,
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
> >--- linus-2.6/drivers/video/riva/fbdev.c	2005-06-22 17:09:52.000000000 -0700
> >+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-06-24 09:04:13.000000000 -0700
> >@@ -1704,7 +1704,8 @@
> > 		    | FBINFO_HWACCEL_YPAN
> > 		    | FBINFO_HWACCEL_COPYAREA
> > 		    | FBINFO_HWACCEL_FILLRECT
> >-	            | FBINFO_HWACCEL_IMAGEBLIT;
> >+	            | FBINFO_HWACCEL_IMAGEBLIT
> >+		    | FBINFO_HWACCEL_CURSOR;
> > 
> > 	/* Accel seems to not work properly on NV30 yet...*/
> > 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
> >diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
> >--- linus-2.6/include/linux/fb.h	2005-06-22 17:09:52.000000000 -0700
> >+++ fbdev-2.6/include/linux/fb.h	2005-06-24 09:04:13.000000000 -0700
> >@@ -702,6 +702,7 @@
> > #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
> > #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
> > #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
> >+#define FBINFO_HWACCEL_CURSOR		0x8000 /* required */
> > 
> > #define FBINFO_MISC_USEREVENT          0x10000 /* event request
> > 						  from userspace */
> >
> >
> >-------------------------------------------------------
> >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> >from IBM. Find simple to follow Roadmaps, straightforward articles,
> >informative Webcasts and more! Get everything you need to get up to
> >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >_______________________________________________
> >Linux-fbdev-devel mailing list
> >Linux-fbdev-devel@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
> >
> >  
> >
> 
> 
> 
> 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-02  0:56                               ` Jon Smirl
@ 2005-07-23  5:05                                 ` Antonino A. Daplas
  2005-07-23 15:41                                   ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: Antonino A. Daplas @ 2005-07-23  5:05 UTC (permalink / raw)
  To: Jon Smirl, James Simmons
  Cc: James Simmons, adaplas, Linux Fbdev development list

On Saturday 02 July 2005 08:56, Jon Smirl wrote:
> Another way to think of this, let's make another member variable
> .fb_hwcursor. When the driver has a hardware cusor is sets
> .fb_hwcursor. If you want to use the software cursor use the exisiting
> .fb_cursor.
>
> If you think about it every driver is going to have the exact same
> assignment .fb_cursor = soft_cursor. If every driver is going to have
> exactly the same assignment, why do we need the variable?
>
> It's the existence of the hardware cursor that varies from driver to
> driver, that's the one we need the variable for.

Is this resolved?  I tend to agree with Jon.  Let's just remove all
references to soft_cursor from all drivers, and let fbcon_cursor() fall back
to soft_cursor when xxxfb_cursor() is absent.  It is a lot cleaner and saner
this way, and although it touches all drivers, it is a singe logical change,
so it's acceptable.

Also, I think it might be preferable to have 2 cursor hooks, one
is fbcon-specific, and the other is for use only in userspace, which needs
to be more comprehensive.  Or if a single but comprehensive cursor API is
preferred, then we just adapt fbcon_cursor to use the more powerful
cursor API.  

So, anyone want to propose a cursor API for fbdev, that is both usable by
fbcon and userspace?

Tony




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-23  5:05                                 ` Antonino A. Daplas
@ 2005-07-23 15:41                                   ` Jon Smirl
  2005-07-25 16:33                                     ` James Simmons
  0 siblings, 1 reply; 27+ messages in thread
From: Jon Smirl @ 2005-07-23 15:41 UTC (permalink / raw)
  To: adaplas; +Cc: linux-fbdev-devel, James Simmons

[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]

This not currently resolved.

From user space we can have two interfaces
1) the current ioctl one
2) the new stuff in sysfs. If the hardware cursor is there you get a sysfs 
attribute named cursor. write x,y to it to move the cursor around. I'll add 
the sysfs support as soon as we decide on the interface.

I'm still at OLS. Missed seeing both of you at KS. fbdev was discussed and 
Linus went with Benh's proposal to move the modesetting API to user space. 
Obviously this will have a lot of impact on fbdev.


On 7/23/05, Antonino A. Daplas <adaplas@gmail.com> wrote:
> 
> On Saturday 02 July 2005 08:56, Jon Smirl wrote:
> > Another way to think of this, let's make another member variable
> > .fb_hwcursor. When the driver has a hardware cusor is sets
> > .fb_hwcursor. If you want to use the software cursor use the exisiting
> > .fb_cursor.
> >
> > If you think about it every driver is going to have the exact same
> > assignment .fb_cursor = soft_cursor. If every driver is going to have
> > exactly the same assignment, why do we need the variable?
> >
> > It's the existence of the hardware cursor that varies from driver to
> > driver, that's the one we need the variable for.
> 
> Is this resolved? I tend to agree with Jon. Let's just remove all
> references to soft_cursor from all drivers, and let fbcon_cursor() fall 
> back
> to soft_cursor when xxxfb_cursor() is absent. It is a lot cleaner and 
> saner
> this way, and although it touches all drivers, it is a singe logical 
> change,
> so it's acceptable.
> 
> Also, I think it might be preferable to have 2 cursor hooks, one
> is fbcon-specific, and the other is for use only in userspace, which needs
> to be more comprehensive. Or if a single but comprehensive cursor API is
> preferred, then we just adapt fbcon_cursor to use the more powerful
> cursor API.
> 
> So, anyone want to propose a cursor API for fbdev, that is both usable by
> fbcon and userspace?
> 
> Tony
> 
> 
> 


-- 
Jon Smirl
jonsmirl@gmail.com

[-- Attachment #2: Type: text/html, Size: 2474 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-23 15:41                                   ` Jon Smirl
@ 2005-07-25 16:33                                     ` James Simmons
  2005-07-25 16:45                                       ` Jon Smirl
  0 siblings, 1 reply; 27+ messages in thread
From: James Simmons @ 2005-07-25 16:33 UTC (permalink / raw)
  To: Jon Smirl; +Cc: adaplas, linux-fbdev-devel


> 1) the current ioctl one

Defunct.

> 2) the new stuff in sysfs. If the hardware cursor is there you get a sysfs 
> attribute named cursor. write x,y to it to move the cursor around. I'll add 
> the sysfs support as soon as we decide on the interface.

I was playing with that a bit.

> I'm still at OLS. Missed seeing both of you at KS. fbdev was discussed and 
> Linus went with Benh's proposal to move the modesetting API to user space. 
> Obviously this will have a lot of impact on fbdev.

I don't have any money to go to such events :-( Looks like fbdev is going 
away completly :-< We will need embedded graphics libraries to boot a 
machine in the future. I seen this coming and thats why my motivation for 
development keeps dropping. I suggest they make a big diff to remove the 
whole system.  


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: PATCH: move soft_cursor into fbconsole
  2005-07-25 16:33                                     ` James Simmons
@ 2005-07-25 16:45                                       ` Jon Smirl
  0 siblings, 0 replies; 27+ messages in thread
From: Jon Smirl @ 2005-07-25 16:45 UTC (permalink / raw)
  To: James Simmons; +Cc: adaplas, linux-fbdev-devel

On 7/25/05, James Simmons <jsimmons@infradead.org> wrote:
> 
> > 1) the current ioctl one
> 
> Defunct.
> 
> > 2) the new stuff in sysfs. If the hardware cursor is there you get a sysfs
> > attribute named cursor. write x,y to it to move the cursor around. I'll add
> > the sysfs support as soon as we decide on the interface.
> 
> I was playing with that a bit.
> 
> > I'm still at OLS. Missed seeing both of you at KS. fbdev was discussed and
> > Linus went with Benh's proposal to move the modesetting API to user space.
> > Obviously this will have a lot of impact on fbdev.
> 
> I don't have any money to go to such events :-( Looks like fbdev is going
> away completly :-< We will need embedded graphics libraries to boot a
> machine in the future. I seen this coming and thats why my motivation for
> development keeps dropping. I suggest they make a big diff to remove the
> whole system.

It is a long way from Linus telling BenH to go ahead and having a
replacement system in the kernel. My bet is that userspace mode
setting only happens for a couple of chips. I don't see a lot of
people jumping up to replace the existing system. I was pushing to
keep fbdev the way it is but without either of the maintainers there
to defend fbdev it is a hard sell.

If you write a paper for OLS, get it accepted and present it; the
sponsors will probably pay your airfare. Hotels can be had for
$40/night. Work on Ted to get an invite to Kernel Summit and then give
him four months notice that you need airfare and you'll probably get
it.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2005-07-25 16:46 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11  4:57 PATCH: move soft_cursor into fbconsole Jon Smirl
2005-06-11  6:15 ` James Simmons
2005-06-11 13:10   ` Jon Smirl
2005-06-11 13:23   ` Jon Smirl
2005-06-11 20:35 ` Geert Uytterhoeven
2005-06-11 22:01   ` Jon Smirl
2005-06-12  7:43     ` Geert Uytterhoeven
2005-06-16  1:34       ` Jon Smirl
2005-06-16  3:11         ` Antonino A. Daplas
2005-06-16  3:37           ` Jon Smirl
2005-06-21  0:07             ` James Simmons
2005-06-21  0:31               ` Jon Smirl
2005-06-24  0:09                 ` James Simmons
2005-06-24 12:26                   ` Jon Smirl
2005-06-24 16:17                     ` James Simmons
2005-06-24 16:27                       ` Jon Smirl
2005-06-24 17:13                         ` James Simmons
2005-06-24 17:25                           ` Jon Smirl
2005-07-01 23:32                             ` James Simmons
2005-07-01 23:52                               ` Sylvain Meyer
2005-07-06 23:28                                 ` James Simmons
2005-07-02  0:28                               ` Jon Smirl
2005-07-02  0:56                               ` Jon Smirl
2005-07-23  5:05                                 ` Antonino A. Daplas
2005-07-23 15:41                                   ` Jon Smirl
2005-07-25 16:33                                     ` James Simmons
2005-07-25 16:45                                       ` Jon Smirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.