[PATCH i-g-t] tests/kms_universal_plane: Use COMMIT_ATOMIC flag when doing commit
Suraj Kandpal
suraj.kandpal at intel.com
Wed Sep 18 10:33:59 UTC 2024
Use COMMIT_ATOMIC flag when doing a display commit so that we make
sure to wait for all the cleanup work to be done before going and
reading the i915_gem_framebuffer entry otherwise it may end up
showing an incorrect count sporadically if the cleanup takes
place after the count is read.
--v2
-Use is_atomic variable to decide on the flag [Bhanu]
Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
---
tests/kms_universal_plane.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 8c1ce8143..7e80b1389 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -702,7 +702,8 @@ cursor_leak_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
/* Release our framebuffer handles before we take a second count */
igt_plane_set_fb(primary, NULL);
igt_plane_set_fb(cursor, NULL);
- igt_display_commit2(display, COMMIT_LEGACY);
+ igt_display_commit2(display, display->is_atomic ?
+ COMMIT_ATOMIC : COMMIT_LEGACY);
cursor_leak_test_fini(data, output, &background_fb, cursor_fb);
/* We should be back to the same framebuffer count as when we started */
--
2.43.2
More information about the igt-dev
mailing list