Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Chung <chiahsuan.chung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <alex.hung@amd.com>, <sunpeng.li@amd.com>, <chiahsuan.chung@amd.com>
Subject: [PATCH i-g-t] tests/amdgpu/amd_abm: Disable the ABM after test
Date: Mon, 17 Feb 2025 14:25:07 +0800	[thread overview]
Message-ID: <20250217062840.31806-1-chiahsuan.chung@amd.com> (raw)

[Why]
After running the ABM IGT test, It may cause some other IGT test
failed because of the ABM is still enabled.

[How]
Disable the ABM after running the test.

Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
---
 tests/amdgpu/amd_abm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/amdgpu/amd_abm.c b/tests/amdgpu/amd_abm.c
index a1dee4488..97813d80f 100644
--- a/tests/amdgpu/amd_abm.c
+++ b/tests/amdgpu/amd_abm.c
@@ -52,6 +52,8 @@ typedef struct data {
 	uint32_t *fb_mem;
 } data_t;
 
+static void set_abm_level(data_t *data, igt_output_t *output, int level);
+
 static void fbmem_draw_smpte_pattern(uint32_t *fbmem, int width, int height)
 {
 	uint32_t x, y;
@@ -166,6 +168,15 @@ static void test_init(data_t *data)
 static void test_fini(data_t *data)
 {
 	igt_display_t *display = &data->display;
+	igt_output_t *output;
+	enum pipe pipe;
+
+	/* Disable ABM before exit test */
+	for_each_valid_output_on_pipe(&data->display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+		set_abm_level(data, output, 0);
+	}
 
 	igt_display_reset(display);
 	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
-- 
2.43.0


             reply	other threads:[~2025-02-17  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17  6:25 Tom Chung [this message]
2025-02-17 10:02 ` ✗ Fi.CI.BUILD: failure for tests/amdgpu/amd_abm: Disable the ABM after test 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=20250217062840.31806-1-chiahsuan.chung@amd.com \
    --to=chiahsuan.chung@amd.com \
    --cc=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sunpeng.li@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