You are not logged in.

#1 2011-09-16 00:32:19

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

How exactly does ShadowFB work?

One of the interesting things I noticed when messing around with Linux on the Mac G4...

fbdev driver with ShadowFB turned on (the default): widgets render with okay speed. Not fast... But okay.

fbdev driver with ShadowFB turned off in xorg.conf: widgets render unbelievably slowly.

I did some Googling... From what I came up with, ShadowFB works by making the CPU render stuff in main RAM before putting it in video memory. (Which obviously precludes hardware acceleration.)  Also, there are some machines that it slows things down on when using the fbdev driver. I don't happen to own any such computers, but apparently they're out there.

So, I have three questions regarding ShadowFB with fbdev (and vesa, and other drivers if applicable) ...

1. Why would rendering stuff in RAM first make anything seem faster? Does fbdev have to use PIO to talk to the video RAM? (Sorry, I know very little about hardware stuff.)

2. Why should ShadowFB slow things down on some machines? Is this a reflection of the hardware being strange? Or does it probably involve kernel or Xorg bugginess?

3. Can the size of the shadow framebuffer be changed? Could this be used to improve performance? Or is the shadow framebuffer's size dictated by the hardware, and the idea of changing it nonsensical (or hazardous)?

(And before you ask... Yes, I do have a thing about making Linux perform better on obsolete hardware. tongue )

Offline

#2 2011-09-16 08:51:32

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: How exactly does ShadowFB work?

If the graphic card driver is crappy or the graphic card is really, really old, then it's very well possible that shadowfb (doing everything on the cpu) will be faster. The most common issue with gpu acceleration is migration ping-pong. That is when some stuff can be done on the gpu but other stuff can't, data will constantly be migrating from sram to vram and back. This of course kills all performance. So keeping everything at the cpu level will give you a better experience.

Offline

#3 2011-09-16 11:20:09

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How exactly does ShadowFB work?

Hmm. vesa with the shadow framebuffer is faster on both the Intel machines I've tried it on... Guess that makes sense.

Offline

Board footer

Powered by FluxBB