diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-24 17:55:02 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-24 17:55:02 -0200 |
commit | f2c83671cccc42345bfc9b506365936bbb6b9ef0 (patch) | |
tree | 07e6bf7e71c5aa909201ee75bee483451763439b /src/smi_501.c | |
parent | 1efe36ed5cf5b0931daa915ca3ce231b78168d87 (diff) |
Make Dualhead option functional.
Slightly change clock selection code to start using 501 compatible values,
before checking 502 values, if it is a 502.
DPMS for the VGA/second output was being set with bits inverted, that is
dpms-on was programmed as dpms-off and vice versa. This was one of the
reasons of dual head not working.
Corrected wrong vsync programming for the crt. Cut&paste/typo caused
programming vsync with hsync values, and thus, never getting the crt
to accept the mode being programmed.
If adding:
Option "Dualhead" "True"
to xorg.conf, now you should be able to do things like:
$ DISPLAY=:0.0 xrandr --output VGA --right-of LVDS
$ DISPLAY=:0.0 xrandr --output VGA --below LVDS
and so on.
*Iff* there is some way to not have any limitations for video playback,
this option should be made default or automatically configured.
Diffstat (limited to 'src/smi_501.c')
-rw-r--r-- | src/smi_501.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/smi_501.c b/src/smi_501.c index 80f3401..555dfd8 100644 --- a/src/smi_501.c +++ b/src/smi_501.c @@ -331,19 +331,9 @@ SMI501_WriteMode_crt(ScrnInfoPtr pScrn, MSOCRegPtr mode) void SMI501_WriteMode(ScrnInfoPtr pScrn, MSOCRegPtr restore) { - /* FIXME There is a problem here: - * The kernel may not have modified some values, like clocks, - * but when "restoring" them, it will actually change from a - * a valid value, to a random value. - */ -#if 0 - SMIPtr pSmi = SMIPTR(pScrn); - SMI501_WriteMode_common(pScrn, restore); SMI501_WriteMode_lcd(pScrn, restore); - if (pSmi->Dualhead) - SMI501_WriteMode_crt(pScrn, restore); -#endif + SMI501_WriteMode_crt(pScrn, restore); } void @@ -423,7 +413,7 @@ SMI501_FindClock(double clock, int32_t max_divider, Bool has1xclck, for (divider = 1; divider <= max_divider; divider += 2) { for (shift = 0; shift < 8; shift++) { /* Divider 1 not in specs form cards older then 502 */ - for (xclck = has1xclck != FALSE; xclck <= 1; xclck++) { + for (xclck = 1; xclck >= !has1xclck; xclck--) { diff = (mclk / (divider << shift << xclck)) - clock; if (fabs(diff) < best) { *x2_shift = shift; |