From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <rodrigo.siqueira@amd.com>, <harry.wentland@amd.com>,
<hersenxs.wu@amd.com>, Alex Hung <alex.hung@amd.com>
Subject: [PATCH 3/3] tests/amdgpu/amd_dp_dsc: Check connector's dsc capability
Date: Thu, 21 Mar 2024 16:47:58 -0600 [thread overview]
Message-ID: <20240321224758.1531610-3-alex.hung@amd.com> (raw)
In-Reply-To: <20240321224758.1531610-1-alex.hung@amd.com>
test_init() only sets data->mode when an output is DSC capable. As a
result, it is necessary to check it before running each subtest.
Signed-off-by: Alex Hung <alex.hung@amd.com>
---
tests/amdgpu/amd_dp_dsc.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/tests/amdgpu/amd_dp_dsc.c b/tests/amdgpu/amd_dp_dsc.c
index f2da98259..64f1565f4 100644
--- a/tests/amdgpu/amd_dp_dsc.c
+++ b/tests/amdgpu/amd_dp_dsc.c
@@ -93,6 +93,15 @@ static void test_init(data_t *data)
igt_display_reset(display);
}
+static bool is_dsc_capable(drmModeModeInfo *mode)
+{
+ /* mode is not set in test_init() if it is dsc capable */
+ if (mode->hdisplay == 0 || mode->vdisplay == 0)
+ return false;
+
+ return true;
+}
+
static void test_dsc_enable(data_t *data)
{
bool dsc_on, dsc_after, dsc_before;
@@ -107,7 +116,7 @@ static void test_dsc_enable(data_t *data)
for_each_pipe(&data->display, i) {
/* Setup the output */
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
igt_create_pattern_fb(data->fd,
@@ -245,7 +254,7 @@ static void test_dsc_slice_dimensions_change(data_t *data)
for_each_pipe(&data->display, i) {
/* Setup the output */
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
igt_create_pattern_fb(data->fd,
@@ -335,7 +344,7 @@ static void test_dsc_link_settings(data_t *data)
/* Setup all outputs */
for_each_pipe(&data->display, i) {
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
igt_create_pattern_fb(data->fd,
@@ -352,7 +361,7 @@ static void test_dsc_link_settings(data_t *data)
/* Collect reference CRCs */
for_each_pipe(&data->display, i) {
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
igt_pipe_crc_collect_crc(data->pipe_crc[i], &ref_crc[i]);
@@ -363,7 +372,7 @@ static void test_dsc_link_settings(data_t *data)
/* Write new link_settings */
for_each_pipe(&data->display, i) {
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
/* Write lower link settings */
@@ -380,7 +389,7 @@ static void test_dsc_link_settings(data_t *data)
for_each_pipe(&data->display, i) {
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
/* Verify lower link settings */
@@ -404,8 +413,9 @@ static void test_dsc_link_settings(data_t *data)
/* Cleanup all fbs */
for_each_pipe(&data->display, i) {
output = data->output[i];
- if (!output || !igt_output_is_connected(output))
+ if (!output || !igt_output_is_connected(output) || !is_dsc_capable(&data->mode[i]))
continue;
+
igt_remove_fb(data->fd, &ref_fb[i]);
}
--
2.34.1
next prev parent reply other threads:[~2024-03-21 22:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 22:47 [PATCH 1/3] tests/amdgpu/amd_dp_dsc: Correct code style problems Alex Hung
2024-03-21 22:47 ` [PATCH 2/3] lib/amd: Return false if dp_fec or dp_dsc is not supported Alex Hung
2024-03-25 11:27 ` Wu, Hersen
2024-03-21 22:47 ` Alex Hung [this message]
2024-03-25 11:30 ` [PATCH 3/3] tests/amdgpu/amd_dp_dsc: Check connector's dsc capability Wu, Hersen
2024-03-21 23:27 ` ✓ CI.xeBAT: success for series starting with [1/3] tests/amdgpu/amd_dp_dsc: Correct code style problems Patchwork
2024-03-21 23:30 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-22 15:51 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-25 15:35 ` Hung, Alex
2024-03-24 18:32 ` [PATCH 1/3] " Wu, Hersen
2024-03-26 20:30 ` ✓ Fi.CI.BAT: success for series starting with [1/3] tests/amdgpu/amd_dp_dsc: Correct code style problems (rev2) Patchwork
2024-03-26 20:31 ` ✓ CI.xeBAT: " Patchwork
2024-03-27 14:35 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-27 14:46 ` [PATCH 1/3] tests/amdgpu/amd_dp_dsc: Correct code style problems Kamil Konieczny
-- strict thread matches above, loose matches on Subject: below --
2024-03-27 16:23 [PATCH 1/3][V2] " Alex Hung
2024-03-27 16:23 ` [PATCH 3/3] tests/amdgpu/amd_dp_dsc: Check connector's dsc capability Alex Hung
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=20240321224758.1531610-3-alex.hung@amd.com \
--to=alex.hung@amd.com \
--cc=harry.wentland@amd.com \
--cc=hersenxs.wu@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.siqueira@amd.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