From b65a3f83ccf8d17cea46fe5af1bc348ad5d4467f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 27 Oct 2011 18:01:23 +0800 Subject: add support for YUV formats --- gralloc_drm_nouveau.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gralloc_drm_nouveau.c') diff --git a/gralloc_drm_nouveau.c b/gralloc_drm_nouveau.c index 8f347a1..a3ef333 100644 --- a/gralloc_drm_nouveau.c +++ b/gralloc_drm_nouveau.c @@ -198,9 +198,13 @@ nouveau_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle } } else { - int pitch; + int width, height, pitch; - nb->bo = alloc_bo(info, handle->width, handle->height, + width = handle->width; + height = handle->height; + gralloc_drm_align_geometry(handle->format, &width, &height); + + nb->bo = alloc_bo(info, width, height, cpp, handle->usage, &pitch); if (!nb->bo) { LOGE("failed to allocate nouveau bo %dx%dx%d", -- cgit v1.1