From: Alex Hung <alex.hung@amd.com>
To: Tom Chung <chiahsuan.chung@amd.com>, igt-dev@lists.freedesktop.org
Cc: christian.koenig@amd.com
Subject: Re: [igt-dev] [i-g-t, v4 7/8] tests/amdgpu/amd_freesync_video_mode: Fix wrong resolution setting for some panel
Date: Mon, 10 Jul 2023 11:19:37 -0600 [thread overview]
Message-ID: <ea02f046-82dc-eeee-856e-7aaa0e27b1fa@amd.com> (raw)
In-Reply-To: <20230710075749.2377896-8-chiahsuan.chung@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 2023-07-10 01:57, Tom Chung wrote:
> [Why]
> Some eDP panel VRR range only has 48-60Hz and it will cause some of the test failed.
>
> [How]
> Use the VRR range fps to select the mode for test.
>
> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
> ---
> tests/amdgpu/amd_freesync_video_mode.c | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
>
> diff --git a/tests/amdgpu/amd_freesync_video_mode.c b/tests/amdgpu/amd_freesync_video_mode.c
> index 60b1da589..7716598dc 100644
> --- a/tests/amdgpu/amd_freesync_video_mode.c
> +++ b/tests/amdgpu/amd_freesync_video_mode.c
> @@ -421,11 +421,18 @@ static drmModeModeInfo *select_mode(
> case FSV_NON_FREESYNC_VIDEO_MODE:
> for (i = 0; i < data->count_modes; i++) {
> mode = &data->modes[i];
> - if (mode->hdisplay == data->hdisplay &&
> - mode->vdisplay == data->vdisplay &&
> - mode->vrefresh == refresh_rate &&
> - !is_freesync_video_mode(data, mode))
> - break;
> + if (refresh_rate > 0) {
> + if (mode->hdisplay == data->hdisplay &&
> + mode->vdisplay == data->vdisplay &&
> + mode->vrefresh == refresh_rate &&
> + !is_freesync_video_mode(data, mode))
> + break;
> + } else {
> + if (mode->hdisplay == data->hdisplay &&
> + mode->vdisplay == data->vdisplay &&
> + !is_freesync_video_mode(data, mode))
> + break;
> + }
> }
> if (i >= data->count_modes)
> mode = NULL;
> @@ -780,16 +787,16 @@ mode_transition(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t sce
> mode_playback = select_mode(data, FSV_FREESYNC_VIDEO_MODE, 60);
> break;
> case SCENE_LOWER_FSV_MODE_TO_HIGHER_FSV_MODE:
> - mode_start = select_mode(data, FSV_FREESYNC_VIDEO_MODE, 60);
> - mode_playback = select_mode(data, FSV_FREESYNC_VIDEO_MODE, 120);
> + mode_start = select_mode(data, FSV_FREESYNC_VIDEO_MODE, data->vrr_range.min);
> + mode_playback = select_mode(data, FSV_FREESYNC_VIDEO_MODE, data->vrr_range.max);
> break;
> case SCENE_NON_FSV_MODE_TO_FSV_MODE:
> - mode_start = select_mode(data, FSV_NON_FREESYNC_VIDEO_MODE, 60);
> + mode_start = select_mode(data, FSV_NON_FREESYNC_VIDEO_MODE, 0);
> mode_playback = select_mode(data, FSV_FREESYNC_VIDEO_MODE, 60);
> break;
> case SCENE_BASE_MODE_TO_CUSTUM_MODE:
> mode_start = select_mode(data, FSV_BASE_MODE, 0);
> - ret = prepare_custom_mode(data, &mode_custom, 72);
> + ret = prepare_custom_mode(data, &mode_custom, data->vrr_range.min);
> igt_assert_eq(ret, 0);
> mode_playback = &mode_custom;
> break;
next prev parent reply other threads:[~2023-07-10 17:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 7:57 [igt-dev] [i-g-t,v4 0/8] Fix some bugs in amd_freesync_video_mode Tom Chung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 1/8] tests/amdgpu/amd_freesync_video_mode: Adjust indents and spacing Tom Chung
2023-07-10 17:13 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 2/8] tests/amdgpu/amd_freesync_video_mode: Fix memory leak and corruption Tom Chung
2023-07-10 17:16 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 3/8] tests/amdgpu/amd_freesync_video_mode: Fix wrong resolution setting during the test Tom Chung
2023-07-10 17:16 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 4/8] tests/amdgpu/amd_freesync_video_mode: Add some code from kms_vrr to resolve tearing issue Tom Chung
2023-07-10 17:17 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 5/8] tests/amdgpu/amd_freesync_video_mode: Add/remove some test progress messages Tom Chung
2023-07-10 17:18 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 6/8] tests/amdgpu/amd_freesync_video_mode: Move the vrr setting and display reset Tom Chung
2023-07-10 17:19 ` Alex Hung
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 7/8] tests/amdgpu/amd_freesync_video_mode: Fix wrong resolution setting for some panel Tom Chung
2023-07-10 17:19 ` Alex Hung [this message]
2023-07-10 7:57 ` [igt-dev] [i-g-t, v4 8/8] tests/amdgpu/amd_freesync_video_mode: Add amd_freesync_video_mode to meson.build Tom Chung
2023-07-10 17:19 ` Alex Hung
2023-07-10 8:50 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix some bugs in amd_freesync_video_mode (rev3) Patchwork
2023-07-10 9:26 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-10 10:13 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
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=ea02f046-82dc-eeee-856e-7aaa0e27b1fa@amd.com \
--to=alex.hung@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=christian.koenig@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