summaryrefslogtreecommitdiff
path: root/tests/kms_prime.c
diff options
context:
space:
mode:
authorTejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>2021-07-23 15:32:29 +0530
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2021-07-23 12:18:29 +0200
commit34ff2cf2bc352dce691593db803389fe0eb2be03 (patch)
treefa5d47a024fc26a13a391dfb1962cb295672c14b /tests/kms_prime.c
parent784dca328ac03b97da517008103b903eca100170 (diff)
tests/kms_prime: Use 256B aligned width
kms_prime uses vgem driver for fb creation which does not take care of intel's 64B align requirement. As we want to keep vgem driver clean we are doing align requirement in kms_prime test itself. Also having different alignment requirement by different drivers, 256B aligned should work for all drm drivers. amdgpu and radeon, amdgpu_align_pitch: 256B armada, armada_pitch: 128B exynos_drm_gem_dumb_create: No alignment required drm_gem_shmem_dumb_create: 8B drm_gem_vram_fill_create_dumb: 8B Thus 256B covers everything we see in the kernel drm drivers. Changes since V2: - Edited commit message to give more detailed info about patch requirement - zkempczy/Daniel Changes since V1: - Edited commit message with driver compatible with 256B align - Daniel Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/kms_prime.c')
-rw-r--r--tests/kms_prime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 35f4b5b7..2e20c58b 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -101,7 +101,7 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
scratch->bpp = 32;
scratch->handle = kmstest_dumb_create(exporter_fd,
- scratch->width,
+ ALIGN(scratch->width, 256),
scratch->height,
scratch->bpp,
&scratch->pitch,