diff options
author | Dave Airlie <airlied@linux.ie> | 2007-12-21 09:36:22 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-12-21 09:36:22 +1000 |
commit | 3c31b96afa20913ad947e68fe0c3a662e5eafbdd (patch) | |
tree | 1db77a5ca5bc88876b3f21d35d3ddce3cff0f900 /src/radeon_modes.c | |
parent | eb99c3c5c9a2249cb84920f0f225e525fc3a4144 (diff) | |
parent | f5e8c185001e62e744310667c2d1bd3fe6542a62 (diff) |
Merge remote branch 'origin/atombios-support'
Conflicts:
src/radeon_display.c
src/radeon_driver.c
Diffstat (limited to 'src/radeon_modes.c')
-rw-r--r-- | src/radeon_modes.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/radeon_modes.c b/src/radeon_modes.c index 3c4badd1..c9e99b8e 100644 --- a/src/radeon_modes.c +++ b/src/radeon_modes.c @@ -59,20 +59,22 @@ void RADEONSetPitch (ScrnInfoPtr pScrn) { int dummy = pScrn->virtualX; RADEONInfoPtr info = RADEONPTR(pScrn); + int pitch_mask = 0; + int align_large; + + align_large = info->allowColorTiling || IS_AVIVO_VARIANT; /* FIXME: May need to validate line pitch here */ switch (pScrn->depth / 8) { - case 1: if (info->allowColorTiling) dummy = (pScrn->virtualX + 255) & ~255; - else dummy = (pScrn->virtualX + 127) & ~127; + case 1: pitch_mask = align_large ? 255 : 127; break; - case 2: if (info->allowColorTiling) dummy = (pScrn->virtualX + 127) & ~127; - else dummy = (pScrn->virtualX + 31) & ~31; + case 2: pitch_mask = align_large ? 127 : 31; break; case 3: - case 4: if (info->allowColorTiling) dummy = (pScrn->virtualX + 63) & ~63; - else dummy = (pScrn->virtualX + 15) & ~15; + case 4: pitch_mask = align_large ? 63 : 15; break; } + dummy = (pScrn->virtualX + pitch_mask) & ~pitch_mask; pScrn->displayWidth = dummy; info->CurrentLayout.displayWidth = pScrn->displayWidth; @@ -214,7 +216,7 @@ RADEONProbeOutputModes(xf86OutputPtr output) ErrorF("in RADEONProbeOutputModes\n"); if (output->status == XF86OutputStatusConnected) { - if (radeon_output->type == OUTPUT_STV || radeon_output->type == OUTPUT_CTV) { + if (OUTPUT_IS_TV) { modes = RADEONTVModes(output); } else { if (output->MonInfo) |