[igt-dev] [PATCH i-g-t 1/2] tests/kms_rmfb: Use COMMIT_UNIVERSAL for overlay/cursor planes

Ville Syrjala ville.syrjala at linux.intel.com
Tue Feb 23 13:49:23 UTC 2021


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Using COMMIT_LEGACY for the cursor plane makes the test fail
because the cursor framebuffer is never handed over to the
kernel, and instead only the BO gets passed in via the
legacy cursor ioctl. Thus the rmfb ioctl will not turn off
the cursor plane since the kernel is using an internal fb
for the cursor. Let's avoid that by treating the cursor as
just another universal plane.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_rmfb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_rmfb.c b/tests/kms_rmfb.c
index 81932e0d830c..2d49be8ea399 100644
--- a/tests/kms_rmfb.c
+++ b/tests/kms_rmfb.c
@@ -87,8 +87,10 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo
 			igt_plane_set_fb(plane, &fb);
 		}
 
-		if (igt_display_try_commit2(&data->display, data->display.is_atomic ?
-					    COMMIT_ATOMIC : COMMIT_LEGACY)) {
+		if (igt_display_try_commit2(&data->display,
+					    data->display.is_atomic ? COMMIT_ATOMIC :
+					    plane->type == DRM_PLANE_TYPE_PRIMARY ?
+					    COMMIT_LEGACY : COMMIT_UNIVERSAL)) {
 			/*
 			 * Disable any plane that fails (presumably
 			 * due to exceeding some hardware limit).
-- 
2.26.2



More information about the igt-dev mailing list