diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-04-30 19:13:09 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-04-30 19:13:09 -0400 |
commit | de17d36c1f710305870e3c636cae3f742f1cb6d6 (patch) | |
tree | 7c2dda67182fb61eacd80a09db9e7348079d84f8 /src/radeon_output.c | |
parent | 7d9f643ae3d07e51e644a5979ca90bc2c102bc89 (diff) |
AVIVO: first pass at display watermark setup
This helps with flickering and blanking when
there is contention for MC bandwidth.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 67d94feb..634fd65c 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -430,8 +430,11 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, RADEONInfoPtr info = RADEONPTR(output->scrn); RADEONOutputPrivatePtr radeon_output = output->driver_private; radeon_native_mode_ptr native_mode = &radeon_output->native_mode; + xf86CrtcPtr crtc = output->crtc; + RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; radeon_output->Flags &= ~RADEON_USE_RMX; + radeon_crtc->scaler_enabled = FALSE; /* * Refresh the Crtc values without INTERLACE_HALVE_V @@ -442,14 +445,15 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, /* decide if we are using RMX */ if ((radeon_output->active_device & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) && radeon_output->rmx_type != RMX_OFF) { - xf86CrtcPtr crtc = output->crtc; - RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; if (IS_AVIVO_VARIANT || radeon_crtc->crtc_id == 0) { if (mode->HDisplay < native_mode->PanelXRes || mode->VDisplay < native_mode->PanelYRes) { radeon_output->Flags |= RADEON_USE_RMX; + radeon_crtc->scaler_enabled = TRUE; if (IS_AVIVO_VARIANT) { + radeon_crtc->hsc = (float)mode->HDisplay / (float)native_mode->PanelXRes; + radeon_crtc->vsc = (float)mode->VDisplay / (float)native_mode->PanelYRes; /* set to the panel's native mode */ adjusted_mode->HDisplay = native_mode->PanelXRes; adjusted_mode->VDisplay = native_mode->PanelYRes; @@ -495,6 +499,13 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, } } + /* FIXME: vsc/hsc */ + if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) { + radeon_crtc->scaler_enabled = TRUE; + radeon_crtc->hsc = (float)mode->HDisplay / (float)640; + radeon_crtc->vsc = (float)mode->VDisplay / (float)480; + } + if (IS_AVIVO_VARIANT) { /* hw bug */ if ((mode->Flags & V_INTERLACE) |