All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atyfb: Add option to disable hardware cursor.
@ 2004-06-17  9:41 Ville Syrjälä
  0 siblings, 0 replies; only message in thread
From: Ville Syrjälä @ 2004-06-17  9:41 UTC (permalink / raw)
  To: linux-fbdev-devel

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

The hardware cursor code in atyfb didn't work for me so I added this 
swcursor option to disable it. The fbops->fb_cursor change good even 
without the option since aty_init_cursor() is only called for chips with 
integrated RAMDAC.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

[-- Attachment #2: atyfb-2.6-swcursor.patch --]
[-- Type: text/plain, Size: 2903 bytes --]

diff -urN linux-orig/drivers/video/aty/atyfb.h linux/drivers/video/aty/atyfb.h
--- linux-orig/drivers/video/aty/atyfb.h	2004-06-17 09:23:25.000000000 +0300
+++ linux/drivers/video/aty/atyfb.h	2004-06-17 11:22:15.140210168 +0300
@@ -297,7 +297,6 @@
      */
 
 extern int aty_init_cursor(struct fb_info *info);
-extern int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor);
 
     /*
      *  Hardware acceleration
diff -urN linux-orig/drivers/video/aty/atyfb_base.c linux/drivers/video/aty/atyfb_base.c
--- linux-orig/drivers/video/aty/atyfb_base.c	2004-06-17 09:23:25.000000000 +0300
+++ linux/drivers/video/aty/atyfb_base.c	2004-06-17 11:24:48.971824208 +0300
@@ -255,7 +255,7 @@
 	.fb_fillrect	= atyfb_fillrect,
 	.fb_copyarea	= atyfb_copyarea,
 	.fb_imageblit	= atyfb_imageblit,
-	.fb_cursor	= atyfb_cursor,
+	.fb_cursor	= soft_cursor, /* changed in aty_init_cursor() */
 #ifdef __sparc__
 	.fb_mmap	= atyfb_mmap,
 #endif
@@ -263,6 +263,7 @@
 };
 
 static char noaccel __initdata = 0;
+static char swcursor __initdata = 0;
 static u32 default_vram __initdata = 0;
 static int default_pll __initdata = 0;
 static int default_mclk __initdata = 0;
@@ -2353,7 +2354,7 @@
 #endif
 
 #ifdef CONFIG_FB_ATY_CT
-	if (M64_HAS(INTEGRATED))
+	if (!swcursor && M64_HAS(INTEGRATED))
 		aty_init_cursor(info);
 #endif /* CONFIG_FB_ATY_CT */
 	info->var = var;
@@ -2379,9 +2380,11 @@
 		return 0;
 
 	while ((this_opt = strsep(&options, ",")) != NULL) {
-		if (!strncmp(this_opt, "noaccel", 7)) {
+		if (!strncmp(this_opt, "noaccel", 7))
 			noaccel = 1;
-		} else if (!strncmp(this_opt, "vram:", 5))
+		else if (!strncmp(this_opt, "swcursor", 8))
+			swcursor = 1;
+		else if (!strncmp(this_opt, "vram:", 5))
 			default_vram =
 			    simple_strtoul(this_opt + 5, NULL, 0);
 		else if (!strncmp(this_opt, "pll:", 4))
diff -urN linux-orig/drivers/video/aty/mach64_cursor.c linux/drivers/video/aty/mach64_cursor.c
--- linux-orig/drivers/video/aty/mach64_cursor.c	2004-06-17 09:23:25.000000000 +0300
+++ linux/drivers/video/aty/mach64_cursor.c	2004-06-17 11:22:37.324837592 +0300
@@ -71,7 +71,7 @@
 	0xa8, 0x28, 0x88, 0x08, 0xa0, 0x20, 0x80, 0x00
 };		
 
-void aty_set_cursor_shape(struct fb_info *info, u8 *dst, u8 *src, unsigned int width)
+static void aty_set_cursor_shape(struct fb_info *info, u8 *dst, u8 *src, unsigned int width)
 {
 	int i, j, offset = info->sprite.scan_align - width*2;
 	u8 *mask = info->cursor.mask, m, b;
@@ -91,7 +91,7 @@
 	}
 }
 
-int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
+static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
 	u16 xoff, yoff;
@@ -214,6 +214,9 @@
 	info->sprite.buf_align = 16; 	// *64;	// and 64 lines tall.
 	info->sprite.flags = FB_PIXMAP_IO;
 	info->sprite.outbuf = aty_set_cursor_shape;
+
+	info->fbops->fb_cursor = atyfb_cursor;
+
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-17  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-17  9:41 [PATCH] atyfb: Add option to disable hardware cursor Ville Syrjälä

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.