From: Stylon Wang <stylon.wang@amd.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhawanpreet.Lakha@amd.com, Ahmad.Othman@amd.com,
Anson Jacob <Anson.Jacob@amd.com>,
Hayden.Goodfellow@amd.com
Subject: [igt-dev] [PATCH i-g-t v3 10/11] tests/amdgpu/amd_plane: Ensure pipes are enabled before accessing
Date: Mon, 6 Dec 2021 15:20:17 +0800 [thread overview]
Message-ID: <20211206072018.9053-11-stylon.wang@amd.com> (raw)
In-Reply-To: <20211206072018.9053-1-stylon.wang@amd.com>
From: Anson Jacob <Anson.Jacob@amd.com>
Couple of tests were accessing pipe's without ensuring if they are
enabled or not. Using for_each_pipe macro to do so.
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
---
tests/amdgpu/amd_plane.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/amdgpu/amd_plane.c b/tests/amdgpu/amd_plane.c
index 66302ebf..e4c7dca3 100644
--- a/tests/amdgpu/amd_plane.c
+++ b/tests/amdgpu/amd_plane.c
@@ -150,9 +150,9 @@ static void test_init(data_t *data)
igt_display_t *display = &data->display;
int i, n, max_pipes = display->n_pipes;
- for (i = 0; i < max_pipes; ++i) {
+ for_each_pipe(display, i) {
data->pipe_id[i] = PIPE_A + i;
- data->pipe[i] = &data->display.pipes[data->pipe_id[i]];
+ data->pipe[i] = &display->pipes[data->pipe_id[i]];
data->primary[i] = igt_pipe_get_plane_type(
data->pipe[i], DRM_PLANE_TYPE_PRIMARY);
data->overlay[i] = igt_pipe_get_plane_type_index(
@@ -188,9 +188,9 @@ static void test_init(data_t *data)
static void test_fini(data_t *data)
{
igt_display_t *display = &data->display;
- int i, max_pipes = display->n_pipes;
+ int i;
- for (i = 0; i < max_pipes; ++i) {
+ for_each_pipe(display, i) {
igt_pipe_crc_free(data->pipe_crc[i]);
}
--
2.33.1
next prev parent reply other threads:[~2021-12-06 7:21 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 ` [igt-dev] [PATCH i-g-t v3 04/11] tests/amdgpu/amd_plane: Switch mpo-swizzle-toggle to single-head Stylon Wang
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 ` Stylon Wang [this message]
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-11-stylon.wang@amd.com \
--to=stylon.wang@amd.com \
--cc=Ahmad.Othman@amd.com \
--cc=Anson.Jacob@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Hayden.Goodfellow@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 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.