From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v4] tests/kms_plane: Add test to validate odd panning
Date: Tue, 25 Mar 2025 14:32:05 +0530 [thread overview]
Message-ID: <424d20b6-b8b8-4e1c-9967-35f065e67c1b@intel.com> (raw)
In-Reply-To: <20250305151708.874294-1-nemesa.garg@intel.com>
Hi Nemesa
Test seems to be failing on LNL
https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12780/shards-all.html?testfilter=odd-panning
Please check.
On 05-03-2025 08:47 pm, Nemesa Garg wrote:
> This feature creates a NV12 plane having two framebuffers
> and moving it to odd position and then do continous flip
> along with the change in the width of framebuffer.
> This is to check whether panning at odd position is
> supported or not.
>
> v2: Add test in kms_plane.[Swati]
> v3: Remove extra parameters[Pranay]
> v4: Add a break condition in loop
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> tests/kms_plane.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 99 insertions(+)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index b9bf025bd..e4555e932 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -88,6 +88,15 @@
> * @format-source-clamping: with source clamping
> */
>
> +/**
> + * SUBTEST: odd-panning
> + * Description: Verify that odd panning in horizontal direction for planar format
> + * Driver requirement: i915, xe
> + * Functionality: plane, panning
> + * Mega feature: General Display Features
We have dropped Test category and Functionality. Please remove them from
documentation.
> + * Test category: functionality test
> + */
> +
> /*
> * Throw away enough lsbs in pixel formats tests
> * to get a match despite some differences between
> @@ -100,6 +109,9 @@
> #define CRTC_RESTRICT_CNT 2
> #define SIM_CRTC_RESTRICT_CNT 1
>
> +#define PLANE_WIDTH 810
> +#define PLANE_HEIGHT 590
> +
> typedef struct {
> float red;
> float green;
> @@ -1330,6 +1342,89 @@ static bool is_pipe_limit_reached(int count)
> return count >= CRTC_RESTRICT_CNT && !all_pipes;
> }
>
> +static void
> +prepare_planes_panning(igt_display_t *display, const enum pipe pipe_id,
> + igt_output_t *output)
> +{
> + igt_plane_t *primary;
> + struct igt_fb primary_fb_1, primary_fb_2;
> + unsigned int fb_id_1, fb_id_2;
> + int j = 0, ret;
> +
> + igt_output_set_pipe(output, pipe_id);
> +
> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +
> + fb_id_1 = igt_create_pattern_fb(display->drm_fd,
> + 800, 590,
> + DRM_FORMAT_NV12,
> + DRM_FORMAT_MOD_LINEAR,
> + &primary_fb_1);
> +
> + fb_id_2 = igt_create_pattern_fb(display->drm_fd,
> + 800, 590,
> + DRM_FORMAT_NV12,
> + DRM_FORMAT_MOD_LINEAR,
> + &primary_fb_2);
> +
> + igt_assert(fb_id_1);
> + igt_assert(fb_id_2);
> +
> + igt_plane_set_fb(primary, &primary_fb_1);
> +
> + igt_plane_set_size(primary, PLANE_WIDTH, PLANE_HEIGHT);
> + igt_plane_set_position(primary, -501, 200);
> +
> + ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +
> + do {
> + if (j % 2 == 0) {
> + igt_plane_set_fb(primary, &primary_fb_1);
> + igt_plane_set_size(primary, PLANE_WIDTH - j, PLANE_HEIGHT);
> + ret = igt_display_try_commit_atomic(display, 0, NULL);
> + if (ret == -22)
> + break;
> + } else {
> + igt_plane_set_fb(primary, &primary_fb_2);
> + igt_plane_set_size(primary, PLANE_WIDTH - j, PLANE_HEIGHT);
> + ret = igt_display_try_commit_atomic(display, 0, NULL);
> + if (ret == -22)
> + break;
> + }
> + j++;
> + } while (j < 20);
> +
> + igt_assert_eq(ret, -22);
> +
> + igt_plane_set_fb(primary, NULL);
> + igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_try_commit2(display, COMMIT_ATOMIC);
> +
> + igt_remove_fb(display->drm_fd, &primary_fb_1);
> + igt_remove_fb(display->drm_fd, &primary_fb_2);
> +}
> +
> +static void run_test_odd_pan(data_t *data)
> +{
> + igt_display_t *display = &data->display;
> + enum pipe pipe;
> + igt_output_t *output;
> +
> + for_each_pipe_with_valid_output(display, pipe, output) {
> + igt_display_reset(display);
> +
> + igt_output_set_pipe(output, pipe);
> + if (!intel_pipe_output_combo_valid(display))
> + continue;
> +
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output))
> + prepare_planes_panning(display, pipe, output);
> +
> + if (pipe == 0)
> + break;
> + }
> +}
> +
> static void run_test(data_t *data, void (*test)(data_t *, enum pipe))
> {
> enum pipe pipe;
> @@ -1408,6 +1503,10 @@ run_tests_for_pipe_plane(data_t *data)
> run_test(data, dynamic_test_handler);
> }
>
> + igt_describe("verify whether odd panning is supported or not");
> + igt_subtest_with_dynamic("odd-panning")
> + run_test_odd_pan(data);
> +
> igt_describe("verify planar settings for pixel format are accepted or rejected correctly");
> igt_subtest_f("planar-pixel-format-settings")
> test_planar_settings(data);
next prev parent reply other threads:[~2025-03-25 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 15:17 [PATCH i-g-t v4] tests/kms_plane: Add test to validate odd panning Nemesa Garg
2025-03-06 5:45 ` ✓ Xe.CI.BAT: success for tests/kms_plane: Add test to validate odd panning (rev2) Patchwork
2025-03-06 6:04 ` ✓ i915.CI.BAT: " Patchwork
2025-03-06 8:51 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-06 12:20 ` ✗ Xe.CI.Full: " Patchwork
2025-03-25 9:02 ` Sharma, Swati2 [this message]
2025-03-27 15:23 ` [PATCH i-g-t v4] tests/kms_plane: Add test to validate odd panning Garg, Nemesa
-- strict thread matches above, loose matches on Subject: below --
2025-03-13 13:54 Nemesa Garg
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=424d20b6-b8b8-4e1c-9967-35f065e67c1b@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nemesa.garg@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