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

Ville Syrjala
2019-11-29T14:30:57Z

From: Ville Syrjälä <ville.syrjala@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@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 a7fcab87233a..5cfb0286d90c 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.23.0