OSDN Git Service

minigbm: amdgpu: align the stride to 256
authorSatyajit Sahu <satyajit.sahu@amd.com>
Wed, 11 Jul 2018 08:11:56 +0000 (13:41 +0530)
committerMauro Rossi <issor.oruam@gmail.com>
Sun, 26 Jan 2020 21:38:56 +0000 (22:38 +0100)
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 <satyajit.sahu@amd.com>
Reviewed-on: https://chromium-review.googlesource.com/1133060
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Deepak Sharma <deepak.sharma@amd.com>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Deepak Sharma <deepak.sharma@amd.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
amdgpu.c

index d44d6d9..5679920 100644 (file)
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -144,10 +144,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);
                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);
 
 
        drv_bo_from_format(bo, stride, height, format);