[igt-dev] [PATCH i-g-t] tests/kms_plane_cursor: Use dprx CRC for AMDGPU
Rodrigo Siqueira
Rodrigo.Siqueira at amd.com
Tue Jan 18 16:42:29 UTC 2022
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;
+
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