Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Li <sunpeng.li@amd.com>
To: Tom Chung <chiahsuan.chung@amd.com>, igt-dev@lists.freedesktop.org
Cc: Rodrigo.Siqueira@amd.com, alex.hung@amd.com
Subject: Re: [PATCH i-g-t,v2] tests/amdgpu/amd_replay: Add some page flips before test start
Date: Mon, 4 Nov 2024 08:20:44 -0500	[thread overview]
Message-ID: <b1bbb169-354e-4449-a787-de63bb4d1970@amd.com> (raw)
In-Reply-To: <20241030151714.2424-1-chiahsuan.chung@amd.com>



On 2024-10-30 11:15, Tom Chung wrote:
> [Why]
> New panel replay driver behavior skip some atomic commits before
> enable the panel replay.
> 
> This is because a kms client needs to submit fb updates via kms
> in order for amdgpu to flush updates to the panel.
> 
> If a client updates the fb without going through kms (by directly
> blitting to it, for example), then any panel self-refresh feature
> needs to be disabled. Therefore, the driver vets the client by
> counting an adequate amount of atomic updates before enabling
> self-refresh features.
> 
> [How]
> Add some page flips before test to let the panel replay can be
> enabled first.
> (This change can be backward compatible with old driver)
> 
> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com

> ---
>   v2: Add some more information in the commit messages
> 
>   tests/amdgpu/amd_replay.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/amdgpu/amd_replay.c b/tests/amdgpu/amd_replay.c
> index b5bb10b34..db2ac2de9 100644
> --- a/tests/amdgpu/amd_replay.c
> +++ b/tests/amdgpu/amd_replay.c
> @@ -14,6 +14,7 @@
>   IGT_TEST_DESCRIPTION("Basic test for enabling Panel Replay for eDP displays");
>   
>   #define REPLAY_SETTLE_DELAY 10
> +#define FLIP_FRAME_BEFORE_TEST 60
>   
>   /* Common test data. */
>   struct test_data {
> @@ -50,6 +51,7 @@ enum test_mode {
>   	TEST_MODE_INTERMITTENT_LIVE,
>   	TEST_MODE_CONSTANT_LIVE,
>   	TEST_MODE_SUSPEND,
> +	TEST_MODE_FLIP_ONLY,
>   	TEST_MODE_COUNT
>   };
>   
> @@ -282,6 +284,9 @@ static void run_check_replay(struct test_data *data, enum test_mode test_mode)
>   			 data->flip_fb->fb_id, DRM_MODE_PAGE_FLIP_EVENT, NULL);
>   		kmstest_wait_for_pageflip(data->fd);
>   
> +		/* Do some page flips and let the replay enable */
> +		page_flip_test(data, output, TEST_MODE_FLIP_ONLY, FLIP_FRAME_BEFORE_TEST);
> +
>   		/* Panel Replay state takes some time to settle its value on static screen */
>   		sleep(REPLAY_SETTLE_DELAY);
>   
> @@ -366,7 +371,7 @@ static void run_check_replay_suspend(struct test_data *data)
>   		igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
>   
>   		/* Do some page flip and let the replay go into live mode */
> -		page_flip_test(data, output, TEST_MODE_SUSPEND, 10);
> +		page_flip_test(data, output, TEST_MODE_SUSPEND, FLIP_FRAME_BEFORE_TEST);
>   
>   		/* Panel Replay state takes some time to settle its value on static screen */
>   		sleep(REPLAY_SETTLE_DELAY);


      parent reply	other threads:[~2024-11-04 13:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 15:15 [PATCH i-g-t, v2] tests/amdgpu/amd_replay: Add some page flips before test start Tom Chung
2024-10-30 16:23 ` ✗ GitLab.Pipeline: warning for tests/amdgpu/amd_replay: Add some page flips before test start (rev2) Patchwork
2024-10-30 17:54 ` ✓ CI.xeBAT: success " Patchwork
2024-10-30 17:54 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-30 19:20 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-31  4:54 ` ✗ Fi.CI.IGT: " Patchwork
2024-11-04 13:20 ` Leo Li [this message]

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=b1bbb169-354e-4449-a787-de63bb4d1970@amd.com \
    --to=sunpeng.li@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=alex.hung@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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