some stuff about controlfb in 2.2
Hi Olaf,
On 18 Aug, this message from Olaf Hering echoed through cyberspace:
Quoted 3 lines
while trying to get xf4 to work on all machines here at suse I used this patch for the controlfb driver in a 7500/100 and 7600/132. The (basic) diff can be found on Micheals homepage.
What's on my page is really only what I needed to get it working in my case, as you have noted below...
Quoted 5 lines
My question is: How can we improve the support for the controlfb? The xf4 patch is needed to remove the offset problem. It is no perfect yet. 16bit does not work, colors are screwed up. 8bit has some shift to the left (proably one byte/ 8 pixels). 24bit worked fine with 832x624 on the 7500. I can not use that high colordepth on the 7600, only 2mb vram.
Geert or the other XFree 'developers' on the lost might be able to help here...
Quoted 2 lines
I would like to attach the mentioned kernel patch to improve performance, have no idea yet how to benchmark it.
x11perf -scroll500
For a comparison, I get around 36 scrolls/sec on my 7600 (XF4.0 at 1152 x 870 @ 24bpp), caching patch applied, with a 2.2 kernel. Without the caching patch, I get below 10 scrolls/sec.
Quoted 19 lines
diff -urN
linux-2.2.16.SuSE.orig/drivers/video/fbmem.clinux-2.2.16.SuSE/drivers/video/fbmem.cdrivers/video/fbmem.c Fri Aug 18 11:04:46 2000 renamed from drivers/video/fbmem.c Thu Aug 17 02:23:14 2000 +7
-1@@ -577,7 +577,13 @@ pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; } #elif defined(__powerpc__) - pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; + /* set mode for controlfb in PowerMacs + * see http://www.cpu.lu/~mlan/linux/dev/xf4.html + */ + if(find_devices("control")) + pgprot_val(vma->vm_page_prot) |= _PAGE_WRITETHRU; + else + pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; #elif defined(__alpha__) /* Caching is off in the I/O space quadrant by design. */ #elif defined(__i386__)
Quoted 2 lines
Is this patch ok for the kernel?
Maybe we shouldflag = find_devices("control");to be safe.
I think the better way to handle this would be to provide a device-specific mmap function in the framebuffers that benefit from the changed caching. On Macs, all unaccelerated framebuffers should fall under that category.
Or, one could also argue that _PAGE_WRITETHRU should be the default, and those framebuffers that need something else should provide that themselves.
Cheers
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art. 23, Rue Paul Henkes | Ask Questions. Make Mistakes. L-1710 Luxembourg | email [email protected] | http://www.cpu.lu/~mlan | Learn Always. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Michel Lanners
I think the better way to handle this would be to provide a device-specific mmap function in the framebuffers that benefit from the changed caching. On Macs, all unaccelerated framebuffers should fall under that category.
The framebuffer device API can handle this, write a controlfb_mmap() and set the fb_mmap pointer in fb_ops to it.
ani
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Olaf Hering
My question is: How can we improve the support for the controlfb? The xf4 patch is needed to remove the offset problem. It is no perfect yet. 16bit does not work, colors are screwed up. 8bit has some shift to the left (proably one byte/ 8 pixels). 24bit worked fine with 832x624 on the 7500. I can not use that high colordepth on the 7600, only 2mb vram.
What exactly do you mean? What is the problem? Is it that smem_start is not on a page boundary? If yes, this worked fine in XFree86 3.3.x.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/