summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-10-29 16:56:45 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-10-29 16:56:45 -0400
commit2a7b080727f61559cf8444c93a5088f4155a8fdf (patch)
treef5fd212fad4fd69049d2495a8502ffdbc6acd636 /src
parentbf60af579382a0d48f7a65a4cec88759cc8b683c (diff)
radeon/kms: more alignment fixes
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index adc7ba76..050dadd5 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -263,10 +263,21 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
int fb_id;
drmModeModeInfo kmode;
int pitch = pScrn->displayWidth * info->CurrentLayout.pixel_bytes;
+ uint32_t tiling_flags = 0;
+ int height;
+
+ /* no tiled scanout on r6xx+ yet */
+ if (info->allowColorTiling) {
+ if (info->ChipFamily < CHIP_FAMILY_R600)
+ tiling_flags |= RADEON_TILING_MACRO;
+ }
+
+ pitch = RADEON_ALIGN(pitch, drmmode_get_pitch_align(pScrn, info->CurrentLayout.pixel_bytes, tiling_flags));
+ height = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags));
if (drmmode->fb_id == 0) {
ret = drmModeAddFB(drmmode->fd,
- pScrn->virtualX, pScrn->virtualY,
+ pScrn->virtualX, height,
pScrn->depth, pScrn->bitsPerPixel,
pitch,
info->front_bo->handle,