[PATCH i-g-t] tests/kms_universal_plane: Use COMMIT_ATOMIC flag when doing commit
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Sep 19 05:28:41 UTC 2024
On 18-09-2024 04:03 pm, Suraj Kandpal wrote:
> 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>
LGTM
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem 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 */
More information about the igt-dev
mailing list