amdgpu: Remove 256 alignment workaround

Tiled buffers do not need 256 alignment, and doing so leads to failing
new sanity checks added in a more recent mesa version [1].

The underlying problem for android (different map-time and allocation-time
strides for tiled buffers) is worked around in another way.

[1] https://chromium.googlesource.com/chromiumos/third_party/mesa/+/f7a4051b836/src/amd/common/ac_surface.c#2791

BUG=b:190028349
TEST=Pass CtsNativeHardwareTestCases on zork and grunt

Change-Id: I72f67f1bc089a27b187024df64280efbd8465217
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2952005
Reviewed-by: Gurchetan Singh <gurchetansingh@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 611f293..66dbc2a 100644
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -507,23 +507,8 @@
 		return -EINVAL;
 
 	if (combo->metadata.tiling == TILE_TYPE_DRI) {
-		bool needs_alignment = false;
-#ifdef __ANDROID__
-		/*
-		 * Currently, the gralloc API doesn't differentiate between allocation time and map
-		 * time strides. A workaround for amdgpu DRI buffers is to always to align to 256 at
-		 * allocation time.
-		 *
-		 * See b/115946221,b/117942643
-		 */
-		if (use_flags & (BO_USE_SW_MASK))
-			needs_alignment = true;
-#endif
 		// See b/122049612
-		if (use_flags & (BO_USE_SCANOUT) && priv->dev_info.family == AMDGPU_FAMILY_CZ)
-			needs_alignment = true;
-
-		if (needs_alignment) {
+		if (use_flags & (BO_USE_SCANOUT) && priv->dev_info.family == AMDGPU_FAMILY_CZ) {
 			uint32_t bytes_per_pixel = drv_bytes_per_pixel_from_format(format, 0);
 			width = ALIGN(width, 256 / bytes_per_pixel);
 		}