From df57ea903b701669b315a48311c1535f64f5d37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 22 Apr 2013 08:20:39 +0300 Subject: gralloc: cleanup, use ALIGN macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I029aafe5a99393a4c0f7ff87f422317621fada12 Signed-off-by: Tapani Pälli --- gralloc_drm_intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gralloc_drm_intel.c') diff --git a/gralloc_drm_intel.c b/gralloc_drm_intel.c index 50293b9..645339b 100644 --- a/gralloc_drm_intel.c +++ b/gralloc_drm_intel.c @@ -393,7 +393,7 @@ static drm_intel_bo *alloc_ibo(struct intel_info *info, max_stride /= 2; name = "gralloc-fb"; - aligned_width = (aligned_width + 63) & ~63; + aligned_width = ALIGN(aligned_width, 64); flags = BO_ALLOC_FOR_RENDER; *tiling = I915_TILING_X; @@ -441,8 +441,8 @@ static drm_intel_bo *alloc_ibo(struct intel_info *info, if (handle->usage & GRALLOC_USAGE_HW_TEXTURE) { name = "gralloc-texture"; /* see 2D texture layout of DRI drivers */ - aligned_width = (aligned_width + 3) & ~3; - aligned_height = (aligned_height + 1) & ~1; + aligned_width = ALIGN(aligned_width, 4); + aligned_height = ALIGN(aligned_height, 2); } else { name = "gralloc-buffer"; -- cgit v1.1