From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
To: <igt-dev@lists.freedesktop.org>, <rodrigo.siqueira@amd.com>,
<sunpeng.li@amd.com>, <harry.wentland@amd.com>,
<nicholas.kazlauskas@amd.com>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Subject: [igt-dev] [PATCH 2/2] amdgpu_amd_plane: Add Multi MPO invalid test
Date: Mon, 13 Feb 2023 13:16:51 -0500 [thread overview]
Message-ID: <20230213181651.863367-2-Bhawanpreet.Lakha@amd.com> (raw)
In-Reply-To: <20230213181651.863367-1-Bhawanpreet.Lakha@amd.com>
[Why]
We cannot draw cursor on a video plane so if the usermode trys to use
the topmost plane as a video plane we should reject that commit
[How]
Trying to use a video format (NV12) as the topmost plane should fail
atomic check
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Change-Id: Ida52c3cbb6e59ed4759496e2a3fc35255bf522e0
---
tests/amdgpu/amd_plane.c | 55 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/tests/amdgpu/amd_plane.c b/tests/amdgpu/amd_plane.c
index d34cd1d9..46f90c6c 100644
--- a/tests/amdgpu/amd_plane.c
+++ b/tests/amdgpu/amd_plane.c
@@ -557,6 +557,57 @@ static void test_panning_2_display(data_t *data, int w, int h, struct fbc *fbc)
}
+/*
+ * This tests invalid plane format order
+ *
+ * Since we cannot draw a cursor on a video plane the top most plane cannot be a video plane.
+ * This test trys to commit a configuration where the topmost plane is a video plane. This is
+ * expected to fail since we do not support that configuration.
+ */
+static void test_multi_mpo_invalid(data_t *data)
+{
+ igt_display_t *display = &data->display;
+ igt_output_t *output;
+ uint32_t regamma_lut_size;
+ lut_t lut;
+ struct fbc fb[4];
+ int valid_outputs = 0;
+ int w, h;
+ int ret;
+
+ test_init(data);
+
+ w = data->w[0];
+ h = data->h[0];
+
+ /* Skip test if we don't have 2 overlay planes */
+ igt_skip_on(!data->overlay2[0]);
+
+ igt_output_set_pipe(data->output[0], data->pipe_id[0]);
+
+ igt_create_color_fb(data->fd, w, h, DRM_FORMAT_XRGB8888, 0, 1.0, 1.0, 1.0, &fb[0].test_primary);
+ igt_create_fb(data->fd, w, h, DRM_FORMAT_NV12, 0, &fb[0].test_overlay);
+
+ /* Top most plane is NV12 (video plane) */
+ igt_create_fb(data->fd, w, h, DRM_FORMAT_NV12, 0, &fb[0].test_overlay2);
+
+ igt_plane_set_fb(data->primary[0], &fb[0].test_primary);
+ igt_plane_set_fb(data->overlay[0], &fb[0].test_overlay);
+ igt_plane_set_fb(data->overlay2[0], &fb[0].test_overlay2);
+
+ /* This should fail as the topmost plane is NV12 */
+ ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+
+ if (!ret)
+ igt_assert(0);
+
+ test_fini(data);
+
+ igt_remove_fb(data->fd, &fb[0].test_primary);
+ igt_remove_fb(data->fd, &fb[0].test_overlay);
+ igt_remove_fb(data->fd, &fb[0].test_overlay2);
+}
+
/*
* Setup and runner for panning test. Creates common video sizes and pans them across the display
*/
@@ -924,6 +975,10 @@ igt_main
igt_subtest("multi-mpo")
test_display_mpo(&data, MPO_MULTI_OVERLAY, DRM_FORMAT_NV12, 1);
+ igt_describe("Multi MPO invalid");
+ igt_subtest("multi-mpo-invalid")
+ test_multi_mpo_invalid(&data);
+
igt_describe("MPO and scaling RGB primary plane");
igt_subtest("mpo-scale-rgb")
test_display_mpo(&data, MPO_SCALE, DRM_FORMAT_XRGB8888, 1);
--
2.25.1
next prev parent reply other threads:[~2023-02-13 18:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 18:16 [igt-dev] [PATCH 1/2] amdgpu/amd_plane: Add multi MPO XRGB8888 test Bhawanpreet Lakha
2023-02-13 18:16 ` Bhawanpreet Lakha [this message]
2023-02-17 20:38 ` [igt-dev] [PATCH 2/2] amdgpu_amd_plane: Add Multi MPO invalid test Leo Li
2023-03-23 17:30 ` Bhawanpreet Lakha
2023-02-13 19:33 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2] amdgpu/amd_plane: Add multi MPO XRGB8888 test Patchwork
2023-02-13 21:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-17 20:24 ` [igt-dev] [PATCH 1/2] " Leo Li
2023-02-17 20:43 ` Bhawanpreet Lakha
2023-03-13 16:32 ` Bhawanpreet Lakha
2023-03-15 20:30 ` Leo Li
2023-03-15 21:02 ` Bhawanpreet Lakha
2023-03-23 17:29 ` Bhawanpreet Lakha
2023-03-23 17:36 ` Leo Li
2023-03-13 17:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2] amdgpu/amd_plane: Add multi MPO XRGB8888 test (rev2) Patchwork
2023-03-14 20:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-03-17 17:26 ` [igt-dev] [PATCH 1/2] amdgpu/amd_plane: Add multi MPO XRGB8888 test Kamil Konieczny
2023-03-23 18:09 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2] amdgpu/amd_plane: Add multi MPO XRGB8888 test (rev4) Patchwork
2023-03-23 23:41 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230213181651.863367-2-Bhawanpreet.Lakha@amd.com \
--to=bhawanpreet.lakha@amd.com \
--cc=harry.wentland@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nicholas.kazlauskas@amd.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