summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-11 14:42:17 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-01-11 14:42:17 -0500
commitaf2e6d7d2f1b3d8f8f6b0acfb2b7b0cfaff7bcdb (patch)
tree55d573e7e31803a8c1a1d41669caa3e04f588c50 /src/drmmode_display.c
parente5d0a400d08da2358fac9c2ad12042f125525736 (diff)
radeon: fix pitch align in pageflip code
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9248cb0e..55e76ffd 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1604,7 +1604,7 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *dat
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
drmmode_crtc_private_ptr drmmode_crtc = config->crtc[0]->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
- unsigned int pitch = scrn->displayWidth * info->CurrentLayout.pixel_bytes;
+ unsigned int pitch;
int i, old_fb_id;
uint32_t tiling_flags = 0;
int height;
@@ -1617,7 +1617,8 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *dat
tiling_flags |= RADEON_TILING_MACRO;
}
- pitch = RADEON_ALIGN(pitch, drmmode_get_pitch_align(scrn, info->CurrentLayout.pixel_bytes, tiling_flags));
+ pitch = RADEON_ALIGN(scrn->displayWidth, drmmode_get_pitch_align(scrn, info->CurrentLayout.pixel_bytes, tiling_flags)) *
+ info->CurrentLayout.pixel_bytes;
height = RADEON_ALIGN(scrn->virtualY, drmmode_get_height_align(scrn, tiling_flags));
/*