From: Wayne Lin <Wayne.Lin@amd.com>
To: <igt-dev@lists.freedesktop.org>
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/amdgpu/amd_link_settings: Change the flow when exit test
Date: Wed, 2 Mar 2022 16:46:31 +0800 [thread overview]
Message-ID: <20220302084631.10605-3-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20220302084631.10605-1-Wayne.Lin@amd.com>
[Why]
No need to capture original lane count and link rate for setting back
when exit the test. What we actually need to do is clean up the
preferred link_setting of driver.
[How]
Clean up unnecessary steps.
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
tests/amdgpu/amd_link_settings.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/tests/amdgpu/amd_link_settings.c b/tests/amdgpu/amd_link_settings.c
index c8c45c88..14c8c4d7 100644
--- a/tests/amdgpu/amd_link_settings.c
+++ b/tests/amdgpu/amd_link_settings.c
@@ -163,9 +163,6 @@ static void test_link_training_configs(data_t *data)
{
const drmModeModeInfo *orig_mode;
igt_output_t *output;
- int lane_count[4], link_rate[4], link_spread[4];
- int orig_lc, orig_lr;
- const int current = 0;
igt_enable_connectors(data->drm_fd);
@@ -184,12 +181,6 @@ static void test_link_training_configs(data_t *data)
igt_assert(orig_mode);
igt_output_override_mode(output, orig_mode);
- /* Collect original mode's LC and LR */
- igt_amd_read_link_settings(data->drm_fd, output->name, lane_count,
- link_rate, link_spread);
- orig_lc = lane_count[current];
- orig_lr = link_rate[current];
-
/* Set display pattern */
igt_create_pattern_fb(data->drm_fd, orig_mode->hdisplay,
orig_mode->vdisplay, DRM_FORMAT_XRGB8888,
@@ -200,12 +191,10 @@ static void test_link_training_configs(data_t *data)
/* Change link settings. */
run_link_training_config(data, output);
- /* Revert mode back. */
- igt_info("%s: Reverting to lane count: %d, link rate: 0x%02x\n", output->name, orig_lc, orig_lr);
- igt_amd_write_link_settings(data->drm_fd, output->name, orig_lc, orig_lr,
- LINK_TRAINING_DEFAULT);
-
- igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ /* Clean up preferred link_setting of driver */
+ igt_info("%s: Clean up preferred link_setting\n", output->name);
+ igt_amd_write_link_settings(data->drm_fd, output->name, 0, 0,
+ LINK_TRAINING_DEFAULT);
igt_remove_fb(data->drm_fd, &data->fb);
}
--
2.25.1
next prev parent reply other threads:[~2022-03-02 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 8:46 [igt-dev] [PATCH i-g-t 0/2] Modify amd_link_settings test Wayne Lin
2022-03-02 8:46 ` [igt-dev] [PATCH i-g-t 1/2] tests/amdgpu/amd_link_settings: Ignore CRC checking Wayne Lin
2022-03-02 8:46 ` Wayne Lin [this message]
2022-03-02 9:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Modify amd_link_settings test Patchwork
2022-03-02 15:12 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-03-02 16:24 ` [igt-dev] [PATCH i-g-t 0/2] " Harry Wentland
2022-03-08 20:33 ` Rodrigo Siqueira Jordao
2022-03-10 6:45 ` Vudum, Lakshminarayana
2022-03-09 3:47 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2022-03-09 21:09 ` [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=20220302084631.10605-3-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=igt-dev@lists.freedesktop.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: 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