[haiku-development] Re: Where should video driver test for sufficient memory?
- From: Stephan Aßmus <superstippi@xxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Wed, 17 Dec 2008 17:53:48 +0100
Am Mittwoch, den 17.12.2008, 11:11 -0500 schrieb Gerald Zajac:
> Stephan Aßmus wrote:
> > I think checking in SetDisplayMode() is the best option.
> >
> >
> The S3 driver currently checks for sufficient memory in
> SetDisplayMode(); thus, I will leave that unchanged; however, I will
> change the error code to B_NO_MEMORY when it detects insufficient frame
> buffer memory. Currently, it uses the error code B_ERROR.
>
> > Sorry that I have not yet fixed app_server. I don't remember if I
> > mentioned this already, but
> > src/servers/app/drawing/AccelerantHWInterface.cpp has a #define at a
> > central place somewhere (in SetMode()?) that turns off the double
> > buffering behaviour. It's supposed to detect the failing and fall back
> > to single buffer. Maybe you can even find out where the error is
> > there... but at least you should be able to work around the issue by
> > switching the #define for the time being.
> >
> >
> I looked at the code in AccelerantHWInterface.cpp, and it appears to use
> double buffering for only 32 bit color; thus, to avoid this problem
> when testing a video driver, I can use 16 bit color. Since I hope to
> have the code for handling ATI Mach64 chips working soon, I can avoid
> this problem by using 16 bit color when testing those chips. Most of
> them have 2, 4, or 8 MB's of memory; thus, this problem would certainly
> occur when testing those chips.
>
> When do you think this problem in the app_server will be fixed?
I have no idea, really, as I am pretty busy with work right now and
don't really know when I will find more time for Haiku again. If it
really holds you up, I suggest again that you take a look at
AccelerantHWInterface::SetMode(). It should really not be hard to fix,
the intention is to retry setting the mode when it failed with double
height and try again with regular height.
Best regards,
-Stephan
Other related posts: