i965/drm: Use ALIGN, not ROUND_UP_TO.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 22 Mar 2017 18:12:27 +0000 (11:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Apr 2017 21:31:23 +0000 (14:31 -0700)
ROUND_UP_TO handles a NPOT alignment, but all the alignments we use
are power of two anyway, so there's no need.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_bufmgr_gem.c

index 3b9272b32bae18ca3fb53729346383ccaa0ca181..d2bc3ed66cb3d58a10dddcfc8d2af70694aee3c1 100644 (file)
@@ -319,7 +319,7 @@ drm_bacon_gem_bo_tile_size(drm_bacon_bufmgr_gem *bufmgr_gem, unsigned long size,
                return size;
 
        /* 965+ just need multiples of page size for tiling */
-       return ROUND_UP_TO(size, 4096);
+       return ALIGN(size, 4096);
 }
 
 /*
@@ -345,7 +345,7 @@ drm_bacon_gem_bo_tile_pitch(drm_bacon_bufmgr_gem *bufmgr_gem,
                tile_width = 128;
 
        /* 965 is flexible */
-       return ROUND_UP_TO(pitch, tile_width);
+       return ALIGN(pitch, tile_width);
 }
 
 static struct drm_bacon_gem_bo_bucket *