summaryrefslogtreecommitdiff
path: root/src/g80_sor.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-03-27 17:12:21 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-03-27 17:12:21 -0700
commit2d8d5bd597d760968b683d41ced6a0a76518ec26 (patch)
tree9476bfa3e635c4c73a557aafdd36c86f5d5799c1 /src/g80_sor.c
parent4b8ed8497a9ab6ef1316bfcce9f31d96dd4b3540 (diff)
G80: Improve output detection.
Detect output status for paired outputs together and cache status until the BlockHandler to avoid redundantly probing for EDIDs or performing load detection.
Diffstat (limited to 'src/g80_sor.c')
-rw-r--r--src/g80_sor.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/g80_sor.c b/src/g80_sor.c
index 55a643f..fe34e7e 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -25,8 +25,6 @@
#include "config.h"
#endif
-#include <X11/Xatom.h>
-
#include "g80_type.h"
#include "g80_display.h"
#include "g80_output.h"
@@ -74,20 +72,15 @@ G80SorModeSet(xf86OutputPtr output, DisplayModePtr mode,
static xf86OutputStatus
G80SorDetect(xf86OutputPtr output)
{
- return XF86OutputStatusUnknown;
-#if 0
- DisplayModePtr modes = output->funcs->get_modes(output);
- xf86OutputStatus status;
+ G80OutputPrivPtr pPriv = output->driver_private;
- if(modes)
- status = XF86OutputStatusConnected;
- else
- status = XF86OutputStatusDisconnected;
- xfree(modes);
+ /* Assume physical status isn't going to change before the BlockHandler */
+ if(pPriv->cached_status != XF86OutputStatusUnknown)
+ return pPriv->cached_status;
- return status;
-#endif
+ G80OutputPartnersDetect(pPriv->partner, output, pPriv->i2c);
+ return pPriv->cached_status;
}
static void
@@ -128,6 +121,7 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or)
pPriv->type = SOR;
pPriv->or = or;
+ pPriv->cached_status = XF86OutputStatusUnknown;
pPriv->set_pclk = G80SorSetPClk;
output->driver_private = pPriv;
output->interlaceAllowed = TRUE;