summaryrefslogtreecommitdiff
path: root/src/radeon_modes.c
diff options
context:
space:
mode:
authorDavid Airlie <airlied@linux.ie>2007-02-02 14:26:29 +1100
committerDave Airlie <airlied@linux.ie>2007-02-02 15:34:28 +1100
commit72ef23ef7dd159d827e8e122482a58928d532268 (patch)
tree2d205e4d94e0d9b0df19a82939ce22413e614304 /src/radeon_modes.c
parent96acf6b2b242454345cc4b9cfc7ca07e0b597b43 (diff)
fixup mode probing a bit neater
Diffstat (limited to 'src/radeon_modes.c')
-rw-r--r--src/radeon_modes.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/radeon_modes.c b/src/radeon_modes.c
index fb7727ec..b88ffb9f 100644
--- a/src/radeon_modes.c
+++ b/src/radeon_modes.c
@@ -261,7 +261,7 @@ int RADEONValidateFPModes(ScrnInfoPtr pScrn, char **ppModeName, DisplayModePtr *
return count;
}
-void
+DisplayModePtr
RADEONProbeOutputModes(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
@@ -272,7 +272,7 @@ RADEONProbeOutputModes(xf86OutputPtr output)
DisplayModePtr mode;
DisplayModePtr test;
xf86MonPtr edid_mon;
- DisplayModePtr modes;
+ DisplayModePtr modes = NULL;
/* force reprobe */
radeon_output->MonType = MT_UNKNOWN;
@@ -283,8 +283,8 @@ RADEONProbeOutputModes(xf86OutputPtr output)
edid_mon = xf86OutputGetEDID (output, radeon_output->pI2CBus);
xf86OutputSetEDID (output, edid_mon);
- output->probed_modes = xf86OutputGetEDIDModes (output);
- return;
+ modes = xf86OutputGetEDIDModes (output);
+ return modes;
}
if (radeon_output->type == OUTPUT_LVDS) {
/* okay we got DDC info */
@@ -307,20 +307,20 @@ RADEONProbeOutputModes(xf86OutputPtr output)
}
- if (output->probed_modes == NULL) {
+ if (modes == NULL) {
MonRec fixed_mon;
DisplayModePtr modes;
- RADEONValidateFPModes(pScrn, pScrn->display->modes, &output->probed_modes);
+ RADEONValidateFPModes(pScrn, pScrn->display->modes, &modes);
}
}
- if (output->probed_modes) {
- xf86ValidateModesUserConfig(pScrn,
- output->probed_modes);
- xf86PruneInvalidModes(pScrn, &output->probed_modes,
+ if (modes) {
+ xf86ValidateModesUserConfig(pScrn, modes);
+ xf86PruneInvalidModes(pScrn, &modes,
FALSE);
}
+ return modes;
}