diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2013-04-22 08:20:39 +0300 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2013-05-03 09:38:41 +0300 |
commit | df57ea903b701669b315a48311c1535f64f5d37a (patch) | |
tree | 418a913a9393066ae0b68fa3fff5513c8728a5ec /gralloc_drm_intel.c | |
parent | 0bf69ed26eaffe5bbf58b9548063144c96e8ac64 (diff) | |
download | external_drm_gralloc-df57ea903b701669b315a48311c1535f64f5d37a.zip external_drm_gralloc-df57ea903b701669b315a48311c1535f64f5d37a.tar.gz external_drm_gralloc-df57ea903b701669b315a48311c1535f64f5d37a.tar.bz2 |
gralloc: cleanup, use ALIGN macro
Change-Id: I029aafe5a99393a4c0f7ff87f422317621fada12
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'gralloc_drm_intel.c')
-rw-r--r-- | gralloc_drm_intel.c | 6 |
1 files changed, 3 insertions, 3 deletions
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"; |