libva 1.8.3 makes it a hard requirement that multi-planar surfaces are
vertically aligned to 16. Enforce this rule at allocation time.
BUG=b:
65084476
TEST=checked that b:
65084476 was not reproducible with this patch and
that all multi-planar surfaces are aligned to 16.
Change-Id: Id31055df81ba43130f3f45282db104753fb6e700
Reviewed-on: https://chromium-review.googlesource.com/642429
Commit-Ready: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
break;
}
+ /*
+ * For multi-planar formats we must be aligned to 16
+ */
+ if (bo->num_planes > 1)
+ vertical_alignment = MAX(vertical_alignment, 16);
+
*aligned_height = ALIGN(bo->height, vertical_alignment);
if (i915->gen > 3) {
*stride = ALIGN(*stride, horizontal_alignment);