FB model basic issues (WAS: radeon, apertures & memory mapping)

Ville Syrjälä syrjala at sci.fi
Tue Mar 15 15:05:22 PST 2005


On Wed, Mar 16, 2005 at 09:44:19AM +1100, Benjamin Herrenschmidt wrote:
> 
> > DirectFB assumes all memory outside var.yres_virtual * fix.line_length is 
> > preserved. A totally valid assumption in my opinion. 
> 
> Except that you can't know in advance how much fix.line_length will be.
> The "fix" isn't really "fixed". Different cards will have different
> requirements depending on the bit depth for example. On radeonfb, the
> line_length will vary due to alignment constraints related to the
> engine, or due to tiling, etc.... etc...
> 
> So you basically don't know in advance what will be preserved... (And
> you can't, unless you start having all sort of card specific knowledge).

True. Currently DirectFB doesn't handle this correctly. But that could be 
easily fixed if only line_length wasn't totally misplaced. It really 
belongs to fb_var_screeninfo. We could first test the mode with 
FB_ACTIVATE_TEST and actually see how much memory it needs and could 
evict enough offscreen surfaces to make room before actually setting the 
mode. Currently it would need some guesswork.

-- 
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/



More information about the xorg mailing list