From: Satyajit Sahu Date: Wed, 11 Jul 2018 08:11:56 +0000 (+0530) Subject: minigbm: amdgpu: align the stride to 256 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dc8554f4359dd9e1fbb7ecf75c0d02c509168e0d;p=android-x86%2Fexternal-minigbm.git minigbm: amdgpu: align the stride to 256 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 --- 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);