OSDN Git Service

minigbm: cros_gralloc: support GRALLOC_MODULE_API_VERSION_0_3
[android-x86/external-minigbm.git] / i915.c
diff --git a/i915.c b/i915.c
index 903fc9f..c8cd1d5 100644 (file)
--- a/i915.c
+++ b/i915.c
@@ -310,6 +310,16 @@ static int i915_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32
 
        drv_bo_from_format(bo, stride, height, format);
 
+       /*
+        * Quoting Mesa ISL library:
+        *
+        *    - For linear surfaces, additional padding of 64 bytes is required at
+        *      the bottom of the surface. This is in addition to the padding
+        *      required above.
+        */
+       if (bo->tiling == I915_TILING_NONE)
+               bo->total_size += 64;
+
        memset(&gem_create, 0, sizeof(gem_create));
        gem_create.size = bo->total_size;