linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pm2fb: accelerated 24-bit fillrect
@ 2007-06-27 15:00 Krzysztof Helt
  0 siblings, 0 replies; only message in thread
From: Krzysztof Helt @ 2007-06-27 15:00 UTC (permalink / raw)
  To: Linux Fbdev development list

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

From: Krzysztof Helt <krzysztof.h1@wp.pl>

This patch adds accelerated fillrect for 24-bit depth.

Signed-off-by:  Krzysztof Helt <krzysztof.h1@wp.pl>

---

This patch requires at least the pm2fb source improvement patch.

--- linux-2.6.21/drivers/video/pm2fb.c	2007-06-26 16:46:12.040468472 +0200
+++ linux-2.6.22/drivers/video/pm2fb.c	2007-06-27 16:06:47.512285909 +0200
@@ -1077,7 +1077,13 @@ static void pm2fb_fillrect (struct fb_in
 		pm2_WR(par, PM2R_RENDER,
 				PM2F_RENDER_RECTANGLE | PM2F_RENDER_FASTFILL);
 	} else {
-		cfb_fillrect(info, region);
+		WAIT_FIFO(par, 4);
+		pm2_WR(par, PM2R_COLOR_DDA_MODE, 1);
+		pm2_WR(par, PM2R_CONSTANT_COLOR, color);
+		wmb();
+		pm2_WR(par, PM2R_RENDER,
+				PM2F_RENDER_RECTANGLE | PM2F_INCREASE_X | PM2F_INCREASE_Y );
+		pm2_WR(par, PM2R_COLOR_DDA_MODE, 0);
 	}
 }
 

[-- Attachment #2: pm2fb-24bit-fillrect.diff --]
[-- Type: text/plain, Size: 747 bytes --]

From: Krzysztof Helt <krzysztof.h1@wp.pl>

This patch adds accelerated fillrect for 24-bit depth.

Signed-off-by:  Krzysztof Helt <krzysztof.h1@wp.pl>

--- linux-2.6.21/drivers/video/pm2fb.c	2007-06-26 16:46:12.040468472 +0200
+++ linux-2.6.22/drivers/video/pm2fb.c	2007-06-27 16:06:47.512285909 +0200
@@ -1077,7 +1077,13 @@ static void pm2fb_fillrect (struct fb_in
 		pm2_WR(par, PM2R_RENDER,
 				PM2F_RENDER_RECTANGLE | PM2F_RENDER_FASTFILL);
 	} else {
-		cfb_fillrect(info, region);
+		WAIT_FIFO(par, 4);
+		pm2_WR(par, PM2R_COLOR_DDA_MODE, 1);
+		pm2_WR(par, PM2R_CONSTANT_COLOR, color);
+		wmb();
+		pm2_WR(par, PM2R_RENDER,
+				PM2F_RENDER_RECTANGLE | PM2F_INCREASE_X | PM2F_INCREASE_Y );
+		pm2_WR(par, PM2R_COLOR_DDA_MODE, 0);
 	}
 }
 

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

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

only message in thread, other threads:[~2007-06-27 14:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-27 15:00 [PATCH] pm2fb: accelerated 24-bit fillrect Krzysztof Helt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).