From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: markyacoub@google.com
Subject: [igt-dev] [PATCH 2/2][V2] tests/kms_universal_plane: skip when pipe and primary plane cannot be off
Date: Sun, 16 Oct 2022 18:49:36 -0600 [thread overview]
Message-ID: <20221017004936.574303-2-alex.hung@amd.com> (raw)
In-Reply-To: <20221017004936.574303-1-alex.hung@amd.com>
amdgpu rejects when crtc is on + primary plane is off. As a result,
skipping these scenario when they cannot be turned off together, i.e.
crtc cannot be off when reading crc values.
Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Mark Yacoub <markyacoub@chromium.org>
---
tests/kms_universal_plane.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 2db1d7e8..e732b09a 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -190,9 +190,11 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_4);
/* Step 5: Universal API's, disable primary plane (CRC 5) */
- igt_plane_set_fb(primary, NULL);
- igt_display_commit2(display, COMMIT_UNIVERSAL);
- igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_5);
+ if (!is_amdgpu_device(data->drm_fd)) {
+ igt_plane_set_fb(primary, NULL);
+ igt_display_commit2(display, COMMIT_UNIVERSAL);
+ igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_5);
+ }
/* Step 6: Universal API's, re-enable primary with blue (CRC 6) */
igt_plane_set_fb(primary, &test.blue_fb);
@@ -265,9 +267,11 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
* Step 15: Explicitly disable primary after it's already been
* implicitly disabled (CRC 10).
*/
- igt_plane_set_fb(primary, NULL);
- igt_display_commit2(display, COMMIT_UNIVERSAL);
- igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_10);
+ if (!is_amdgpu_device(data->drm_fd)) {
+ igt_plane_set_fb(primary, NULL);
+ igt_display_commit2(display, COMMIT_UNIVERSAL);
+ igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_10);
+ }
/* Step 16: Legacy API's, blue primary, red sprite */
igt_plane_set_fb(primary, &test.blue_fb);
@@ -278,7 +282,8 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
igt_assert_crc_equal(&test.crc_2, &test.crc_4);
/* Disabling primary plane should be same as black primary */
- igt_assert_crc_equal(&test.crc_1, &test.crc_5);
+ if (!is_amdgpu_device(data->drm_fd))
+ igt_assert_crc_equal(&test.crc_1, &test.crc_5);
/* Re-enabling primary should return to blue properly */
igt_assert_crc_equal(&test.crc_2, &test.crc_6);
@@ -300,8 +305,7 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
* and have it disable successfully. Skip on amdgpu since crc_9 was
* skipped with offscreen planes previously.
*/
- if (!is_amdgpu_device(data->drm_fd))
- igt_assert_crc_equal(&test.crc_5, &test.crc_9);
+ igt_assert_crc_equal(&test.crc_5, &test.crc_9);
/*
* We should be able to explicitly disable an already
--
2.38.0
next prev parent reply other threads:[~2022-10-17 0:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 0:49 [igt-dev] [PATCH 1/2][V2] tests/kms_universal_plane: turn off pipe when primary plane is off Alex Hung
2022-10-17 0:49 ` Alex Hung [this message]
2022-10-17 1:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2,V2] " Patchwork
2022-10-17 2:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-10-17 14:14 ` [igt-dev] [PATCH 1/2][V2] " Mark Yacoub
2022-11-11 10:36 ` Ville Syrjälä
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=20221017004936.574303-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