diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2007-10-16 04:28:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:14 -0400 |
commit | c79ba28cc0c55d1539a4b29d32c3620460a5ee52 (patch) | |
tree | 0b683ca480bac8e7b7d9ba8c4f41ac9fa590f63a /drivers/video/pm3fb.c | |
parent | b0a318e2d9230d5fa54d98c4e7b0ba03631e46fa (diff) |
pm3fb: 3 small fixes
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>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/pm3fb.c')
-rw-r--r-- | drivers/video/pm3fb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 280d108f18d..fb91b641aef 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c | |||
@@ -558,7 +558,8 @@ static void pm3fb_imageblit(struct fb_info *info, const struct fb_image *image) | |||
558 | 558 | ||
559 | 559 | ||
560 | while (height--) { | 560 | while (height--) { |
561 | int width = ((image->width + 7) >> 3) + info->pixmap.scan_align; | 561 | int width = ((image->width + 7) >> 3) |
562 | + info->pixmap.scan_align - 1; | ||
562 | width >>= 2; | 563 | width >>= 2; |
563 | 564 | ||
564 | while (width >= PM3_FIFO_SIZE) { | 565 | while (width >= PM3_FIFO_SIZE) { |
@@ -1194,6 +1195,10 @@ static int __devinit pm3fb_probe(struct pci_dev *dev, | |||
1194 | */ | 1195 | */ |
1195 | pm3fb_fix.mmio_start = pci_resource_start(dev, 0); | 1196 | pm3fb_fix.mmio_start = pci_resource_start(dev, 0); |
1196 | pm3fb_fix.mmio_len = PM3_REGS_SIZE; | 1197 | pm3fb_fix.mmio_len = PM3_REGS_SIZE; |
1198 | #if defined(__BIG_ENDIAN) | ||
1199 | pm3fb_fix.mmio_start += PM3_REGS_SIZE; | ||
1200 | DPRINTK("Adjusting register base for big-endian.\n"); | ||
1201 | #endif | ||
1197 | 1202 | ||
1198 | /* Registers - request region and map it. */ | 1203 | /* Registers - request region and map it. */ |
1199 | if (!request_mem_region(pm3fb_fix.mmio_start, pm3fb_fix.mmio_len, | 1204 | if (!request_mem_region(pm3fb_fix.mmio_start, pm3fb_fix.mmio_len, |
@@ -1210,10 +1215,6 @@ static int __devinit pm3fb_probe(struct pci_dev *dev, | |||
1210 | goto err_exit_neither; | 1215 | goto err_exit_neither; |
1211 | } | 1216 | } |
1212 | 1217 | ||
1213 | #if defined(__BIG_ENDIAN) | ||
1214 | pm3fb_fix.mmio_start += PM3_REGS_SIZE; | ||
1215 | DPRINTK("Adjusting register base for big-endian.\n"); | ||
1216 | #endif | ||
1217 | /* Linear frame buffer - request region and map it. */ | 1218 | /* Linear frame buffer - request region and map it. */ |
1218 | pm3fb_fix.smem_start = pci_resource_start(dev, 1); | 1219 | pm3fb_fix.smem_start = pci_resource_start(dev, 1); |
1219 | pm3fb_fix.smem_len = pm3fb_size_memory(par); | 1220 | pm3fb_fix.smem_len = pm3fb_size_memory(par); |
@@ -1243,7 +1244,8 @@ static int __devinit pm3fb_probe(struct pci_dev *dev, | |||
1243 | info->fix = pm3fb_fix; | 1244 | info->fix = pm3fb_fix; |
1244 | info->pseudo_palette = par->palette; | 1245 | info->pseudo_palette = par->palette; |
1245 | info->flags = FBINFO_DEFAULT | | 1246 | info->flags = FBINFO_DEFAULT | |
1246 | /* FBINFO_HWACCEL_YPAN |*/ | 1247 | FBINFO_HWACCEL_XPAN | |
1248 | FBINFO_HWACCEL_YPAN | | ||
1247 | FBINFO_HWACCEL_COPYAREA | | 1249 | FBINFO_HWACCEL_COPYAREA | |
1248 | FBINFO_HWACCEL_IMAGEBLIT | | 1250 | FBINFO_HWACCEL_IMAGEBLIT | |
1249 | FBINFO_HWACCEL_FILLRECT; | 1251 | FBINFO_HWACCEL_FILLRECT; |