summaryrefslogtreecommitdiff
path: root/src/radeon_display.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-12-16 12:02:37 +1100
committerDave Airlie <airlied@linux.ie>2006-12-16 12:02:37 +1100
commitb47013f41249516ae82e22bd75caf573da2cc13c (patch)
tree7138a3ef7a29fae1017dd3d4fe1cf848c7a7160c /src/radeon_display.c
parent62a5e7565b66d7b7d65609c034f34b55bd266617 (diff)
hook up mode detect to new randr code
Diffstat (limited to 'src/radeon_display.c')
-rw-r--r--src/radeon_display.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c
index 260f5a17..7f17e457 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -1149,14 +1149,15 @@ void RADEONSetupConnectors(ScrnInfoPtr pScrn)
}
}
-static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, int connector)
+static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr pPort)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
+ RADEONOutputPrivatePtr pRPort = pPort->driver_private;
if (info->IsMobility) {
- switch(connector) {
+ switch(pRPort->num) {
case 0:
/* non-DDC laptop panel connected on primary */
if (INREG(RADEON_BIOS_4_SCRATCH) & 4)
@@ -1177,18 +1178,17 @@ static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, int connector)
/* Primary Head (DVI or Laptop Int. panel)*/
/* A ddc capable display connected on DVI port */
/* Secondary Head (mostly VGA, can be DVI on some OEM boards)*/
-void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, int connector)
+void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr pPort)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- xf86OutputPtr pPort = pRADEONEnt->pOutput[connector];
RADEONOutputPrivatePtr pRPort = pPort->driver_private;
if (pRPort->MonType == MT_UNKNOWN) {
if ((pRPort->MonType = RADEONDisplayDDCConnected(pScrn,
pRPort->DDCType,
pPort)));
- else if((pRPort->MonType = RADEONPortCheckNonDDC(pScrn, connector)));
+ else if((pRPort->MonType = RADEONPortCheckNonDDC(pScrn, pPort)));
else
pRPort->MonType = RADEONCrtIsPhysicallyConnected(pScrn, !(pRPort->DACType));
}
@@ -1267,8 +1267,8 @@ static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
return;
}
- RADEONConnectorFindMonitor(pScrn, 0);
- RADEONConnectorFindMonitor(pScrn, 1);
+ RADEONConnectorFindMonitor(pScrn, pRADEONEnt->pOutput[0]);
+ RADEONConnectorFindMonitor(pScrn, pRADEONEnt->pOutput[1]);
}
@@ -2470,7 +2470,8 @@ radeon_detect(xf86OutputPtr output)
static DisplayModePtr
radeon_get_modes(xf86OutputPtr output)
{
-
+ RADEONProbeOutputModes(output);
+ return output->probed_modes;
}
static void
@@ -2550,8 +2551,12 @@ Bool RADEONAllocateConnectors(ScrnInfoPtr pScrn)
pRADEONEnt->PortInfo[i]->type = OUTPUT_VGA;
pRADEONEnt->pOutput[i]->driver_private = pRADEONEnt->PortInfo[i];
+ pRADEONEnt->PortInfo[i]->num = i;
+
+ pRADEONEnt->pOutput[i]->possible_crtcs = (1<<0) | (1<<1);
}
+
return TRUE;
}