Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Hersen Wu <hersenxs.wu@amd.com>,
	igt-dev@lists.freedesktop.org, rodrigo.siqueira@amd.com,
	aurabindo.pillai@amd.com, alex.hung@amd.com,
	hamza.mahfooz@amd.com, sunpeng.li@amd.com
Cc: markyacoub@google.com
Subject: Re: [igt-dev] [PATCH] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu
Date: Tue, 3 Oct 2023 10:38:07 +0300	[thread overview]
Message-ID: <ab37761a-f846-8185-1a9b-ce4a32f90bdf@gmail.com> (raw)
In-Reply-To: <20231002142023.713415-1-hersenxs.wu@amd.com>

Hi Hersen,

On 2.10.2023 17.20, Hersen Wu wrote:
> Wait for two more vblanks before reading crc on AMD gpu.
> 
> Without waiting for two vblanks, AMD cursor updates may not
> synchronized to the same frame of pipe, crc generated may
> not be reliable.
> 
> Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
> ---
>   tests/kms_cursor_crc.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index ba29ff65d..e3259e147 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -276,6 +276,15 @@ static void do_single_test(data_t *data, int x, int y, bool hw_test,
>   		restore_image(data, swbufidx, &((cursorarea){x, y, data->curw, data->curh}));
>   		igt_plane_set_fb(data->primary, &data->primary_fb[swbufidx]);
>   		igt_display_commit(display);
> +
> +		/* Wait for two more vblanks since cursor updates may not
> +		 * synchronized to the same frame on AMD HW
> +		 */
> +		if (is_amdgpu_device(data->drm_fd))
> +			igt_wait_for_vblank_count(data->drm_fd,
> +				display->pipes[data->pipe].crtc_offset,
> +				data->vblank_wait_count);
> +

I did mention earlier this has nothing to do with cursor. Here cursor 
plane is not in use, here is just being generated reference crcs and the 
below igt_assert_crc_equal check against earlier hw cursor generated 
crcs. Ie. you are here adding extra wait for normal flip where there is 
no cursor changes, if this is problem then other flip tests should also 
fail.

>   		igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
>   		igt_assert_crc_equal(&crc, hwcrc);
>   	}
> @@ -1079,7 +1088,11 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
>   
>   		igt_require_pipe_crc(data.drm_fd);
>   
> -		data.vblank_wait_count = is_msm_device(data.drm_fd) ? 2 : 1;
> +		/* Wait for two more vblanks since cursor updates may not
> +		 * synchronized to the same frame on AMD HW
> +		 */
> +		data.vblank_wait_count =
> +			(is_msm_device(data.drm_fd) || is_amdgpu_device(data.drm_fd)) ? 2 : 1;
>   	}
>   
>   	data.cursor_max_w = cursor_width;

  parent reply	other threads:[~2023-10-03  7:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 14:20 [igt-dev] [PATCH] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu Hersen Wu
2023-10-02 15:35 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev2) Patchwork
2023-10-02 16:39 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-02 17:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-03  7:38 ` Juha-Pekka Heikkila [this message]
2023-10-03 13:32   ` [igt-dev] [PATCH] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu Wu, Hersen
2023-10-03 13:49     ` Wu, Hersen
2023-10-03 19:20     ` Juha-Pekka Heikkilä
2023-10-03 21:12       ` Wu, Hersen
2023-10-05 21:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev4) Patchwork
2023-10-05 23:34 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2023-10-05 23:51 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev5) Patchwork
2023-10-06  0:46 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-06 14:00 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-06 16:23 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev6) Patchwork
2023-10-06 16:23 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-07  4:53 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-08 17:36 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev7) Patchwork
2023-10-08 17:36 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-08 18:46 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-10 16:46 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev8) Patchwork
2023-10-10 18:05 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-11  1:50 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-11 23:47 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev9) Patchwork
2023-10-12  0:03 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-12 16:41 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-12 18:31   ` Kamil Konieczny
2023-10-13 11:38 ` [igt-dev] [PATCH] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu Kamil Konieczny
2023-10-13 11:49   ` Juha-Pekka Heikkila
2023-10-16 20:24     ` Wu, Hersen
2023-10-18 12:45   ` Wu, Hersen
2023-10-19  4:18     ` Illipilli, TejasreeX
2023-10-13 12:42 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu (rev9) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-10-02 13:41 [igt-dev] [PATCH] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures on AMD gpu Hersen Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab37761a-f846-8185-1a9b-ce4a32f90bdf@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=hamza.mahfooz@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=markyacoub@google.com \
    --cc=rodrigo.siqueira@amd.com \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox