summaryrefslogtreecommitdiff
path: root/src/radeon_modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_modes.c')
-rw-r--r--src/radeon_modes.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/radeon_modes.c b/src/radeon_modes.c
index ea2c2291..6252ea05 100644
--- a/src/radeon_modes.c
+++ b/src/radeon_modes.c
@@ -95,20 +95,45 @@ static DisplayModePtr RADEONTVModes(xf86OutputPtr output)
static DisplayModePtr RADEONFPNativeMode(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONOutputPrivatePtr radeon_output = output->driver_private;
DisplayModePtr new = NULL;
+ char stmp[32];
if (radeon_output->PanelXRes != 0 &&
radeon_output->PanelYRes != 0 &&
radeon_output->DotClock != 0) {
- /* Add native panel size */
- new = xf86CVTMode(radeon_output->PanelXRes, radeon_output->PanelYRes, 60.0, TRUE, FALSE);
+ if (info->LVDSBiosNativeMode) {
+ new = xnfcalloc(1, sizeof (DisplayModeRec));
+ sprintf(stmp, "%dx%d", radeon_output->PanelXRes, radeon_output->PanelYRes);
+ new->name = xnfalloc(strlen(stmp) + 1);
+ strcpy(new->name, stmp);
+ new->HDisplay = radeon_output->PanelXRes;
+ new->VDisplay = radeon_output->PanelYRes;
- new->type = M_T_DRIVER | M_T_PREFERRED;
+ new->HTotal = new->HDisplay + radeon_output->HBlank;
+ new->HSyncStart = new->HDisplay + radeon_output->HOverPlus;
+ new->HSyncEnd = new->HSyncStart + radeon_output->HSyncWidth;
+ new->VTotal = new->VDisplay + radeon_output->VBlank;
+ new->VSyncStart = new->VDisplay + radeon_output->VOverPlus;
+ new->VSyncEnd = new->VSyncStart + radeon_output->VSyncWidth;
- new->next = NULL;
- new->prev = NULL;
+ new->Clock = radeon_output->DotClock;
+ new->Flags = 0;
+
+ } else {
+ /* Add native panel size */
+ new = xf86CVTMode(radeon_output->PanelXRes, radeon_output->PanelYRes, 60.0, FALSE, FALSE);
+
+ }
+
+ if (new) {
+ new->type = M_T_DRIVER | M_T_PREFERRED;
+
+ new->next = NULL;
+ new->prev = NULL;
+ }
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added native panel mode: %dx%d\n",
radeon_output->PanelXRes, radeon_output->PanelYRes);
@@ -159,7 +184,7 @@ static void RADEONAddScreenModes(xf86OutputPtr output, DisplayModePtr *modeList)
}
}
- new = xf86CVTMode(width, height, 60.0, TRUE, FALSE);
+ new = xf86CVTMode(width, height, 60.0, FALSE, FALSE);
new->type |= M_T_USERDEF;