[igt-dev] [i-g-t] tests/kms_prime: Use 256B aligned width

Tejas Upadhyay tejaskumarx.surendrakumar.upadhyay at intel.com
Tue Jul 20 07:16:14 UTC 2021


Having different alignment requirement by different drivers,
256B aligned should work for all drm drivers.

Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay at intel.com>
---
 tests/kms_prime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
-- 
2.31.1



More information about the igt-dev mailing list