[PATCH i-g-t, v3] tests/amdgpu/amd_abm: Disable the ABM after test

Zhang, George George.Zhang at amd.com
Tue Feb 18 16:13:57 UTC 2025


[Public]

> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Tom Chung
> Sent: Tuesday, February 18, 2025 6:05 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Hung, Alex <Alex.Hung at amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li at amd.com>; Chung, ChiaHsuan (Tom)
> <ChiaHsuan.Chung at amd.com>
> Subject: [PATCH i-g-t,v3] tests/amdgpu/amd_abm: Disable the ABM after test
>
> [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.
>

Tested-by: George Zhang <george.zhang at amd.com>

> Signed-off-by: Tom Chung <chiahsuan.chung at amd.com>
> ---
> v3: Fix the conflict
>
>  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
> e196b6ebc..8f7f489ad 100644
> --- a/tests/amdgpu/amd_abm.c
> +++ b/tests/amdgpu/amd_abm.c
> @@ -49,6 +49,8 @@ typedef struct data {
>       igt_fb_t ref_fb;
>  } data_t;
>
> +static void set_abm_level(data_t *data, igt_output_t *output, int
> +level);
> +
>  /* Common test setup. */
>  static void test_init(data_t *data)
>  {
> @@ -101,6 +103,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



More information about the igt-dev mailing list