Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amdgpu/amd_abm: Disable the ABM after test
@ 2025-02-17  6:25 Tom Chung
  2025-02-17 10:02 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Chung @ 2025-02-17  6:25 UTC (permalink / raw)
  To: igt-dev; +Cc: alex.hung, sunpeng.li, chiahsuan.chung

[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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ Fi.CI.BUILD: failure for tests/amdgpu/amd_abm: Disable the ABM after test
  2025-02-17  6:25 [PATCH i-g-t] tests/amdgpu/amd_abm: Disable the ABM after test Tom Chung
@ 2025-02-17 10:02 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2025-02-17 10:02 UTC (permalink / raw)
  To: Tom Chung; +Cc: igt-dev

== Series Details ==

Series: tests/amdgpu/amd_abm: Disable the ABM after test
URL   : https://patchwork.freedesktop.org/series/144930/
State : failure

== Summary ==

Applying: tests/amdgpu/amd_abm: Disable the ABM after test
Patch failed at 0001 tests/amdgpu/amd_abm: Disable the ABM after test
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-17 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17  6:25 [PATCH i-g-t] tests/amdgpu/amd_abm: Disable the ABM after test Tom Chung
2025-02-17 10:02 ` ✗ Fi.CI.BUILD: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox