[igt-dev] [PATCH 2/2][V2] tests/kms_universal_plane: Skip offscreen test for universal API

Mark Yacoub markyacoub at chromium.org
Tue Aug 30 15:00:26 UTC 2022


On Fri, Aug 26, 2022 at 5:08 PM Alex Hung <alex.hung at amd.com> wrote:
>
> amdgpu driver intentionally rejects plane outside of the screen and thus
> this test is skipped on AMD HW. See more details in kernel commits
> 40d916a2602c and 4abdb72bd8576 which are summarized as below:
>
> "Reject this contidion (too small viewport size) at validation time.
nit: s/contidion/condition.
> This gives the calling level a chance to handle this gracefully and
> avoid inconsistent behaivor."
nit: s/behaivor/behavior.
>
> Signed-off-by: Alex Hung <alex.hung at amd.com>
> ---
>  tests/kms_universal_plane.c | 25 ++++++++++++++-----------
>  1 file changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
> index 9eab1a57..057a14f4 100644
> --- a/tests/kms_universal_plane.c
> +++ b/tests/kms_universal_plane.c
> @@ -242,16 +242,18 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
>         igt_display_commit2(display, COMMIT_LEGACY);
>
>         /* Step 14: Universal API, set primary completely offscreen (CRC 9) */
> -       igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,
> -                                  output->config.crtc->crtc_id,
> -                                  test.blue_fb.fb_id, 0,
> -                                  9000, 9000,
> -                                  test.mode->hdisplay,
> -                                  test.mode->vdisplay,
> -                                  IGT_FIXED(0,0), IGT_FIXED(0,0),
> -                                  IGT_FIXED(test.mode->hdisplay,0),
> -                                  IGT_FIXED(test.mode->vdisplay,0)) == 0);
> -       igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);
> +       if (!is_amdgpu_device(data->drm_fd)) {
Please expand the comment above, stating in few words why you're
skipping on AMD, so we don't have to check the commit to understand
why this is happening.
> +               igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,
> +                                          output->config.crtc->crtc_id,
> +                                          test.blue_fb.fb_id, 0,
> +                                          9000, 9000,
> +                                          test.mode->hdisplay,
> +                                          test.mode->vdisplay,
> +                                          IGT_FIXED(0,0), IGT_FIXED(0,0),
> +                                          IGT_FIXED(test.mode->hdisplay,0),
> +                                          IGT_FIXED(test.mode->vdisplay,0)) == 0);
> +               igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);
> +       }
>
>         /*
>          * Step 15: Explicitly disable primary after it's already been
> @@ -291,7 +293,8 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
>          * We should be able to move the primary plane completely offscreen
>          * and have it disable successfully.
>          */
> -       igt_assert_crc_equal(&test.crc_5, &test.crc_9);
> +       if (!is_amdgpu_device(data->drm_fd))
ditto. Expand the comment above on a new line why you're skipping AMD
> +               igt_assert_crc_equal(&test.crc_5, &test.crc_9);
>
>         /*
>          * We should be able to explicitly disable an already
> --
> 2.34.1
>


More information about the igt-dev mailing list