From dc8554f4359dd9e1fbb7ecf75c0d02c509168e0d Mon Sep 17 00:00:00 2001 From: Satyajit Sahu Date: Wed, 11 Jul 2018 13:41:56 +0530 Subject: [PATCH] minigbm: amdgpu: align the stride to 256 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit amdgpu has a requirement of stride to be aligned to 256. Otherwise gpu faults and corruptions are observed for some resolutions. BUG=b:80148696 b:110472790 TEST=graphics autotest suite Change-Id: Ic13c19cd1641a6ce206de9b1016a242ed21c2631 Signed-off-by: Satyajit Sahu Reviewed-on: https://chromium-review.googlesource.com/1133060 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Deepak Sharma Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Stéphane Marchesin Reviewed-by: Deepak Sharma Reviewed-by: Gurchetan Singh --- amdgpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/amdgpu.c b/amdgpu.c index 932d1a8..eea1232 100644 --- a/amdgpu.c +++ b/amdgpu.c @@ -145,10 +145,7 @@ static int amdgpu_create_bo(struct bo *bo, uint32_t width, uint32_t height, uint return dri_bo_create(bo, width, height, format, use_flags); stride = drv_stride_from_format(format, width, 0); - if (format == DRM_FORMAT_YVU420_ANDROID) - stride = ALIGN(stride, 128); - else - stride = ALIGN(stride, 64); + stride = ALIGN(stride,256); drv_bo_from_format(bo, stride, height, format); -- 2.11.0