[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 09:09:49 +0100
Am Dienstag, den 16.12.2008, 18:17 -0500 schrieb Gerald Zajac:
> Under r28800 I was trying to use an S3 Savage4 video card with 8 MB of
> memory. Before the virtual height of a display mode was doubled (ie,
> double the actual display height), I had no trouble setting any display
> mode with this video card. Now if the mode is less than 1280x1024 (eg,
> 1024x768), an error occurs when trying to set the mode to 1280x1024 or
> any higher mode. The error is "The screen mode could not be set;
> General System Error", and then the app server seems to hang up. BTW,
> all this was done using a color depth of 32 bits/pixel.
>
> Currently, the S3 driver tests for sufficient frame buffer memory only
> in the "Set Video Mode" function; thus, I tried putting code in the
> "Propose Display Mode" function to check for sufficient memory;
> however, the same results were obtained. When setting the mode,
> ProposeDisplayMode() is called about 15 times before SetDisplayMode() is
> called; however, each time ProposeDisplayMode() is called it is called
> to check mode 640x480 instead of the mode that will actually be set;
> thus, SetDisplayMode() winds up being the only place where the test for
> sufficient memory is made. This seems to be a bug in the app server.
>
> My question is: When the app server is fixed so that it handles this
> situation correctly, where should the video driver test for sufficient
> frame buffer memory and what error code should it return?
>
> Should I file a bug report on this problem?
I think checking in SetDisplayMode() is the best option.
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.
Best regards,
-Stephan
Other related posts: