Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-minigbm: 提交

external/minigbm


Commit MetaInfo

修订版8b68e2a1121c2075cf72ce2da02cd82bd39d14a7 (tree)
时间2020-01-27 06:48:04
作者Satyajit Sahu <satyajit.sahu@amd....>
CommiterMauro Rossi

Log Message

minigbm:amdgpu: align stride to 256

Previously stride was alinged to 256 only in linear path and
android. Now it is aligned to 256 for all cases.

BUG=b:122049612
TEST=suspend_stress_test

Change-Id: I757f2d056176fe5ebfd858a017273cf02bad6020
Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-on: https://chromium-review.googlesource.com/1457777
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

更改概述

差异

--- a/amdgpu.c
+++ b/amdgpu.c
@@ -140,6 +140,7 @@ static int amdgpu_create_bo(struct bo *bo, uint32_t width, uint32_t height, uint
140140 return -EINVAL;
141141
142142 if (combo->metadata.tiling == TILE_TYPE_DRI) {
143+ bool needs_alignment = false;
143144 #ifdef __ANDROID__
144145 /*
145146 * Currently, the gralloc API doesn't differentiate between allocation time and map
@@ -148,11 +149,18 @@ static int amdgpu_create_bo(struct bo *bo, uint32_t width, uint32_t height, uint
148149 *
149150 * See b/115946221,b/117942643
150151 */
151- if (use_flags & (BO_USE_SW_MASK)) {
152+ if (use_flags & (BO_USE_SW_MASK))
153+ needs_alignment = true;
154+#endif
155+ // See b/122049612
156+ if (use_flags & (BO_USE_SCANOUT))
157+ needs_alignment = true;
158+
159+ if (needs_alignment) {
152160 uint32_t bytes_per_pixel = drv_bytes_per_pixel_from_format(format, 0);
153161 width = ALIGN(width, 256 / bytes_per_pixel);
154162 }
155-#endif
163+
156164 return dri_bo_create(bo, width, height, format, use_flags);
157165 }
158166
Show on old repository browser