Re: svgalib vs fbdev

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Wed 10 Apr 2002 - 18:01:39 IDT


On Wed, 10 Apr 2002, Steven Seeger wrote:

> I had to put a demo together on an Accelent StrongARM IDP over the weekend.
> I could not get SVGALib to work with the lcd screen's kernel FB driver
> despite everything. I debugged it and saw that SVGALib would crash the
> graphics hardware when trying to save or restore SVGA regs. Taking all those
> calls out didn't help, so I ended up writing my own code to work directly
> with /dev/fb0 and that worked fine.

What version of svgalib did you use? The fb drivers in 1.4 and 1.9 are
quite different. I did manage to use fbdev driver of svgalib-1.9 on PPC
with both rage128 and Matrox cards, so I think there should not be a big
problem.
I'll see if I can get svgalib to work over fb on an assabet, 

> Then I got to wondering if that might be faster than using svgalib. I do
> most of the writing with memset and memcpy, and implemented my own double
> buffering technique and all that fun stuff. Would minimal code talking to
> /dev/fb0 using things like memcpy which use the rep/sz opcode be faster than
> having additional overhead involved with SVGALib and the GL lib? Or, am I
> better off with SVGALib using a PC-104 with a C&T driver on it because it
> supports the accel stuff?

I guess the answer will depend on what exactly you do. But C&T is
special in that most driver s don't have acceleration. And you can do
the simple setting a mode and then accessing the framebuffer directly
even with svgalib (don't use vgagl functions, use a simple sequence of
vga_init, vga_setmode, vga_setlinearaddressing and vga_getgraphmem).

> I might do some timing tests on it myself. It would be nice to standardize
> across platforms here, and if we get rid of SVGALib and use /dev/fb that
> gives us more options in the future to move to other platforms running Linux
> without having to redocument all the code.

Svgalib already works on two linux platforms (x86, and PPC) so I think
that getting it to work on other platforms should not be too hard.
And svgalib also works on freebsd, so it might have a better portability
potential than fb.


-- 
Matan Ziv-Av.                         matan@svgalib.org



------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST