From de17d36c1f710305870e3c636cae3f742f1cb6d6 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 30 Apr 2009 19:13:09 -0400 Subject: AVIVO: first pass at display watermark setup This helps with flickering and blanking when there is contention for MC bandwidth. --- src/radeon_output.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/radeon_output.c') 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) -- cgit v1.2.3