Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>, <kamil.konieczny@linux.intel.com>
Cc: markyacoub@google.com
Subject: [igt-dev] [PATCH][V2] tests/kms_universal_plane: Enable sanity_test_pipe for all devices
Date: Tue, 18 Apr 2023 09:19:59 -0600	[thread overview]
Message-ID: <20230418151959.112929-1-alex.hung@amd.com> (raw)

This subtest can run on non-Intel devices.

Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Mark Yacoub <markyacoub@chromium.org>
---
 tests/kms_universal_plane.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 114918d9..b2435b51 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -377,7 +377,7 @@ sanity_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	igt_plane_t *primary;
 	drmModeModeInfo *mode;
 	int i;
-	int expect;
+	int expect = 0;
 
 	igt_require_pipe(&data->display, pipe);
 
@@ -400,9 +400,9 @@ sanity_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	 * doesn't cover CRTC (should fail on pre-gen9 and succeed on
 	 * gen9+).
 	 */
-	igt_require_intel(data->drm_fd);
 	igt_plane_set_fb(primary, &test.undersized_fb);
-	expect = (data->display_ver < 9) ? -EINVAL : 0;
+	if (is_intel_device(data->drm_fd))
+		expect = (data->display_ver < 9) ? -EINVAL : 0;
 	igt_assert(igt_display_try_commit2(&data->display, COMMIT_UNIVERSAL) == expect);
 
 	/* Same as above, but different plane positioning. */
@@ -412,7 +412,8 @@ sanity_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	igt_plane_set_position(primary, 0, 0);
 
 	/* Try to use universal plane API to scale down (should fail on pre-gen9) */
-	expect = (data->display_ver < 9) ? -ERANGE : 0;
+	if (is_intel_device(data->drm_fd))
+		expect = (data->display_ver < 9) ? -ERANGE : 0;
 	igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,
 				   output->config.crtc->crtc_id,
 				   test.oversized_fb.fb_id, 0,
-- 
2.40.0

             reply	other threads:[~2023-04-18 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 15:19 Alex Hung [this message]
2023-04-18 15:56 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_universal_plane: Enable sanity_test_pipe for all devices (rev2) Patchwork
2023-04-18 18:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20230418151959.112929-1-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=markyacoub@google.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox