From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Swati Sharma <swati2.sharma@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane: enable test for sim env
Date: Thu, 25 May 2023 17:24:15 +0300 [thread overview]
Message-ID: <b8e66d62-55a1-75ef-64f3-638ee9088936@gmail.com> (raw)
In-Reply-To: <20230516115656.229418-1-swati2.sharma@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
On 16.5.2023 14.56, Swati Sharma wrote:
> Lets do some tweaks to enable this test on simulation
> environment.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_plane.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 10e16b63..90b68a47 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -41,7 +41,8 @@
> #define LUT_MASK 0xf800
>
> /* restricted pipe count */
> -#define CRTC_RESTRICT_CNT 2
> +#define CRTC_RESTRICT_CNT 2
> +#define SIM_CRTC_RESTRICT_CNT 1
>
> typedef struct {
> float red;
> @@ -614,7 +615,7 @@ static void capture_crc(data_t *data, unsigned int vblank, igt_crc_t *crc)
> {
> igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc, vblank, crc);
>
> - igt_fail_on_f(!igt_skip_crc_compare &&
> + igt_fail_on_f(!igt_skip_crc_compare && !igt_run_in_simulation() &&
> crc->has_valid_frame && crc->frame != vblank,
> "Got CRC for the wrong frame (got %u, expected %u). CRC buffer overflow?\n",
> crc->frame, vblank);
> @@ -1193,8 +1194,12 @@ static void test_invalid_settings(data_t *data)
> }
> }
>
> -static bool is_pipe_limit_reached(int count) {
> - return count >= CRTC_RESTRICT_CNT && !all_pipes;
> +static bool is_pipe_limit_reached(int count)
> +{
> + if (igt_run_in_simulation())
> + return count >= SIM_CRTC_RESTRICT_CNT && !all_pipes;
> + else
> + return count >= CRTC_RESTRICT_CNT && !all_pipes;
> }
>
> static void run_test(data_t *data, void (*test)(data_t *, enum pipe))
next prev parent reply other threads:[~2023-05-25 14:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 11:56 [igt-dev] [PATCH i-g-t] tests/kms_plane: enable test for sim env Swati Sharma
2023-05-16 12:57 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-16 18:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-25 14:24 ` Juha-Pekka Heikkila [this message]
2023-05-26 7:12 ` [igt-dev] [PATCH i-g-t] " Sharma, Swati2
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=b8e66d62-55a1-75ef-64f3-638ee9088936@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.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