OSDN Git Service

Revert "minigbm: i915: Add necessary padding to Android YV12 buffers"
authorKristian H. Kristensen <hoegsberg@chromium.org>
Thu, 3 May 2018 20:40:47 +0000 (20:40 +0000)
committerchrome-bot <chrome-bot@chromium.org>
Sat, 5 May 2018 03:37:22 +0000 (20:37 -0700)
commit90b14587a4b2f68f79c26d46b1166150082602d1
treedfebdc3ba44636f46833b6f0a7a1dee34a225453
parentbb1f4ddbeca02a3aabf4f5672a8b4b9a21978dc7
Revert "minigbm: i915: Add necessary padding to Android YV12 buffers"

This reverts commit d846de667cba72121ec579912d0854729f013731.

When mesa switched to isl internally, dma-buf import regressed in a
few cases where isl was overly strict.  One issue was enforcing slice
alignment in calculating the minimum size of a buffer.  The alignment
is required for the slice placement, but not the size.  We worked
around it in commit d846de667cba72121ec579912d0854729f013731, but mesa
commit 4d27c6095e8385cccd225993452baad4d2e35420 fixes the problem and
we can now revert the minigbm bandaid.

The revert leaves the change to drv_bo_from_format() in place where it
was modified to look at the passed in format argument instead of
bo->format.

Original change's description:
> minigbm: i915: Add necessary padding to Android YV12 buffers
>
> All the regular formats are already aligned by current code, except
> Android YV12, which requires height of planes to be unchanged. However
> Mesa requires each plane to have at least certain required padding
> between planes. Work around this by calculating total BO size with
> aligned height to allow padding space to overlap with further planes
> and making sure that padding of last plane fits in the buffer. This is
> okay, since Mesa requirement seems to indicate that data of the padding
> area should not be affected and padding is only needed to satisfy GPU
> cache requests.
>
> Fixes following CTS tests on Intel platforms:
> android.media.cts.VideoEncoderTest#testGoogH264FlexArbitraryH
> android.media.cts.VideoEncoderTest#testGoogH264FlexNearMaxMin
> android.media.cts.VideoEncoderTest#testGoogH264SurfArbitraryH
> android.media.cts.VideoEncoderTest#testGoogH264SurfNearMaxMin
>
> BUG=b:63957026
> TEST=./cts-tradefed run cts -m CtsMediaTestCases -t
>  android.media.cts.VideoEncoderTest
>
> Change-Id: I46d44178ba983c0038b630b13b9b281251393f8f
> Reviewed-on: https://chromium-review.googlesource.com/592990
> Commit-Ready: Tomasz Figa <tfiga@chromium.org>
> Tested-by: Tomasz Figa <tfiga@chromium.org>
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

Bug: b:63957026
Change-Id: I9a0db4f01a7ec206375f8a0ba5219b5c5d9a4c0e
Reviewed-on: https://chromium-review.googlesource.com/1042746
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
i915.c