diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2007-11-13 17:18:10 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2007-11-13 17:22:03 -0800 |
commit | d483ecd851bb84014f1fa86f0ada4540b3ad801e (patch) | |
tree | 0a2d7e0554e79bd5af1a64775c2c9579449cad5c /src/g80_dac.c | |
parent | 4da88cb3dd13a86c477389c5b2d42d7d40ce2023 (diff) |
G80: Reduce load detection false positives.
Diffstat (limited to 'src/g80_dac.c')
-rw-r--r-- | src/g80_dac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/g80_dac.c b/src/g80_dac.c index 30413cd..b155d2d 100644 --- a/src/g80_dac.c +++ b/src/g80_dac.c @@ -29,6 +29,7 @@ #define DPMS_SERVER #include <X11/extensions/dpms.h> +#include <xf86_OSproc.h> #include "g80_type.h" #include "g80_display.h" @@ -134,6 +135,7 @@ G80DacLoadDetect(xf86OutputPtr output) G80OutputPrivPtr pPriv = output->driver_private; const int scrnIndex = pScrn->scrnIndex; const int dacOff = 2048 * pPriv->or; + int sigstate; CARD32 load, tmp, tmp2; xf86DrvMsg(scrnIndex, X_PROBED, "Trying load detection on VGA%i ... ", @@ -145,7 +147,9 @@ G80DacLoadDetect(xf86OutputPtr output) while(pNv->reg[(0x0061A004+dacOff)/4] & 0x80000000); tmp = pNv->architecture == 0x50 ? 420 : 340; pNv->reg[(0x0061A00C+dacOff)/4] = tmp | 0x100000; - usleep(4500); + sigstate = xf86BlockSIGIO(); + usleep(45000); + xf86UnblockSIGIO(sigstate); load = pNv->reg[(0x0061A00C+dacOff)/4]; pNv->reg[(0x0061A00C+dacOff)/4] = 0; pNv->reg[(0x0061A004+dacOff)/4] = 0x80000000 | tmp2; |