OSDN Git Service

minigbm: i915: fix planar height alignment
authorDavid Stevens <stevensd@chromium.org>
Wed, 25 Sep 2019 02:17:48 +0000 (11:17 +0900)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 10 Oct 2019 23:38:03 +0000 (16:38 -0700)
Aligned planar height should be calculated from the planar height, not
the buffer height.

BUG=b:133292033
TEST=ArcVideoTest renders video correctly (w/a few other changes)

Change-Id: I1dc35ab4eebf9a5a86b2a9befaeb817a56dcfec2
Reviewed-on: https://chromium-review.googlesource.com/1824304
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
i915.c

diff --git a/i915.c b/i915.c
index 1a51aa4..ec0d8fd 100644 (file)
--- a/i915.c
+++ b/i915.c
@@ -256,7 +256,7 @@ static int i915_align_dimensions(struct bo *bo, uint32_t tiling, uint32_t *strid
                break;
        }
 
-       *aligned_height = ALIGN(bo->meta.height, vertical_alignment);
+       *aligned_height = ALIGN(*aligned_height, vertical_alignment);
        if (i915->gen > 3) {
                *stride = ALIGN(*stride, horizontal_alignment);
        } else {