From: Stylon Wang <stylon.wang@amd.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhawanpreet.Lakha@amd.com, Ahmad.Othman@amd.com,
Victor Lu <victorchengchi.lu@amd.com>,
Hayden.Goodfellow@amd.com
Subject: [igt-dev] [PATCH i-g-t v3 04/11] tests/amdgpu/amd_plane: Switch mpo-swizzle-toggle to single-head
Date: Mon, 6 Dec 2021 15:20:11 +0800 [thread overview]
Message-ID: <20211206072018.9053-5-stylon.wang@amd.com> (raw)
In-Reply-To: <20211206072018.9053-1-stylon.wang@amd.com>
From: Victor Lu <victorchengchi.lu@amd.com>
[why]
Older ASIC does not support multi-head MPO
[how]
Rename current mpo-swizzle-toggle subtest to
mpo-swizzle-toggle-multihead. Change mpo-swizzle-toggle to only use one
output.
Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
---
tests/amdgpu/amd_plane.c | 70 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 69 insertions(+), 1 deletion(-)
diff --git a/tests/amdgpu/amd_plane.c b/tests/amdgpu/amd_plane.c
index ba29bdd4..5666b9e7 100644
--- a/tests/amdgpu/amd_plane.c
+++ b/tests/amdgpu/amd_plane.c
@@ -232,7 +232,7 @@ static void test_mpo_4k(data_t *data)
igt_remove_fb(data->fd, &r_fb);
}
-static void test_mpo_swizzle_toggle(data_t *data)
+static void test_mpo_swizzle_toggle_multihead(data_t *data)
{
struct amdgpu_bo_metadata meta = {};
igt_display_t *display = &data->display;
@@ -306,6 +306,72 @@ static void test_mpo_swizzle_toggle(data_t *data)
igt_remove_fb(data->fd, &fb_1920_xr24_tiled);
}
+static void test_mpo_swizzle_toggle(data_t *data)
+{
+ struct amdgpu_bo_metadata meta = {};
+ igt_display_t *display = &data->display;
+ igt_fb_t fb_1280_ar24_tiled, fb_1920_xb24_tiled, fb_1920_xb24_linear,
+ fb_1920_xr24_tiled;
+ int w, h;
+
+ w = 2400;
+ h = 1350;
+
+ igt_create_pattern_fb(data->fd, 1280, 1024, DRM_FORMAT_ARGB8888, 0,
+ &fb_1280_ar24_tiled);
+ igt_create_pattern_fb(data->fd, 1920, 1080, DRM_FORMAT_XBGR8888, 0,
+ &fb_1920_xb24_tiled);
+ igt_create_pattern_fb(data->fd, 1920, 1080, DRM_FORMAT_XBGR8888, 0,
+ &fb_1920_xb24_linear);
+ igt_create_pattern_fb(data->fd, 1920, 1080, DRM_FORMAT_XRGB8888, 0,
+ &fb_1920_xr24_tiled);
+
+ meta.tiling_info = AMDGPU_TILING_SET(SWIZZLE_MODE, 0x19);
+ set_metadata(data, &fb_1280_ar24_tiled, &meta);
+
+ meta.tiling_info = AMDGPU_TILING_SET(SWIZZLE_MODE, 0x19);
+ set_metadata(data, &fb_1920_xb24_tiled, &meta);
+
+ meta.tiling_info = AMDGPU_TILING_SET(SWIZZLE_MODE, 0x19);
+ set_metadata(data, &fb_1920_xr24_tiled, &meta);
+
+ test_init(data);
+
+ /* Initial modeset */
+ igt_output_set_pipe(data->output[0], data->pipe_id[0]);
+ force_output_mode(data, data->output[0], &test_mode_1);
+
+ igt_plane_set_fb(data->primary[0], &fb_1920_xb24_linear);
+ igt_plane_set_size(data->primary[0], w, h);
+
+ igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
+
+ /* Enable overlay plane. */
+ igt_plane_set_fb(data->overlay[0], &fb_1280_ar24_tiled);
+ igt_plane_set_fb(data->primary[0], &fb_1920_xb24_linear);
+ igt_plane_set_size(data->primary[0], w, h);
+ igt_display_commit_atomic(display, 0, 0);
+
+ /* Switch to tiled. */
+ igt_plane_set_fb(data->overlay[0], &fb_1280_ar24_tiled);
+ igt_plane_set_fb(data->primary[0], &fb_1920_xb24_tiled);
+ igt_plane_set_size(data->primary[0], w, h);
+ igt_display_commit_atomic(display, 0, 0);
+
+ /* Switch to linear. */
+ igt_plane_set_fb(data->overlay[0], &fb_1280_ar24_tiled);
+ igt_plane_set_fb(data->primary[0], &fb_1920_xb24_linear);
+ igt_plane_set_size(data->primary[0], w, h);
+ igt_display_commit_atomic(display, 0, 0);
+
+ test_fini(data);
+ igt_remove_fb(data->fd, &fb_1280_ar24_tiled);
+ igt_remove_fb(data->fd, &fb_1920_xb24_tiled);
+ igt_remove_fb(data->fd, &fb_1920_xb24_linear);
+ igt_remove_fb(data->fd, &fb_1920_xr24_tiled);
+}
+
+
igt_main
{
data_t data;
@@ -327,6 +393,8 @@ igt_main
igt_subtest("test-mpo-4k") test_mpo_4k(&data);
igt_subtest("mpo-swizzle-toggle") test_mpo_swizzle_toggle(&data);
+ igt_subtest("mpo-swizzle-toggle-multihead")
+ test_mpo_swizzle_toggle_multihead(&data);
igt_fixture
{
--
2.33.1
next prev parent reply other threads:[~2021-12-06 7:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 7:20 [igt-dev] [PATCH i-g-t v3 00/11] Create tests for multi-plane overlay Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 01/11] tests/amdgpu/amd_plane: Introduced 4K MPO test Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 02/11] tests/amdgpu/amd_plane: Add MPO swizzle mode toggle test Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 03/11] tests/amdgpu/amd_plane: fixes for test-4k-mpo Stylon Wang
2021-12-06 7:20 ` Stylon Wang [this message]
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 05/11] tests/amdgpu/amd_plane: Create mpo panning test Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 06/11] tests/amdgpu/amd_plane: Create mpo swap between 2 displays test Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 07/11] tests/amdgpu/amd_plane: Create mpo scaling tests Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 08/11] tests/amdgpu/amd_plane: Add MPO scale and pan subtest single display option Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 09/11] tests/amdgpu/amd_plane: Add full screen scaling test case Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 10/11] tests/amdgpu/amd_plane: Ensure pipes are enabled before accessing Stylon Wang
2021-12-06 7:20 ` [igt-dev] [PATCH i-g-t v3 11/11] tests/amdgpu/amd_plane: Add P010 format to MPO tests and add test descriptions Stylon Wang
2021-12-06 11:32 ` [igt-dev] ✓ Fi.CI.BAT: success for Create tests for multi-plane overlay (rev2) Patchwork
2021-12-06 13:10 ` [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=20211206072018.9053-5-stylon.wang@amd.com \
--to=stylon.wang@amd.com \
--cc=Ahmad.Othman@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Hayden.Goodfellow@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=victorchengchi.lu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.