From: Krzysztof Helt <krzysztof.h1@wp.pl>
To: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH] pm3fb: 3 small fixes
Date: Thu, 14 Jun 2007 06:42:20 +0200 [thread overview]
Message-ID: <4670C72C.5020108@wp.pl> (raw)
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
This patch contains 3 small improvements:
- it corrects scan line width calculation in pm3fb_imageblit()
- it corrects mmio mapping for big endian machines
- it enables panning acceleration constants
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
I have no big endian machine to check but the bug is obvious. I hope that someone with the big endian machine could check this driver.
--- linux-2.6.21.old/drivers/video/pm3fb.c 2007-06-14 06:20:20.981188087 +0200
+++ linux-2.6.21/drivers/video/pm3fb.c 2007-06-13 23:36:49.533883967 +0200
@@ -558,7 +558,8 @@ static void pm3fb_imageblit(struct fb_in
while (height--) {
- int width = ((image->width + 7) >> 3) + info->pixmap.scan_align;
+ int width = ((image->width + 7) >> 3)
+ + info->pixmap.scan_align - 1;
width >>= 2;
while (width >= PM3_FIFO_SIZE) {
@@ -1195,6 +1196,10 @@ static int __devinit pm3fb_probe(struct
*/
pm3fb_fix.mmio_start = pci_resource_start(dev, 0);
pm3fb_fix.mmio_len = PM3_REGS_SIZE;
+#if defined(__BIG_ENDIAN)
+ pm3fb_fix.mmio_start += PM3_REGS_SIZE;
+ DPRINTK("Adjusting register base for big-endian.\n");
+#endif
/* Registers - request region and map it. */
if (!request_mem_region(pm3fb_fix.mmio_start, pm3fb_fix.mmio_len,
@@ -1211,10 +1216,6 @@ static int __devinit pm3fb_probe(struct
goto err_exit_neither;
}
-#if defined(__BIG_ENDIAN)
- pm3fb_fix.mmio_start += PM3_REGS_SIZE;
- DPRINTK("Adjusting register base for big-endian.\n");
-#endif
/* Linear frame buffer - request region and map it. */
pm3fb_fix.smem_start = pci_resource_start(dev, 1);
pm3fb_fix.smem_len = pm3fb_size_memory(par);
@@ -1244,7 +1245,8 @@ static int __devinit pm3fb_probe(struct
info->fix = pm3fb_fix;
info->pseudo_palette = par->palette;
info->flags = FBINFO_DEFAULT |
-/* FBINFO_HWACCEL_YPAN |*/
+ FBINFO_HWACCEL_XPAN |
+ FBINFO_HWACCEL_YPAN |
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_FILLRECT;
[-- Attachment #2: pm3fb-pan.diff --]
[-- Type: text/plain, Size: 1866 bytes --]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
This patch contains 3 small improvements:
- it corrects scanline width calculation in pm3fb_imageblit()
- it corrects mmio mapping for big endian machines
- it enables panning acceleration constants
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
--- linux-2.6.21.old/drivers/video/pm3fb.c 2007-06-14 06:20:20.981188087 +0200
+++ linux-2.6.21/drivers/video/pm3fb.c 2007-06-13 23:36:49.533883967 +0200
@@ -558,7 +558,8 @@ static void pm3fb_imageblit(struct fb_in
while (height--) {
- int width = ((image->width + 7) >> 3) + info->pixmap.scan_align;
+ int width = ((image->width + 7) >> 3)
+ + info->pixmap.scan_align - 1;
width >>= 2;
while (width >= PM3_FIFO_SIZE) {
@@ -1195,6 +1196,10 @@ static int __devinit pm3fb_probe(struct
*/
pm3fb_fix.mmio_start = pci_resource_start(dev, 0);
pm3fb_fix.mmio_len = PM3_REGS_SIZE;
+#if defined(__BIG_ENDIAN)
+ pm3fb_fix.mmio_start += PM3_REGS_SIZE;
+ DPRINTK("Adjusting register base for big-endian.\n");
+#endif
/* Registers - request region and map it. */
if (!request_mem_region(pm3fb_fix.mmio_start, pm3fb_fix.mmio_len,
@@ -1211,10 +1216,6 @@ static int __devinit pm3fb_probe(struct
goto err_exit_neither;
}
-#if defined(__BIG_ENDIAN)
- pm3fb_fix.mmio_start += PM3_REGS_SIZE;
- DPRINTK("Adjusting register base for big-endian.\n");
-#endif
/* Linear frame buffer - request region and map it. */
pm3fb_fix.smem_start = pci_resource_start(dev, 1);
pm3fb_fix.smem_len = pm3fb_size_memory(par);
@@ -1244,7 +1245,8 @@ static int __devinit pm3fb_probe(struct
info->fix = pm3fb_fix;
info->pseudo_palette = par->palette;
info->flags = FBINFO_DEFAULT |
-/* FBINFO_HWACCEL_YPAN |*/
+ FBINFO_HWACCEL_XPAN |
+ FBINFO_HWACCEL_YPAN |
FBINFO_HWACCEL_COPYAREA |
FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_FILLRECT;
[-- 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
reply other threads:[~2007-06-14 4:41 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=4670C72C.5020108@wp.pl \
--to=krzysztof.h1@wp.pl \
--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 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).