diff options
author | Dave Airlie <airlied@redhat.com> | 2008-03-06 20:17:45 -0500 |
---|---|---|
committer | Alex Deucher <alex@cube.(none)> | 2008-03-06 20:17:45 -0500 |
commit | c3a3635865e380c784a226c8ead069d4716d6b75 (patch) | |
tree | 12537f190ca33621cb6cebb409f87d5862664c72 /src/atombios_crtc.c | |
parent | df1b94dc4eb1f35b636dbf2ec0ab1c2da9937c0d (diff) |
RADEON: fix tiling/interlaced interaction with randr 1.2
Diffstat (limited to 'src/atombios_crtc.c')
-rw-r--r-- | src/atombios_crtc.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c index a4703c5b..ad7fd54e 100644 --- a/src/atombios_crtc.c +++ b/src/atombios_crtc.c @@ -330,22 +330,13 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc, int need_tv_timings = 0; int i, ret; SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION crtc_timing; + Bool tilingChanged = FALSE; memset(&crtc_timing, 0, sizeof(crtc_timing)); if (info->allowColorTiling) { - info->tilingEnabled = (adjusted_mode->Flags & (V_DBLSCAN | V_INTERLACE)) ? FALSE : TRUE; -#ifdef XF86DRI - if (info->directRenderingEnabled && (info->tilingEnabled != tilingOld)) { - RADEONSAREAPrivPtr pSAREAPriv; - if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_SWITCH_TILING, (info->tilingEnabled ? 1 : 0)) < 0) - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "[drm] failed changing tiling status\n"); - /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ - pSAREAPriv = DRIGetSAREAPrivate(screenInfo.screens[pScrn->scrnIndex]); - info->tilingEnabled = pSAREAPriv->tiling_enabled ? TRUE : FALSE; - } -#endif + radeon_crtc->can_tile = (adjusted_mode->Flags & (V_DBLSCAN | V_INTERLACE)) ? FALSE : TRUE; + tilingChanged = RADEONSetTiling(pScrn); } for (i = 0; i < xf86_config->num_output; i++) { @@ -487,7 +478,7 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc, atombios_set_crtc_timing(info->atomBIOS, &crtc_timing); - if (info->tilingEnabled != tilingOld) { + if (tilingChanged) { /* need to redraw front buffer, I guess this can be considered a hack ? */ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ if (pScrn->pScreen) |