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/smi501_output.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/smi501_output.c')
-rw-r--r-- | src/smi501_output.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/smi501_output.c b/src/smi501_output.c index 8bd3db9..7a22955 100644 --- a/src/smi501_output.c +++ b/src/smi501_output.c @@ -39,16 +39,6 @@ authorization from The XFree86 Project or Silicon Motion. static void SMI501_OutputDPMS_lcd(xf86OutputPtr output, int dpms) { - ENTER(); - - /* Nothing - FIXME */ - - LEAVE(); -} - -static void -SMI501_OutputDPMS_panel(xf86OutputPtr output, int dpms) -{ ScrnInfoPtr pScrn = output->scrn; SMIPtr pSmi = SMIPTR(pScrn); MSOCRegPtr mode = pSmi->mode; @@ -71,7 +61,7 @@ SMI501_OutputDPMS_panel(xf86OutputPtr output, int dpms) LEAVE(); } -static void +void SMI501_OutputDPMS_crt(xf86OutputPtr output, int dpms) { ScrnInfoPtr pScrn = output->scrn; @@ -83,20 +73,20 @@ SMI501_OutputDPMS_crt(xf86OutputPtr output, int dpms) mode->system_ctl.value = READ_SCR(pSmi, SYSTEM_CTL); switch (dpms) { case DPMSModeOn: - mode->system_ctl.f.dpmsh = 1; - mode->system_ctl.f.dpmsv = 1; - break; - case DPMSModeStandby: mode->system_ctl.f.dpmsh = 0; - mode->system_ctl.f.dpmsv = 1; + mode->system_ctl.f.dpmsv = 0; break; - case DPMSModeSuspend: + case DPMSModeStandby: mode->system_ctl.f.dpmsh = 1; mode->system_ctl.f.dpmsv = 0; break; - case DPMSModeOff: + case DPMSModeSuspend: mode->system_ctl.f.dpmsh = 0; - mode->system_ctl.f.dpmsv = 0; + mode->system_ctl.f.dpmsv = 1; + break; + case DPMSModeOff: + mode->system_ctl.f.dpmsh = 1; + mode->system_ctl.f.dpmsv = 1; break; } WRITE_SCR(pSmi, SYSTEM_CTL, mode->system_ctl.value); |