[haiku-development] S3 Video Driver Fix
- From: Gerald Zajac <zajacg@xxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Thu, 22 May 2008 18:12:58 -0400
Attached is a diff file to make a small change to the S3 video driver.
It removes a #ifndef that excludes a few lines of code when the code is
built for Haiku. The old s3savage driver, when setting up a mode list
for a chip that is connected to an LCD display on a notebook computer,
excluded all resolutions with a width or height greater than that of the
notebook's LCD display. Since Haiku has a function for getting a
preferred display mode, I thought that allowing higher resolutions in
the mode list would be okay; however, I had forgotten that most of the
Savage chips do a poor job of handling resolutions greater than that of
a notebook LCD display. Thus, this fix restores the behavior of the old
s3savage driver so that the modes for chips with notebook LCD displays
will be limited to resolutions that are less than or equal to the size
of the display.
Best regards,
Gerald
Index: src/add-ons/accelerants/s3/mode.cpp
===================================================================
--- src/add-ons/accelerants/s3/mode.cpp (revision 25619)
+++ src/add-ons/accelerants/s3/mode.cpp (working copy)
@@ -202,22 +202,17 @@
return false;
}
- // If the video is connected directly to an LCD display (ie, laptop
+ // If the video mode is connected directly to an LCD display (ie, laptop
// computer), restrict the display mode to resolutions where the width
and
// height of the mode are less than or equal to the width and height of
the
- // LCD display. Note that this code is not needed under Haiku since it
can
- // get the preferred mode which should be the resolution of the LCD
display.
+ // LCD display.
-#ifndef __HAIKU__
-
if (si.displayType == MT_LCD && si.panelX > 0 && si.panelY > 0 &&
(mode->timing.h_display > si.panelX
|| mode->timing.v_display > si.panelY)) {
return false;
}
-#endif // __HAIKU__
-
return true;
}
Other related posts:
- » [haiku-development] S3 Video Driver Fix