[PATCH i-g-t] tests/kms_universal_plane: Use COMMIT_ATOMIC flag when doing commit

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Wed Sep 18 10:18:14 UTC 2024


Hi Suraj,

On 18-09-2024 01:59 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.
> 
> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
>   tests/kms_universal_plane.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
> index 8c1ce8143..081847f87 100644
> --- a/tests/kms_universal_plane.c
> +++ b/tests/kms_universal_plane.c
> @@ -702,7 +702,7 @@ 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, COMMIT_ATOMIC);

I guess, it'll break the legacy. You can fix this as
display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY

- Bhanu

>   	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