summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-13 15:05:01 -0400
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-13 15:05:01 -0400
commit58ce388452b7bc790c438d75c9cf4a0f69f0d7b2 (patch)
treef3a522b554977c23959195ae45cc0396b96325af
parent66e8e6c8348d007930730e90295588efe8108844 (diff)
RADEON: Remove dead code
-rw-r--r--src/radeon_display.c431
-rw-r--r--src/radeon_driver.c176
-rw-r--r--src/radeon_probe.h4
3 files changed, 0 insertions, 611 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c
index cafcb0e..7ec6c6b 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -894,22 +894,6 @@ static void RADEONGetTMDSInfo(xf86OutputPtr output)
}
}
-#if 0
-void RADEONGetPanelInfo (ScrnInfoPtr pScrn)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- char* s;
-
- if((s = xf86GetOptValString(info->Options, OPTION_PANEL_SIZE))) {
- info->PanelPwrDly = 200;
- if (sscanf (s, "%dx%d", &info->PanelXRes, &info->PanelYRes) != 2) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Invalid PanelSize option: %s\n", s);
- RADEONGetPanelInfoFromReg(output);
- }
- }
-}
-#endif
-
void RADEONGetTVDacAdjInfo(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
@@ -987,105 +971,6 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
}
}
-#if 0
-void RADEONQueryConnectedDisplays(ScrnInfoPtr pScrn)
-{
-
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- const char *s;
- Bool ignore_edid = FALSE;
-
- /* IgnoreEDID option is different from the NoDDCxx options used by DDC module
- * When IgnoreEDID is used, monitor detection will still use DDC
- * detection, but all EDID data will not be used in mode validation.
- * You can use this option when you have a DDC monitor but want specify your own
- * monitor timing parameters by using HSync, VRefresh and Modeline,
- */
- if (xf86GetOptValBool(info->Options, OPTION_IGNORE_EDID, &ignore_edid)) {
- if (ignore_edid)
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "IgnoreEDID is specified, EDID data will be ignored\n");
- }
-
- if ((s = xf86GetOptValString(info->Options, OPTION_MONITOR_LAYOUT))) {
- if (!ignore_edid) {
- if ((pRADEONEnt->PortInfo[0]->MonType > MT_NONE) &&
- (pRADEONEnt->PortInfo[0]->MonType < MT_STV))
- RADEONDisplayDDCConnected(pScrn, pRADEONEnt->PortInfo[0]->DDCType,
- pRADEONEnt->pOutput[0]);
- if ((pRADEONEnt->PortInfo[1]->MonType > MT_NONE) &&
- (pRADEONEnt->PortInfo[1]->MonType < MT_STV))
- RADEONDisplayDDCConnected(pScrn, pRADEONEnt->PortInfo[1]->DDCType,
- pRADEONEnt->pOutput[1]);
- }
- }
- else {
- /* force monitor redetection */
- pRADEONEnt->PortInfo[0]->MonType = MT_UNKNOWN;
- pRADEONEnt->PortInfo[1]->MonType = MT_UNKNOWN;
- }
-
-
- if (pRADEONEnt->PortInfo[0]->MonType == MT_UNKNOWN || pRADEONEnt->PortInfo[1]->MonType == MT_UNKNOWN) {
-
- if ((!pRADEONEnt->HasCRTC2) && (pRADEONEnt->PortInfo[0]->MonType == MT_UNKNOWN)) {
- if((pRADEONEnt->PortInfo[0]->MonType = RADEONDisplayDDCConnected(pScrn, DDC_DVI,
- pRADEONEnt->pOutput[0])));
- else if((pRADEONEnt->PortInfo[0]->MonType = RADEONDisplayDDCConnected(pScrn, DDC_VGA,
- pRADEONEnt->pOutput[0])));
- else if((pRADEONEnt->PortInfo[0]->MonType = RADEONDisplayDDCConnected(pScrn, DDC_CRT2,
- pRADEONEnt->pOutput[0])));
- else
- pRADEONEnt->PortInfo[0]->MonType = MT_CRT;
-
- if (!ignore_edid) {
- if (pRADEONEnt->pOutput[0]->MonInfo) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Monitor1 EDID data ---------------------------\n");
- xf86PrintEDID(pRADEONEnt->pOutput[0]->MonInfo );
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "End of Monitor1 EDID data --------------------\n");
- }
- }
-
- pRADEONEnt->PortInfo[1]->MonType = MT_NONE;
- pRADEONEnt->pOutput[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->PortInfo[0]->crtc_num = 1;
- pRADEONEnt->PortInfo[1]->crtc_num = 2;
-
- return;
- }
-
- RADEONConnectorFindMonitor(pScrn, pRADEONEnt->pOutput[0]);
- RADEONConnectorFindMonitor(pScrn, pRADEONEnt->pOutput[1]);
-
- }
-
- if(ignore_edid) {
- pRADEONEnt->pOutput[0]->MonInfo = NULL;
- pRADEONEnt->pOutput[1]->MonInfo = NULL;
- } else {
- if (pRADEONEnt->pOutput[0]->MonInfo) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EDID data from the display on 1st port ----------------------\n");
- xf86PrintEDID( pRADEONEnt->pOutput[0]->MonInfo );
- }
-
- if (pRADEONEnt->pOutput[1]->MonInfo) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EDID data from the display on 2nd port -----------------------\n");
- xf86PrintEDID( pRADEONEnt->pOutput[1]->MonInfo );
- }
- }
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "\n");
-
- return;
-}
-#endif
-
Bool RADEONMapControllers(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -1116,115 +1001,6 @@ Bool RADEONMapControllers(ScrnInfoPtr pScrn)
}
-#if 0
- if (!info->IsSecondary) {
- pRADEONEnt->PortInfo[0]->crtc_num = 1;
- pRADEONEnt->PortInfo[1]->crtc_num = 2;
-
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Port2:\n Monitor -- %s\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n DDC Type -- %s\n",
- MonTypeName[pRADEONEnt->PortInfo[1]->MonType+1],
- info->IsAtomBios ?
- ConnectorTypeNameATOM[pRADEONEnt->PortInfo[1]->ConnectorType]:
- ConnectorTypeName[pRADEONEnt->PortInfo[1]->ConnectorType],
- DACTypeName[pRADEONEnt->PortInfo[1]->DACType+1],
- TMDSTypeName[pRADEONEnt->PortInfo[1]->TMDSType+1],
- DDCTypeName[pRADEONEnt->PortInfo[1]->DDCType]);
-
- /* no display detected on primary port*/
- if (pRADEONEnt->PortInfo[0]->MonType == MT_NONE) {
- if (pRADEONEnt->PortInfo[1]->MonType != MT_NONE) {
- /* Only one detected on secondary, let it to be primary */
- pRADEONEnt->PortInfo[0]->crtc_num = 2;
- pRADEONEnt->PortInfo[1]->crtc_num = 1;
- head_reversed = TRUE;
- } else {
- /* None detected, Default to a CRT connected */
- pRADEONEnt->PortInfo[0]->MonType = MT_CRT;
- }
- }
-
- if ((pRADEONEnt->PortInfo[0]->MonType == MT_LCD) &&
- (pRADEONEnt->PortInfo[1]->MonType == MT_CRT)) {
- if (!(INREG(RADEON_LVDS_GEN_CNTL) & RADEON_LVDS_ON)) {
- /* LCD is switched off, don't turn it on, otherwise it may casue lockup due to SS issue. */
- pRADEONEnt->PortInfo[0]->crtc_num = 2;
- pRADEONEnt->PortInfo[1]->crtc_num = 1;
- pRADEONEnt->PortInfo[0]->MonType = MT_NONE;
- head_reversed = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "LCD is switched off, only CRT will be used\n");
- }
- }
-
- if ((pRADEONEnt->PortInfo[0]->MonType != MT_NONE) &&
- (pRADEONEnt->PortInfo[1]->MonType != MT_NONE)) {
- if (xf86ReturnOptValBool(info->Options, OPTION_REVERSE_DISPLAY, FALSE)) {
- if (info->IsMobility) {
- /* Don't reverse display for mobility chips, as only CRTC1 path has RMX which
- will be required by many LCD panels
- */
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Reverse Display cannot be used for mobility chip\n");
- } else {
- pRADEONEnt->PortInfo[0]->crtc_num = 2;
- pRADEONEnt->PortInfo[1]->crtc_num = 1;
- head_reversed = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Primary and Secondary mapping is reversed\n");
- }
- }
- }
-
- if (pRADEONEnt->HasSecondary && pRADEONEnt->PortInfo[1]->MonType == MT_NONE) {
- pRADEONEnt->HasSecondary = FALSE;
- }
- }
-
- if(pRADEONEnt->HasCRTC2) {
- if(info->IsSecondary) {
- output = RADEONGetCrtcConnector(pScrn, 2);
- radeon_output = output->driver_private;
- pRADEONEnt->Controller[1]->binding = 2;
- if (output) {
- pScrn->monitor->DDC = output->MonInfo;
- }
- } else {
- output = RADEONGetCrtcConnector(pScrn, 1);
- radeon_output = output->driver_private;
- pRADEONEnt->Controller[0]->binding = 1;
- if (output) {
- pScrn->monitor->DDC = output->MonInfo;
- }
- }
-
- if(!pRADEONEnt->HasSecondary) {
- pRADEONEnt->Controller[1]->binding = 1;
- }
- } else {
- output = RADEONGetCrtcConnector(pScrn, 1);
- radeon_output = output->driver_private;
- if (output) {
- if (radeon_output->MonType == MT_NONE)
- radeon_output->MonType = MT_CRT;
- pScrn->monitor->DDC = output->MonInfo;
- }
- output = RADEONGetCrtcConnector(pScrn, 2);
- radeon_output = output->driver_private;
- if (output)
- radeon_output->MonType = MT_NONE;
- pRADEONEnt->Controller[1]->binding = 1;
- }
-
- if (!info->IsSecondary) {
- output = RADEONGetCrtcConnector(pScrn, 2);
- radeon_output = output->driver_private;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "---- Primary Head: Port%d ---- \n", head_reversed?2:1);
- if (radeon_output->MonType != MT_NONE)
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "---- Secondary Head: Port%d ----\n", head_reversed?1:2);
- else
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "---- Secondary Head: Not used ----\n");
- }
-#endif
-
return TRUE;
}
@@ -2403,36 +2179,6 @@ Bool RADEONAllocateControllers(ScrnInfoPtr pScrn)
return TRUE;
}
-#if 0
-Bool RADEONAllocatePortInfo(ScrnInfoPtr pScrn)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- int num_connectors;
- int i;
-
- if (pRADEONEnt->PortInfo[0])
- return TRUE;
-
- /* when we support TV, this should be incremented */
- if (info->IsMobility) {
- /* DVI on docks */
- info->max_connectors = 3;
- } else {
- info->max_connectors = 2;
- }
-
- /* for now always allocate max connectors */
- for (i = 0 ; i < info->max_connectors; i++) {
-
- pRADEONEnt->PortInfo[i] = xnfcalloc(sizeof(RADEONOutputPrivateRec), 1);
- if (!pRADEONEnt->PortInfo[i])
- return FALSE;
- }
- return TRUE;
-}
-#endif
-
void RADEONSetOutputType(ScrnInfoPtr pScrn, RADEONOutputPrivatePtr radeon_output)
{
RADEONInfoPtr info = RADEONPTR (pScrn);
@@ -2594,137 +2340,6 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
} else if (!pRADEONEnt->HasCRTC2) {
info->BiosConnector[0].DACType = DAC_PRIMARY;
}
-#if 0
- /*
- * MonitorLayout option takes a string for two monitors connected in following format:
- * Option "MonitorLayout" "primary-port-display, secondary-port-display"
- * primary and secondary port displays can have one of following:
- * NONE, CRT, LVDS, TMDS
- * With this option, driver will bring up monitors as specified,
- * not using auto-detection routines to probe monitors.
- *
- * This option can be used when the false monitor detection occurs.
- *
- * This option can also be used to disable one connected display.
- * For example, if you have a laptop connected to an external CRT
- * and you want to disable the internal LCD panel, you can specify
- * Option "MonitorLayout" "NONE, CRT"
- *
- * This option can also used to disable Clone mode. One there is only
- * one monitor is specified, clone mode will be turned off automatically
- * even you have two monitors connected.
- *
- * Another usage of this option is you want to config the server
- * to start up with a certain monitor arrangement even one monitor
- * is not plugged in when server starts.
- * For example, you can config your laptop with
- * Option "MonitorLayout" "LVDS, CRT"
- * Option "CloneHSync" "40-150"
- * Option "CloneVRefresh" "60-120"
- * With these options, you can connect in your CRT monitor later
- * after the X server has started.
- */
- if ((s = xf86GetOptValString(info->Options, OPTION_MONITOR_LAYOUT))) {
- char s1[5], s2[5];
- i = 0;
- /* When using user specified monitor types, we will not do DDC detection
- *
- */
- do {
- switch(*s) {
- case ',':
- s1[i] = '\0';
- i = 0;
- second = 1;
- break;
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- break;
- default:
- if (second)
- s2[i] = *s;
- else
- s1[i] = *s;
- i++;
- break;
- }
- if (i > 4) i = 4;
- } while(*s++);
- s2[i] = '\0';
-
- for (i = 0; i < max_mt; i++)
- {
- if (strcmp(s1, MonTypeName[i]) == 0)
- {
- pRADEONEnt->PortInfo[0]->MonType = MonTypeID[i];
- break;
- }
- }
- if (i == max_mt)
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Invalid Monitor type specified for 1st port \n");
-
- for (i = 0; i < max_mt; i++)
- {
- if (strcmp(s2, MonTypeName[i]) == 0)
- {
- pRADEONEnt->PortInfo[1]->MonType = MonTypeID[i];
- break;
- }
-
- }
- if (i == max_mt)
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Invalid Monitor type specified for 2nd port \n");
-
- if (i == max_mt)
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Invalid Monitor type specified for 2nd port \n");
-
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "MonitorLayout Option: \n\tMonitor1--Type %s, Monitor2--Type %s\n\n", s1, s2);
-#if 0
- if (pRADEONEnt->PortInfo[1]->MonType == MT_CRT) {
- pRADEONEnt->PortInfo[1]->DACType = DAC_PRIMARY;
- pRADEONEnt->PortInfo[1]->TMDSType = TMDS_UNKNOWN;
- pRADEONEnt->PortInfo[1]->DDCType = DDC_VGA;
- pRADEONEnt->PortInfo[1]->ConnectorType = CONNECTOR_CRT;
- pRADEONEnt->PortInfo[0]->DACType = DAC_TVDAC;
- pRADEONEnt->PortInfo[0]->TMDSType = TMDS_UNKNOWN;
- pRADEONEnt->PortInfo[0]->DDCType = DDC_NONE_DETECTED;
- pRADEONEnt->PortInfo[0]->ConnectorType = pRADEONEnt->PortInfo[0]->MonType+1;
- pRADEONEnt->PortInfo[0]->MonInfo = NULL;
- }
-#endif
-
- /* some thinkpads and powerbooks use lvds and internal tmds
- * at the same time. --AGD
- */
- if ((pRADEONEnt->PortInfo[0]->MonType == MT_LCD) &&
- (pRADEONEnt->PortInfo[1]->MonType == MT_DFP)) {
- pRADEONEnt->PortInfo[1]->DDCType = DDC_DVI;
- pRADEONEnt->PortInfo[0]->DDCType = DDC_MONID;
- pRADEONEnt->PortInfo[1]->TMDSType = TMDS_INT;
- pRADEONEnt->PortInfo[1]->ConnectorType = CONNECTOR_DVI_I;
- pRADEONEnt->PortInfo[0]->TMDSType = TMDS_UNKNOWN;
- }
- }
-
- if (info->IsMobility) {
- pRADEONEnt->PortInfo[2]->DDCType = DDC_DVI;
- pRADEONEnt->PortInfo[2]->TMDSType = TMDS_INT;
- pRADEONEnt->PortInfo[2]->ConnectorType = CONNECTOR_DVI_D;
- pRADEONEnt->PortInfo[0]->TMDSType = TMDS_UNKNOWN;
- if (pRADEONEnt->PortInfo[0]->DDCType == DDC_DVI) {
- pRADEONEnt->PortInfo[0]->DDCType = DDC_MONID;
- }
- if (pRADEONEnt->PortInfo[0]->TMDSType == TMDS_INT) {
- pRADEONEnt->PortInfo[0]->TMDSType = TMDS_UNKNOWN;
- }
- }
-#endif
for (i = 0 ; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
RADEONOutputPrivatePtr radeon_output = xnfcalloc(sizeof(RADEONOutputPrivateRec), 1);
@@ -2812,52 +2427,6 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
return TRUE;
}
-#if 0
-Bool RADEONAllocateConnectors(ScrnInfoPtr pScrn)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- int i;
-
- if (pRADEONEnt->pOutput[0])
- return TRUE;
-
- /* for now always allocate max connectors */
- for (i = 0 ; i < info->max_connectors; i++) {
-
- pRADEONEnt->pOutput[i] = xf86OutputCreate(pScrn, &radeon_output_funcs, OutputType[pRADEONEnt->PortInfo[i]->type]);
- if (!pRADEONEnt->pOutput[i])
- return FALSE;
-
- pRADEONEnt->pOutput[i]->driver_private = pRADEONEnt->PortInfo[i];
- pRADEONEnt->PortInfo[i]->num = i;
-
- pRADEONEnt->pOutput[i]->possible_crtcs = 1;
- if (pRADEONEnt->PortInfo[i]->type != OUTPUT_LVDS)
- pRADEONEnt->pOutput[i]->possible_crtcs |= 2;
-
- pRADEONEnt->pOutput[i]->possible_clones = 0 /*1|2*/;
- }
-
- return TRUE;
-}
-#endif
-
-#if 0
-xf86OutputPtr RADEONGetCrtcConnector(ScrnInfoPtr pScrn, int crtc_num)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- int i;
-
- for (i = 0; i < info->max_connectors; i++) {
- if (pRADEONEnt->PortInfo[i]->crtc_num == crtc_num)
- return pRADEONEnt->pOutput[i];
- }
- return NULL;
-}
-#endif
-
/**
* In the current world order, there are lists of modes per output, which may
* or may not include the mode that was asked to be set by XFree86's mode
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 0616b32..adc635d 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -6070,179 +6070,6 @@ static void RADEONInitPalette(RADEONSavePtr save)
}
#endif
-#if 0
-/* Define registers for a requested video mode */
-Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1,
- DisplayModePtr crtc2, int crtc_mask,
- RADEONSavePtr save, RADEONMonitorType montype)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- double dot_clock = 0;
- RADEONInfoPtr info0 = NULL;
- ScrnInfoPtr pScrn0 = NULL;
-
- if (crtc_mask & 1)
- xf86PrintModeline(pScrn->scrnIndex, crtc1);
- if (crtc_mask & 2)
- xf86PrintModeline(pScrn->scrnIndex, crtc2);
-
-#if RADEON_DEBUG
- if (crtc1 && (crtc_mask & 1)) {
- ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
- crtc1->name,
- crtc1->Clock/1000.0,
-
- crtc1->HDisplay,
- crtc1->HSyncStart,
- crtc1->HSyncEnd,
- crtc1->HTotal,
-
- crtc1->VDisplay,
- crtc1->VSyncStart,
- crtc1->VSyncEnd,
- crtc1->VTotal,
- pScrn->depth,
- pScrn->bitsPerPixel);
- if (crtc1->Flags & V_DBLSCAN) ErrorF(" D");
- if (crtc1->Flags & V_CSYNC) ErrorF(" C");
- if (crtc1->Flags & V_INTERLACE) ErrorF(" I");
- if (crtc1->Flags & V_PHSYNC) ErrorF(" +H");
- if (crtc1->Flags & V_NHSYNC) ErrorF(" -H");
- if (crtc1->Flags & V_PVSYNC) ErrorF(" +V");
- if (crtc1->Flags & V_NVSYNC) ErrorF(" -V");
- ErrorF("\n");
- }
- if (crtc2 && (crtc_mask & 2)) {
- ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
- crtc2->name,
- crtc2->Clock/1000.0,
-
- crtc2->CrtcHDisplay,
- crtc2->CrtcHSyncStart,
- crtc2->CrtcHSyncEnd,
- crtc2->CrtcHTotal,
-
- crtc2->CrtcVDisplay,
- crtc2->CrtcVSyncStart,
- crtc2->CrtcVSyncEnd,
- crtc2->CrtcVTotal,
- pScrn->depth,
- pScrn->bitsPerPixel);
- if (crtc2->Flags & V_DBLSCAN) ErrorF(" D");
- if (crtc2->Flags & V_CSYNC) ErrorF(" C");
- if (crtc2->Flags & V_INTERLACE) ErrorF(" I");
- if (crtc2->Flags & V_PHSYNC) ErrorF(" +H");
- if (crtc2->Flags & V_NHSYNC) ErrorF(" -H");
- if (crtc2->Flags & V_PVSYNC) ErrorF(" +V");
- if (crtc2->Flags & V_NVSYNC) ErrorF(" -V");
- ErrorF("\n");
- }
-#endif
-
- /* if (crtc1 && (crtc_mask & 1))
- info->Flags = crtc1->Flags;*/
-
- RADEONInitMemMapRegisters(pScrn, save, info);
- RADEONInitCommonRegisters(save, info);
-
- switch(crtc_mask) {
- case 1:
- if (!RADEONInitCrtcRegisters(pScrn, save, crtc1, info))
- return FALSE;
- dot_clock = crtc1->Clock/1000.0;
- if (dot_clock) {
- RADEONInitPLLRegisters(pScrn, info, save, &info->pll, dot_clock);
- } else {
- save->ppll_ref_div = info->SavedReg.ppll_ref_div;
- save->ppll_div_3 = info->SavedReg.ppll_div_3;
- save->htotal_cntl = info->SavedReg.htotal_cntl;
- }
- if (pRADEONEnt->HasSecondary) {
- pScrn0 = pRADEONEnt->pSecondaryScrn;
- info0 = RADEONPTR(pScrn0);
- /* carry over to secondary screen */
- memcpy(&info0->ModeReg, save, sizeof(RADEONSaveRec));
- }
-
- /* Not used for now: */
- /* if (!info->PaletteSavedOnVT) RADEONInitPalette(save); */
- break;
- case 2:
- if (pRADEONEnt->HasSecondary) {
- pScrn0 = pRADEONEnt->pPrimaryScrn;
- info0 = RADEONPTR(pScrn0);
- } else {
- pScrn0 = pScrn;
- info0 = info;
- }
- dot_clock = crtc2->Clock/1000.0;
- if (!RADEONInitCrtc2Registers(pScrn, save, crtc2, info))
- return FALSE;
- RADEONInitPLL2Registers(pScrn, save, &info->pll, dot_clock, montype != MT_CRT);
- /* Make sure primary has the same copy */
- if (pRADEONEnt->HasSecondary)
- memcpy(&info0->ModeReg, save, sizeof(RADEONSaveRec));
- break;
- case 3:
- if (!RADEONInitCrtcRegisters(pScrn, save,
- crtc1, info))
- return FALSE;
- dot_clock = crtc1->Clock / 1000.0;
- if (dot_clock) {
- RADEONInitPLLRegisters(pScrn, info, save, &info->pll, dot_clock);
- } else {
- save->ppll_ref_div = info->SavedReg.ppll_ref_div;
- save->ppll_div_3 = info->SavedReg.ppll_div_3;
- save->htotal_cntl = info->SavedReg.htotal_cntl;
- }
- RADEONInitCrtc2Registers(pScrn, save, crtc2, info);
- dot_clock = crtc2->Clock / 1000.0;
- RADEONInitPLL2Registers(pScrn, save, &info->pll, dot_clock, montype != MT_CRT);
- break;
- default:
- return FALSE;
- }
-
- RADEONTRACE(("RADEONInit2 %d returns %p\n", crtc_mask, save));
- return TRUE;
-}
-
-static Bool RADEONInit(ScrnInfoPtr pScrn, DisplayModePtr mode,
- RADEONSavePtr save)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
-
- if (info->IsSecondary) {
- return RADEONInit2(pScrn, NULL, mode, 2, save, 0);
- } else {
- return RADEONInit2(pScrn, mode, NULL, 1, save, 0);
- }
-}
-
-/* Initialize a new mode */
-static Bool RADEONModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
-
- RADEONTRACE(("RADEONModeInit()\n"));
-
- if (!RADEONInit(pScrn, mode, &info->ModeReg)) return FALSE;
-
- pScrn->vtSema = TRUE;
- RADEONBlank(pScrn);
- RADEONRestoreMode(pScrn, &info->ModeReg);
- RADEONUnblank(pScrn);
-
- info->CurrentLayout.mode = mode;
-
- if (info->DispPriority)
- RADEONInitDispBandwidth(pScrn);
-
- return TRUE;
-}
-#endif
-
static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
@@ -6588,9 +6415,6 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
}
}
-#if 0
- if (!RADEONModeInit(pScrn, pScrn->currentMode)) return FALSE;
-#endif
if (!info->IsSecondary)
RADEONRestoreSurfaces(pScrn, &info->ModeReg);
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index 3e18b05..2bb5b27 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -126,10 +126,6 @@ typedef struct _RADEONCrtcPrivateRec {
int binding;
/* Lookup table values to be set when the CRTC is enabled */
CARD8 lut_r[256], lut_g[256], lut_b[256];
- int RefDivider;
- int FeedbackDivider;
- int PostDivider;
- Bool UseBiosDividers;
} RADEONCrtcPrivateRec, *RADEONCrtcPrivatePtr;
typedef struct {