From: Rob Clark <robdclark@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: Rob Clark <robdclark@chromium.org>
Subject: [PATCH 2/2] tests/kms_plane_scaling: Improve msm support
Date: Mon, 19 Aug 2024 13:25:46 -0700 [thread overview]
Message-ID: <20240819202546.111243-2-robdclark@gmail.com> (raw)
In-Reply-To: <20240819202546.111243-1-robdclark@gmail.com>
From: Rob Clark <robdclark@chromium.org>
This may undercount number of scalars on hw with rgb pipes, but the
scaling on yuv and rgb pipes is functionally equivalent, so for test
coverage this is a good enough approximation.
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
lib/igt_kms.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 99cdeeb76033..dd530dbabf89 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6682,6 +6682,25 @@ int get_num_scalers(igt_display_t *display, enum pipe pipe)
igt_assert(start_loc2 = strstr(start_loc1, "num_scalers="));
igt_assert_eq(sscanf(start_loc2, "num_scalers=%d", &num_scalers), 1);
}
+ } else if (is_msm_device(drm_fd)) {
+ igt_plane_t *plane;
+
+ /*
+ * msm devices have dma pipes (no csc, no scaling), rgb
+ * pipes (no csc, has scaling), and vid pipes (has csc,
+ * has scaling), but not all devices have rgb pipes.
+ * We can use the # of pipes that support YUV formats
+ * as a rough approximation of the # of scalars.. it may
+ * undercount on some hw, but it will not overcount
+ */
+ for_each_plane_on_pipe(display, pipe, plane) {
+ for (unsigned i = 0; i < plane->format_mod_count; i++) {
+ if (igt_format_is_yuv(plane->formats[i])) {
+ num_scalers++;
+ break;
+ }
+ }
+ }
}
return num_scalers;
--
2.46.0
next prev parent reply other threads:[~2024-08-19 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 20:25 [PATCH 1/2] tests/kms_plane_scaling: Pass display to get_num_scalers() Rob Clark
2024-08-19 20:25 ` Rob Clark [this message]
2024-08-20 10:02 ` [PATCH 2/2] tests/kms_plane_scaling: Improve msm support Kamil Konieczny
2024-08-19 22:28 ` ✓ CI.xeBAT: success for series starting with [1/2] tests/kms_plane_scaling: Pass display to get_num_scalers() Patchwork
2024-08-19 22:46 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-20 5:58 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-20 11:26 ` ✗ 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=20240819202546.111243-2-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=robdclark@chromium.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.