summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-09-23 07:38:25 +1000
committerDave Airlie <airlied@linux.ie>2006-09-23 07:38:25 +1000
commita8b9aa69259a0706d0688d2656ece5a292799242 (patch)
treef2dbc8c1f701c0f7e11470958bd78a05fae0c05a /src
parent8d4ae98c528a2309dc3c545893dbba2e7f76916c (diff)
radeon: align tabs and make display detection like superpatch
Diffstat (limited to 'src')
-rw-r--r--src/radeon_display.c126
1 files changed, 57 insertions, 69 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c
index d07bf6f0..5401a9a1 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -1112,79 +1112,67 @@ static void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
}
- if(((!info->HasCRTC2) || info->IsDellServer)) {
- if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN) {
- if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_DVI, &pRADEONEnt->PortInfo[0])));
- else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_VGA, &pRADEONEnt->PortInfo[0])));
- else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_CRT2, &pRADEONEnt->PortInfo[0])));
- else
- pRADEONEnt->PortInfo[0].MonType = MT_CRT;
- }
-
- if (!ignore_edid) {
- if (pRADEONEnt->PortInfo[0].MonInfo) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Monitor1 EDID data ---------------------------\n");
- xf86PrintEDID(pRADEONEnt->PortInfo[0].MonInfo );
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "End of Monitor1 EDID data --------------------\n");
- }
- }
-
- pRADEONEnt->PortInfo[1].MonType = MT_NONE;
- pRADEONEnt->PortInfo[1].MonInfo = NULL;
- pRADEONEnt->PortInfo[1].DDCType = DDC_NONE_DETECTED;
- pRADEONEnt->PortInfo[1].DACType = DAC_UNKNOWN;
- pRADEONEnt->PortInfo[1].TMDSType = TMDS_UNKNOWN;
- pRADEONEnt->PortInfo[1].ConnectorType = CONNECTOR_NONE;
-
- pRADEONEnt->Controller[0].pPort = &pRADEONEnt->PortInfo[0];
- pRADEONEnt->Controller[1].pPort = &pRADEONEnt->PortInfo[1];
-
- info->DisplayType = pRADEONEnt->Controller[0].pPort->MonType;
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Primary:\n Monitor -- %s\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n DDC Type -- %s\n",
- MonTypeName[pRADEONEnt->PortInfo[0].MonType+1],
- info->IsAtomBios ?
- ConnectorTypeNameATOM[pRADEONEnt->PortInfo[0].ConnectorType]:
- ConnectorTypeName[pRADEONEnt->PortInfo[0].ConnectorType],
- DACTypeName[pRADEONEnt->PortInfo[0].DACType+1],
- TMDSTypeName[pRADEONEnt->PortInfo[0].TMDSType+1],
- DDCTypeName[pRADEONEnt->PortInfo[0].DDCType]);
-
- return;
- }
-
if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN || pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
+
+ if ((!info->HasCRTC2) && (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN)) {
+ if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_DVI,
+ &pRADEONEnt->PortInfo[0])));
+ else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_VGA,
+ &pRADEONEnt->PortInfo[0])));
+ else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_CRT2,
+ &pRADEONEnt->PortInfo[0])));
+ else
+ pRADEONEnt->PortInfo[0].MonType = MT_CRT;
+
+ if (!ignore_edid) {
+ if (pRADEONEnt->PortInfo[0].MonInfo) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Monitor1 EDID data ---------------------------\n");
+ xf86PrintEDID(pRADEONEnt->PortInfo[0].MonInfo );
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "End of Monitor1 EDID data --------------------\n");
+ }
+ }
+
+ pRADEONEnt->PortInfo[1].MonType = MT_NONE;
+ pRADEONEnt->PortInfo[1].MonInfo = NULL;
+ pRADEONEnt->PortInfo[1].DDCType = DDC_NONE_DETECTED;
+ pRADEONEnt->PortInfo[1].DACType = DAC_UNKNOWN;
+ pRADEONEnt->PortInfo[1].TMDSType = TMDS_UNKNOWN;
+ pRADEONEnt->PortInfo[1].ConnectorType = CONNECTOR_NONE;
+
+ pRADEONEnt->Controller[0].pPort = &pRADEONEnt->PortInfo[0];
+ pRADEONEnt->Controller[1].pPort = &pRADEONEnt->PortInfo[1];
+ return;
+ }
+
+ /* Primary Head (DVI or Laptop Int. panel)*/
+ /* A ddc capable display connected on DVI port */
+ if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN) {
+ if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn,
+ pRADEONEnt->PortInfo[0].DDCType,
+ &pRADEONEnt->PortInfo[0])));
+ else if (info->IsMobility &&
+ (INREG(RADEON_BIOS_4_SCRATCH) & 4)) {
+ /* non-DDC laptop panel connected on primary */
+ pRADEONEnt->PortInfo[0].MonType = MT_LCD;
+ } else {
+ /* CRT on DVI, TODO: not reliable, make it always return false for now*/
+ pRADEONEnt->PortInfo[0].MonType = RADEONCrtIsPhysicallyConnected(pScrn, !(pRADEONEnt->PortInfo[0].DACType));
+ }
+ }
- /* Primary Head (DVI or Laptop Int. panel)*/
- /* A ddc capable display connected on DVI port */
- if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN) {
- if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn,
- pRADEONEnt->PortInfo[0].DDCType,
- &pRADEONEnt->PortInfo[0])));
- else if (info->IsMobility &&
- (INREG(RADEON_BIOS_4_SCRATCH) & 4)) {
- /* non-DDC laptop panel connected on primary */
- pRADEONEnt->PortInfo[0].MonType = MT_LCD;
- } else {
- /* CRT on DVI, TODO: not reliable, make it always return false for now*/
- pRADEONEnt->PortInfo[0].MonType = RADEONCrtIsPhysicallyConnected(pScrn, !(pRADEONEnt->PortInfo[0].DACType));
- }
+ /* Secondary Head (mostly VGA, can be DVI on some OEM boards)*/
+ if (pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
+ if((pRADEONEnt->PortInfo[1].MonType =
+ RADEONDisplayDDCConnected(pScrn, pRADEONEnt->PortInfo[1].DDCType, &pRADEONEnt->PortInfo[1])));
+ else if (info->IsMobility &&
+ (INREG(RADEON_FP2_GEN_CNTL) & RADEON_FP2_ON)) {
+ /* non-DDC TMDS panel connected through DVO */
+ pRADEONEnt->PortInfo[1].MonType = MT_DFP;
+ } else
+ pRADEONEnt->PortInfo[1].MonType = RADEONCrtIsPhysicallyConnected(pScrn, !(pRADEONEnt->PortInfo[1].DACType));
+ }
}
- /* Secondary Head (mostly VGA, can be DVI on some OEM boards)*/
- if (pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
- if((pRADEONEnt->PortInfo[1].MonType =
- RADEONDisplayDDCConnected(pScrn, pRADEONEnt->PortInfo[1].DDCType, &pRADEONEnt->PortInfo[1])));
- else if (info->IsMobility &&
- (INREG(RADEON_FP2_GEN_CNTL) & RADEON_FP2_ON)) {
- /* non-DDC TMDS panel connected through DVO */
- pRADEONEnt->PortInfo[1].MonType = MT_DFP;
- } else
- pRADEONEnt->PortInfo[1].MonType = RADEONCrtIsPhysicallyConnected(pScrn, !(pRADEONEnt->PortInfo[1].DACType));
- }
- }
-
if(ignore_edid) {
pRADEONEnt->PortInfo[0].MonInfo = NULL;
pRADEONEnt->PortInfo[1].MonInfo = NULL;