diff options
author | Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> | 2007-05-09 14:52:00 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> | 2007-05-09 14:52:00 -0700 |
commit | 6263248a0044777a352e4ee7380b4b8f9afd091b (patch) | |
tree | 6dcc6b4d3b11dd5451a8b57e463c39b4cb3dee9b | |
parent | d2497009e395800fbde5777465f3087a54b94418 (diff) |
RADEON:
- use fixup_mode hook to set RADEON_USE_RMX flag so panel scaling
works
- use valid_mode hook to prune invalid default modes from list
- use adjusted_mode in crtc_mode_set (using adjusted_mode from
fixup hook)
-rw-r--r-- | src/radeon_display.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c index 10392093..9a3a87fb 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -2288,10 +2288,10 @@ radeon_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, switch (radeon_crtc->crtc_id) { case 0: - RADEONInit2(pScrn, mode, NULL, 1, &info->ModeReg, montype); + RADEONInit2(pScrn, adjusted_mode, NULL, 1, &info->ModeReg, montype); break; case 1: - RADEONInit2(pScrn, NULL, mode, 2, &info->ModeReg, montype); + RADEONInit2(pScrn, NULL, adjusted_mode, 2, &info->ModeReg, montype); break; } @@ -2430,6 +2430,18 @@ radeon_restore(xf86OutputPtr restore) static int radeon_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) { + ScrnInfoPtr pScrn = output->scrn; + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONOutputPrivatePtr radeon_output = output->driver_private; + DisplayModePtr m; + + if (radeon_output->type != OUTPUT_LVDS) + return MODE_OK; + + if (pMode->HDisplay > info->PanelXRes || + pMode->VDisplay > info->PanelYRes) + return MODE_PANEL; + return MODE_OK; } @@ -2437,8 +2449,18 @@ static Bool radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode) { - return TRUE; + ScrnInfoPtr pScrn = output->scrn; + RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONOutputPrivatePtr radeon_output = output->driver_private; + + if (radeon_output->type != OUTPUT_LVDS) + return TRUE; + + if (mode->HDisplay < info->PanelXRes || + mode->VDisplay < info->PanelYRes) + adjusted_mode->Flags |= RADEON_USE_RMX; + return TRUE; } static void |