[haiku-development] Where should video driver test for sufficient memory?

  • From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 16 Dec 2008 18:17:34 -0500

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?


Best regards,
Gerald


Other related posts: