OSDN Git Service

mediatek: Allocate a buffer expected by encoder if BO_USE_HW_VIDEO_ENCODER
authorHirokazu Honda <hiroh@chromium.org>
Fri, 11 Oct 2019 06:54:50 +0000 (15:54 +0900)
committerCommit Bot <commit-bot@chromium.org>
Wed, 25 Dec 2019 08:26:11 +0000 (08:26 +0000)
commit2a2bfc25bb4eaf53d6d1d9e1990c6b2888d4d3fb
tree06cbb27386a35fd006b3ab8f41a5f4771f70a59c
parent6e6dc49707737d0578617f89cb01bb585f9b00c3
mediatek: Allocate a buffer expected by encoder if BO_USE_HW_VIDEO_ENCODER

MediaTek driver expects 16 aligned width and 32 aligned height for an input
buffer on encoding [1]. Besides, there is an extra data between planes.
This changes the minigbm allocation to match the expectation though width
is aligned by 64 for the AMD cache-width optimization.

[1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3c551224d8600b956ed53097520501d58f31cf59/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c#278
BUG=b:144135251
TEST=ARC++ encoder on kukui
Change-Id: Id330a8a6b0a40040098920427e6e29f05fcb64d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1855520
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hsu Wei-Cheng <mojahsu@chromium.org>
helpers.c
helpers.h
mediatek.c