amdgpu: Only align video BOs to 512 for Android
crrev/c/3633249 compares libva and minigbm allocated Surfaces/BOs for accelerated video decoding. Currently it fails on e.g. zork because libva (mesa-amd backend) aligns those buffers to 256, whereas minigbm aligns them to 512. This CL reduces the 512-align provision in amdgpu to Android-originated buffers, where IIUC from the bug there is such restriction. BUG=b:200680176 BUG=b:171013552 TEST=vaapi_unittest on zork w/ crrev/c/3633249 Change-Id: I703037c70dded8596408c475518a29de3b59f039 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3647157 Tested-by: Miguel Casas-Sanchez <mcasas@chromium.org> Reviewed-by: Drew Davenport <ddavenport@chromium.org> Commit-Queue: Miguel Casas-Sanchez <mcasas@chromium.org>
This commit is contained in:
parent
365e5b4a9e
commit
26960909ad
1 changed files with 3 additions and 3 deletions
6
amdgpu.c
6
amdgpu.c
|
|
@ -517,10 +517,10 @@ static int amdgpu_create_bo_linear(struct bo *bo, uint32_t width, uint32_t heigh
|
|||
* aligned. This uses more memory than necessary since the first plane only needs to be
|
||||
* 256 aligned, but it's acceptable for a short-term fix. It's probably safe for other gpu
|
||||
* families, but let's restrict it to Raven and Stoney for now (b/171013552, b/190484589).
|
||||
* This only applies to the Android YUV (multiplane) format.
|
||||
* */
|
||||
if (num_planes > 1 &&
|
||||
(priv->dev_info.family == AMDGPU_FAMILY_RV ||
|
||||
(priv->dev_info.family == AMDGPU_FAMILY_CZ && !(use_flags & BO_USE_HW_VIDEO_ENCODER))))
|
||||
if (format == DRM_FORMAT_YVU420_ANDROID &&
|
||||
(priv->dev_info.family == AMDGPU_FAMILY_RV || priv->dev_info.family == AMDGPU_FAMILY_CZ))
|
||||
stride = ALIGN(stride, 512);
|
||||
else
|
||||
stride = ALIGN(stride, 256);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue