[PATCH i-g-t] tests/kms_universal_plane: Fix fb count mismatch
Borah, Chaitanya Kumar
chaitanya.kumar.borah at intel.com
Thu Apr 3 07:12:38 UTC 2025
> -----Original Message-----
> From: Garg, Nemesa <nemesa.garg at intel.com>
> Sent: Wednesday, April 2, 2025 6:02 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Lankhorst, Maarten <maarten.lankhorst at intel.com>; Borah, Chaitanya
> Kumar <chaitanya.kumar.borah at intel.com>; Garg, Nemesa
> <nemesa.garg at intel.com>
> Subject: [PATCH i-g-t] tests/kms_universal_plane: Fix fb count mismatch
>
> There is a mismatch in the count of fb before start and end of the test. This is
> because cursor fbs still not removed and we are counting the fbs.
> Add a delay of 2 vblank before counting the fbs so that all cursors fbs gets
> removed.
Commit message should also have the information mentioned in the comment.
>
> Signed-off-by: Nemesa Garg <nemesa.garg at intel.com>
> ---
> tests/kms_universal_plane.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c index
> 8e0b4dda0..1a4e9489f 100644
> --- a/tests/kms_universal_plane.c
> +++ b/tests/kms_universal_plane.c
> @@ -703,6 +703,15 @@ cursor_leak_test_pipe(data_t *data, enum pipe
> pipe, igt_output_t *output)
> COMMIT_ATOMIC : COMMIT_LEGACY);
> cursor_leak_test_fini(data, output, &background_fb, cursor_fb);
>
> + /* Since unpinning of cursor fb occurs during vblank in xe, we need
> + * to wait atleast 1 vblank for driver to remove cursor fb. We need
> + * 1 additional vblank because vbalnk event is scheduled before
> + * unpinning. Therefore 2 vblank to ensures that all cursor-related
> + * framebuffers can be removed before counting the framebuffer.
> + */
Typo: vblank, ensure
Nit: s/ Therefore 2 vblank/Therefore add 2 vblank wait/
> + if (get_intel_driver(data->drm_fd) == INTEL_DRIVER_XE)
We should perhaps use the more abstracted version of this - is_xe_device(data->drm_fd).
Regards
Chaitanya
> + igt_wait_for_vblank_count(data->drm_fd,
> +data->display.pipes[pipe].crtc_offset, 2);
> +
> /* We should be back to the same framebuffer count as when we
> started */
> count2 = intel_gem_fb_count(data);
>
> --
> 2.25.1
More information about the igt-dev
mailing list