All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_prime: Aligned pitch to 64 byte for Intel platforms
@ 2021-05-28  4:34 ` Vidya Srinivas
  0 siblings, 0 replies; 15+ messages in thread
From: Vidya Srinivas @ 2021-05-28  4:34 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

For Intel platforms, pitch needs to be 64 byte aligned.
Kernel code vgem_gem_dumb_create which is platform generic code
doesnt do the alignment. This causes frame buffer creation to fail
on Intel platforms where the pitch is not 64 byte aligned.

tests: test run on Intel platforms with panel resolution 1366x768

Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_prime.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 8cb2ca2a9dc3..fdc941fe8100 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -51,6 +51,8 @@ static struct {
 	{ .r = 1.0, .g = 0.0, .b = 0.0, .color = 0xffff0000 },
 };
 
+bool check_platform;
+
 IGT_TEST_DESCRIPTION("Prime tests, focusing on KMS side");
 
 static bool has_prime_import(int fd)
@@ -101,7 +103,7 @@ static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 	scratch->bpp = 32;
 
 	scratch->handle = kmstest_dumb_create(exporter_fd,
-			scratch->width,
+			check_platform? ALIGN(scratch->width, 64): scratch->width,
 			scratch->height,
 			scratch->bpp,
 			&scratch->pitch,
@@ -262,6 +264,7 @@ igt_main
 
 		/* ANY = anything that is not VGEM */
 		first_fd = __drm_open_driver_another(0, DRIVER_ANY | DRIVER_VGEM);
+		check_platform = is_i915_device(first_fd);
 		igt_require(first_fd >= 0);
 
 		second_fd = __drm_open_driver_another(1, DRIVER_ANY | DRIVER_VGEM);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-07-13 17:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  4:34 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_prime: Aligned pitch to 64 byte for Intel platforms Vidya Srinivas
2021-05-28  4:34 ` [igt-dev] " Vidya Srinivas
2021-05-28 14:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-29  0:57 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-31 14:17 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] [RFC] " Ville Syrjälä
2021-05-31 14:17   ` Ville Syrjälä
2021-05-31 14:47   ` [Intel-gfx] " Srinivas, Vidya
2021-05-31 14:47     ` Srinivas, Vidya
2021-06-04 18:54     ` [Intel-gfx] " Mark Yacoub
2021-06-05  5:44       ` Srinivas, Vidya
2021-06-05  5:44         ` Srinivas, Vidya
2021-06-11  7:35     ` [Intel-gfx] " Srinivas, Vidya
2021-06-11  7:35       ` Srinivas, Vidya
2021-06-28 11:08     ` [Intel-gfx] " Surendrakumar Upadhyay, TejaskumarX
2021-07-13 17:14       ` Srinivas, Vidya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.