summaryrefslogtreecommitdiff
path: root/tests/kms_plane_multiple.c
diff options
context:
space:
mode:
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>2019-08-02 13:13:14 -0400
committerNicholas Kazlauskas <nicholas.kazlauskas@amd.com>2019-08-19 10:17:38 -0400
commit7102b417fedc2a1ea6f72d768a9f1bd100a34f13 (patch)
tree48c0c764b005d70a3e60491fb32fc669664a036a /tests/kms_plane_multiple.c
parent7d99ce7cab1e1e9d896bf0ddfc7227610ab77c7f (diff)
tests/kms_plane_multiple: Commit state before remove_fb calls
The kms_plane_multiple@* tests fail on amdgpu with a dmesg-warn due to "atomic remove_fb failed with -22" "WARNING: CPU: 6 PID: 183 at drivers/gpu/drm/drm_framebuffer.c:986" The call to drmModeRmFB essentially creates an atomic commit internally when we drop the last reference to the FB in IGT. This commit disables the plane associated with framebuffer. Since the planes are iterated by increasing index in IGT the last plane to have its framebuffer removed is the cursor plane on AMDGPU. On AMDGPU we can't enable the cursor plane without any active hardware planes (primary, overlay) since there is no dedicated cursor plane. The commits to release the overlay plane fail since it's the last remaining plane and the cursor plane is still active. The fix to the test is to just perform a commit that disables all 3 planes at the same time before calling remove_fb. This improves performance enables support for drivers that don't support cursor planes being enabled without a primary or overlay. Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com>
Diffstat (limited to 'tests/kms_plane_multiple.c')
-rw-r--r--tests/kms_plane_multiple.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 81ed45dd..255cd34a 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -317,6 +317,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
for_each_plane_on_pipe(&data->display, pipe, plane)
igt_plane_set_fb(plane, NULL);
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
for (int x = 0; x < c; x++)
igt_remove_fb(data->drm_fd, &data->fb[x]);
} while (!err && c < n_planes);
@@ -340,6 +342,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
for_each_plane_on_pipe(&data->display, pipe, plane)
igt_plane_set_fb(plane, NULL);
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
for (int x = 0; x < c; x++)
igt_remove_fb(data->drm_fd, &data->fb[x]);