diff options
author | Matt Turner <mattst88@gmail.com> | 2010-02-24 22:46:28 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-02-26 14:50:53 -0500 |
commit | 2de0af5f5b806f9dbfdb1e9b6a5cf96d9433961d (patch) | |
tree | fe9f889c37439107cebac209847ec833540beafa /src/drmmode_display.c | |
parent | c7e81d2f3a372e0d5f751dd0c5091aec2b56d936 (diff) |
Use RADEON_ALIGN instead of open coding it.
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results
for odd x. Though this shouldn't happen, it's still not right. You
wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it
expands to).
CC: Jerome Glisse <jglisse@redhat.com>
CC: Alex Deucher <alexdeucher@gmail.com>
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7fd57252..253ec1e9 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -425,7 +425,7 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) int ret; unsigned long rotate_pitch; - width = RADEON_ALIGN(width, 63); + width = RADEON_ALIGN(width, 64); rotate_pitch = width * drmmode->cpp; size = rotate_pitch * height; @@ -460,7 +460,7 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) if (!data) data = drmmode_crtc_shadow_allocate (crtc, width, height); - rotate_pitch = RADEON_ALIGN(width, 63) * drmmode->cpp; + rotate_pitch = RADEON_ALIGN(width, 64) * drmmode->cpp; rotate_pixmap = drmmode_create_bo_pixmap(pScrn->pScreen, width, height, @@ -1048,7 +1048,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) if (front_bo) radeon_bo_wait(front_bo); - pitch = RADEON_ALIGN(width, 63); + pitch = RADEON_ALIGN(width, 64); height = RADEON_ALIGN(height, 16); screen_size = pitch * height * cpp; |