[igt-dev] [PATCH] tests/kms_plane_multiple: skip cursor plane on AMD HW

Alex Hung alex.hung at amd.com
Thu Aug 25 01:24:47 UTC 2022


DRM thinks of cursor and plane blending like this:

┌─────────┐
│ Cursor  ├───────┐
└─────────┘       │
                  │
┌─────────┐      ┌▼──────┐
│ Plane 1 ├──────► CRTC  │
└─────────┘      └▲──────┘
                  │
┌─────────┐       │
│ Plane 2 ├───────┘
└─────────┘

AMD HW is designed like this:

┌─────────┐   ┌─────────┐      ┌───────┐
│ Cursor  ├───► Plane 1 ├──────► CRTC  │
└─────────┘   └─────────┘      └▲──────┘
                                │
              ┌─────────┐       │
              │ Plane 2 ├───────┘
              └─────────┘

The implementation can cause CRC values to be
different and not suitable to compare to values
from other planes.

Signed-off-by: Alex Hung <alex.hung at amd.com>
---
 tests/kms_plane_multiple.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 1679f7ce..f29c8f36 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -369,6 +369,14 @@ test_plane_position(data_t *data, enum pipe pipe, uint64_t modifier)
 	int n_planes = opt.all_planes ?
 			data->display.pipes[pipe].n_planes : DEFAULT_N_PLANES;
 
+	/*
+	 * Skip cursor (3rd) plane because AMD has different implementation
+	 * which cannot be drawn outside its associated plane and can cause
+	 * CRC values to be different from other planes.
+	 */
+	if (is_amdgpu_device(data->drm_fd))
+		n_planes = 2;
+
 	output = igt_get_single_output_for_pipe(&data->display, pipe);
 	igt_require(output);
 
-- 
2.37.2



More information about the igt-dev mailing list