public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: markyacoub@google.com
Subject: [igt-dev] [PATCH 2/2][V4] tests/kms_universal_plane: Skip offscreen test for universal API
Date: Sat, 3 Sep 2022 11:48:03 -0600	[thread overview]
Message-ID: <20220903174803.2937836-2-alex.hung@amd.com> (raw)
In-Reply-To: <20220903174803.2937836-1-alex.hung@amd.com>

amdgpu driver intentionally rejects plane outside of the screen and thus
this test is skipped on AMD HW. See more details in kernel commits
40d916a2602c and 4abdb72bd8576 which are summarized as below:

"Reject this condition (too small viewport size) at validation time.
This gives the calling level a chance to handle this gracefully and
avoid inconsistent behaviors."

Signed-off-by: Alex Hung <alex.hung@amd.com>
---
 tests/kms_universal_plane.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 9eab1a57..432f56ba 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -241,17 +241,22 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 	igt_plane_set_fb(sprite, &test.red_fb);
 	igt_display_commit2(display, COMMIT_LEGACY);
 
-	/* Step 14: Universal API, set primary completely offscreen (CRC 9) */
-	igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,
-				   output->config.crtc->crtc_id,
-				   test.blue_fb.fb_id, 0,
-				   9000, 9000,
-				   test.mode->hdisplay,
-				   test.mode->vdisplay,
-				   IGT_FIXED(0,0), IGT_FIXED(0,0),
-				   IGT_FIXED(test.mode->hdisplay,0),
-				   IGT_FIXED(test.mode->vdisplay,0)) == 0);
-	igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);
+	/*
+	 * Step 14: Universal API, set primary completely offscreen (CRC 9).
+	 * Skip on amdgpu which rejects offscreen planes.
+	 */
+	if (!is_amdgpu_device(data->drm_fd)) {
+		igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,
+					   output->config.crtc->crtc_id,
+					   test.blue_fb.fb_id, 0,
+					   9000, 9000,
+					   test.mode->hdisplay,
+					   test.mode->vdisplay,
+					   IGT_FIXED(0,0), IGT_FIXED(0,0),
+					   IGT_FIXED(test.mode->hdisplay,0),
+					   IGT_FIXED(test.mode->vdisplay,0)) == 0);
+		igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);
+	}
 
 	/*
 	 * Step 15: Explicitly disable primary after it's already been
@@ -289,9 +294,11 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 
 	/*
 	 * We should be able to move the primary plane completely offscreen
-	 * and have it disable successfully.
+	 * and have it disable successfully. Skip on amdgpu since crc_9 was
+	 * skipped with offscreen planes previously.
 	 */
-	igt_assert_crc_equal(&test.crc_5, &test.crc_9);
+	if (!is_amdgpu_device(data->drm_fd))
+		igt_assert_crc_equal(&test.crc_5, &test.crc_9);
 
 	/*
 	 * We should be able to explicitly disable an already
-- 
2.34.1

  reply	other threads:[~2022-09-03 17:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03 17:48 [igt-dev] [PATCH 1/2][V4] tests/kms_universal_plane: Enable gen9_test_pipe for all devices Alex Hung
2022-09-03 17:48 ` Alex Hung [this message]
2022-09-06 13:50   ` [igt-dev] [PATCH 2/2][V4] tests/kms_universal_plane: Skip offscreen test for universal API Mark Yacoub
2022-11-11 10:33   ` Ville Syrjälä
2022-09-03 18:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [1/2,V4] tests/kms_universal_plane: Enable gen9_test_pipe for all devices Patchwork
2022-09-03 22:50 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [1/2,V4] tests/kms_universal_plane: Enable gen9_test_pipe for all devices (rev2) Patchwork
2022-09-04  8:06 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-09-04  9:10 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-05  5:35 ` Patchwork
2022-09-05  6:18 ` Patchwork
2022-09-06  6:14 ` Patchwork
2022-09-06  7:01 ` [igt-dev] ✓ Fi.CI.IGT: success " 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=20220903174803.2937836-2-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --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