All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <syrjala@sci.fi>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] atyfb: Add option to disable hardware cursor.
Date: Thu, 17 Jun 2004 12:41:56 +0300	[thread overview]
Message-ID: <20040617094156.GA28687@sci.fi> (raw)

[-- 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;
 }
 

                 reply	other threads:[~2004-06-17  9:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040617094156.GA28687@sci.fi \
    --to=syrjala@sci.fi \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.