fixes for proper stride for tiled buffers
[glsdk/omapdrmtest.git] / util / display-kms.c
index 35e9a3d43c1afe69281ec98889d77cd074a999b9..f64aef0c407c3cc6b941ed5a584aeeb9f79f4152 100644 (file)
@@ -93,6 +93,8 @@ alloc_bo(struct display *disp, uint32_t bpp, uint32_t width, uint32_t height,
        if (bo) {
                *bo_handle = omap_bo_handle(bo);
                *pitch = width * bpp / 8;
+               if (bo_flags & OMAP_BO_TILED)
+                       *pitch = ALIGN2(*pitch, PAGE_SHIFT);
        }
 
        return bo;