diff options
Diffstat (limited to 'gralloc_drm_nouveau.c')
-rw-r--r-- | gralloc_drm_nouveau.c | 8 |
1 files changed, 6 insertions, 2 deletions
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", |