minigbm: Align stride to 512 for multiplane formats
This was restricted to Raven. Modify that restriction so that this
happens for Stoney as well. It seems that Stoney is also affected by
this same issue, but it just didn't cause any CTS or other errors until
the mesa-amd uprev added some additional correctness checks.
TEST=android.media.cts.EncodeDecodeTest passes on grunt
BUG=b:190484589
Change-Id: Ieebbffb0d711d08c24c071e79c0b3224663c8369
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3060894
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>
diff --git a/amdgpu.c b/amdgpu.c
index 66dbc2a..cf2797e 100644
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -443,9 +443,9 @@
* For multiplane formats, align the stride to 512 to ensure that subsample strides are 256
* 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 for now (b/171013552).
+ * families, but let's restrict it to Raven and Stoney for now (b/171013552, b/190484589).
* */
- if (priv->dev_info.family == AMDGPU_FAMILY_RV && num_planes > 1)
+ if (priv->dev_info.family <= AMDGPU_FAMILY_RV && num_planes > 1)
stride = ALIGN(stride, 512);
else
stride = ALIGN(stride, 256);