diff options
author | Matt Turner <mattst88@gmail.com> | 2010-02-24 22:46:27 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-02-26 14:50:15 -0500 |
commit | c7e81d2f3a372e0d5f751dd0c5091aec2b56d936 (patch) | |
tree | c522aedca79e673e29f93a18c4c19f74ae2337bb /src/radeon_driver.c | |
parent | c0a5c9403dff254e1669df606a4193794270aeff (diff) |
Use/define RADEON_GPU_PAGE_SIZE instead of sprinkling 4096 everywhere.
Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some
RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x,
RADEON_GPU_PAGE_SIZE) since this is really what was intended.
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/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index fc01797b..8e852fce 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -4276,8 +4276,8 @@ void RADEONChangeSurfaces(ScrnInfoPtr pScrn) int cpp = info->CurrentLayout.pixel_bytes; /* depth/front/back pitch must be identical (and the same as displayWidth) */ int width_bytes = pScrn->displayWidth * cpp; - int bufferSize = ((((pScrn->virtualY + 15) & ~15) * width_bytes - + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN); + int bufferSize = RADEON_ALIGN(((pScrn->virtualY + 15) & ~15) * width_bytes, + RADEON_GPU_PAGE_SIZE); unsigned int color_pattern, swap_pattern; if (!info->allowColorTiling) @@ -4309,8 +4309,8 @@ void RADEONChangeSurfaces(ScrnInfoPtr pScrn) int retvalue; int depthCpp = (info->dri->depthBits - 8) / 4; int depth_width_bytes = pScrn->displayWidth * depthCpp; - int depthBufferSize = ((((pScrn->virtualY + 15) & ~15) * depth_width_bytes - + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN); + int depthBufferSize = RADEON_ALIGN(((pScrn->virtualY + 15) & ~15) * depth_width_bytes, + RADEON_GPU_PAGE_SIZE); unsigned int depth_pattern; drmsurffree.address = info->dri->frontOffset; |