[igt-dev] [PATCH i-g-t] tests/kms_plane_cursor: Use dprx CRC for AMDGPU

Mark Yacoub markyacoub at chromium.org
Thu Jan 20 17:41:29 UTC 2022


On Tue, Jan 18, 2022 at 11:43 AM Rodrigo Siqueira
<Rodrigo.Siqueira at amd.com> wrote:
>
> We have some CRC errors spread around a few IGT tests related to a
> driver bug; we have a kernel fix for that [1]. However, after applying the
> kernel patch, all tests related to pipe-a-primary-size-* start to fail.
> To fix this issue, we need to make kms_plane_cursor utilize DPRX CRC;
> this commit updates this test by basically setting DPRX for amdgpu.
>
> 1. https://patchwork.freedesktop.org/series/98993/
>
> Cc: Mark Yacoub <markyacoub at chromium.org>
> Cc: Hayden Goodfellow <hayden.goodfellow at amd.com>
> Cc: Harry Wentland <harry.wentland at amd.com>
> Cc: Nicholas Choi <Nicholas.Choi at amd.com>
> Cc: Leo Li <sunpeng.li at amd.com>
>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
> ---
>  tests/kms_plane_cursor.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
> index 73085cc8..def282b8 100644
> --- a/tests/kms_plane_cursor.c
> +++ b/tests/kms_plane_cursor.c
> @@ -60,6 +60,8 @@ typedef struct data {
>  /* Common test setup. */
>  static void test_init(data_t *data, enum pipe pipe_id)
>  {
> +       const char *crc_type = INTEL_PIPE_CRC_SOURCE_AUTO;
INTEL_PIPE_CRC_SOURCE_AUTO resolves to "auto", can we drop the INTEL
prefix cause it's pretty generic to everyone else.
opt: you can do `const char *crc_type = is_amdgpu_device(data->drm_fd)
? AMDGPU_PIPE_CRC_SOURCE_DPRX : PIPE_CRC_SOURCE_AUTO;` or use this
same ternary operation in igt_pipe_crc_new()
This is more of just personal preference so you don't have to about it though.
> +
>         igt_display_t *display = &data->display;
>
>         data->pipe_id = pipe_id;
> @@ -77,8 +79,11 @@ static void test_init(data_t *data, enum pipe pipe_id)
>         data->cursor = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_CURSOR);
>
>         igt_require_pipe_crc(data->drm_fd);
> -       data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe_id,
> -                                         INTEL_PIPE_CRC_SOURCE_AUTO);
> +
> +       if (is_amdgpu_device(data->drm_fd))
> +               crc_type = AMDGPU_PIPE_CRC_SOURCE_DPRX;
> +
> +       data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe_id, crc_type);
>
>         igt_output_set_pipe(data->output, data->pipe_id);
>
> --
> 2.25.1
>


More information about the igt-dev mailing list