[haiku-development] S3 Savage 1400x1050 Accelerated Drawing Problem

  • From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 11 Sep 2008 22:51:48 -0400

With the Savage 3D, Savage4, Savage MX, and Savage IX chips, the accelerated drawing functions work fine at the 1400x1050 resolution; however, with the other Savage chips, the drawing is badly skewed. If accelerated drawing is disabled, these chips draw okay. The problem appears to be because 1400 is the only display width that is not evenly divisible by 16 (it is evenly divisible by 8). When the display width is specified when initializing the 2D graphics engine, the 4 low order bits of the display width are used for flags by the chips that fail to draw properly; whereas, for the chips that draw properly, fewer low order bits are used for flags.


There are two possible fixes for this problem. One is to disable accelerated drawing for 1400x1050 on the chips that have this problem, and the other fix is change the width to 1392 or 1408 (which are divisible by 32) when setting the mode. I prefer the second option where a width of 1392 used. The list of modes would be unchanged and would list 1400x1050 as one of the modes; however, when the mode is set, h_display in struct display_timing will be changed to 1392. 1392 will be used instead of 1408 because on a laptop display such as the Thinkpad T23 1408 causes the rightmost 8 pixels to be off the right edge of the display; whereas, 1392 causes only a very narrow blank strip on the left edge of the screen. With an external monitor, the user is not aware that the display width is not exactly 1400. Note that the width will be changed only for the chips that have this problem.

If there are no serious objections, I will implement the my preferred fix as described above.

Best regards,
Gerald


Other related posts: