From: Vidya Srinivas <vidya.srinivas@intel.com> To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org Cc: markyacoub@chromium.org, charlton.lin@intel.com Subject: [Intel-gfx] [PATCH 2/4] [RFC] tests/kms_prime: Aligned pitch to 64 byte for Intel platforms Date: Thu, 27 May 2021 20:02:26 +0530 [thread overview] Message-ID: <20210527143226.25548-1-vidya.srinivas@intel.com> (raw) 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> Change-Id: Ie8f938b9672127537f433a5674b60e88275cc2c7 --- 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.26.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Vidya Srinivas <vidya.srinivas@intel.com> To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org Cc: charlton.lin@intel.com Subject: [igt-dev] [PATCH 2/4] [RFC] tests/kms_prime: Aligned pitch to 64 byte for Intel platforms Date: Thu, 27 May 2021 20:02:26 +0530 [thread overview] Message-ID: <20210527143226.25548-1-vidya.srinivas@intel.com> (raw) 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> Change-Id: Ie8f938b9672127537f433a5674b60e88275cc2c7 --- 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.26.2 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2021-05-27 14:41 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-27 14:32 Vidya Srinivas [this message] 2021-05-27 14:32 ` [igt-dev] [PATCH 2/4] [RFC] tests/kms_prime: Aligned pitch to 64 byte for Intel platforms Vidya Srinivas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210527143226.25548-1-vidya.srinivas@intel.com \ --to=vidya.srinivas@intel.com \ --cc=charlton.lin@intel.com \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=markyacoub@chromium.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.