From 2de0af5f5b806f9dbfdb1e9b6a5cf96d9433961d Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 24 Feb 2010 22:46:28 -0500 Subject: 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 CC: Alex Deucher CC: Dave Airlie Signed-off-by: Matt Turner --- src/r6xx_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/r6xx_accel.c') diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c index a0695303..3ec9018a 100644 --- a/src/r6xx_accel.c +++ b/src/r6xx_accel.c @@ -254,7 +254,7 @@ set_render_target(ScrnInfoPtr pScrn, drmBufPtr ib, cb_config_t *cb_conf) cb_color_info |= SOURCE_FORMAT_bit; pitch = (cb_conf->w / 8) - 1; - h = (cb_conf->h + 7) & ~7; + h = RADEON_ALIGN(cb_conf->h, 8); slice = ((cb_conf->w * h) / 64) - 1; BEGIN_BATCH(3 + 2); -- cgit v1.2.3