From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Harry Wentland <harry.wentland@amd.com>
Subject: [RFC v4 05/22] tests/kms_properties: Add colorop properties test
Date: Wed, 14 Feb 2024 12:09:36 +0530 [thread overview]
Message-ID: <20240214063953.1285495-6-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240214063953.1285495-1-bhanuprakash.modem@intel.com>
From: Harry Wentland <harry.wentland@amd.com>
We've introduced the concept of a new DRM core object, the
drm_colorop, to represent a color operation as part of a
color pipeline.
Add new tests to kms_properties to test the properties of
a drm_colorop object.
v3:
- Update test to work without new libdrm definitions for
colorop objects
- Test colorop properties with both atomic and legacy
code paths
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
---
tests/kms_properties.c | 71 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index bd414f534..e33503303 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -49,6 +49,7 @@
* @crtc: CRTC
* @plane: Plane
* @invalid: Invalid (connector/crtc/plane)
+ * @colorop: Colorop
*
* arg[2]:
*
@@ -221,6 +222,39 @@ static void test_properties(int fd, uint32_t type, uint32_t id, bool atomic)
}
}
+static void run_colorop_property_tests(igt_display_t *display, enum pipe pipe, igt_output_t *output, bool atomic)
+{
+ struct igt_fb fb;
+ igt_plane_t *plane;
+ igt_colorop_t *colorop;
+ int i;
+ int colorop_id = 0;
+
+ prepare_pipe(display, pipe, output, &fb);
+
+ for_each_plane_on_pipe(display, pipe, plane) {
+ igt_info("Testing colorop properties on plane %s.#%d-%s (output: %s)\n",
+ kmstest_pipe_name(pipe), plane->index, kmstest_plane_type_name(plane->type), output->name);
+
+ /* iterate over all color pipelines on plane */
+ for (i = 0; i < plane->num_color_pipelines; ++i) {
+ /* iterate over all colorops in pipeline*/
+ colorop = plane->color_pipelines[i];
+ while (colorop) {
+ igt_info("Testing colorop properties on %s.#%d.#%d-%s (output: %s)\n",
+ kmstest_pipe_name(pipe), plane->index, colorop->id, kmstest_plane_type_name(plane->type), output->name);
+ test_properties(display->drm_fd, DRM_MODE_OBJECT_COLOROP, colorop->id, atomic);
+
+ colorop_id = igt_colorop_get_prop(display, colorop,
+ IGT_COLOROP_NEXT);
+ colorop = igt_find_colorop(display, colorop_id);
+ }
+ }
+ }
+
+ cleanup_pipe(display, pipe, output, &fb);
+}
+
static void run_plane_property_tests(igt_display_t *display, enum pipe pipe, igt_output_t *output, bool atomic)
{
struct igt_fb fb;
@@ -266,6 +300,35 @@ static void run_connector_property_tests(igt_display_t *display, enum pipe pipe,
cleanup_pipe(display, pipe, output, &fb);
}
+static void colorop_properties(igt_display_t *display, bool atomic)
+{
+ bool found_any = false, found;
+ igt_output_t *output;
+ enum pipe pipe;
+
+ /* colorops are only available with atomic */
+ igt_skip_on(!display->is_atomic);
+
+ for_each_pipe(display, pipe) {
+ found = false;
+
+ for_each_valid_output_on_pipe(display, pipe, output) {
+ igt_display_reset(display);
+
+ igt_output_set_pipe(output, pipe);
+ if (!i915_pipe_output_combo_valid(display))
+ continue;
+
+ found_any = found = true;
+
+ run_colorop_property_tests(display, pipe, output, atomic);
+ break;
+ }
+ }
+
+ igt_skip_on(!found_any);
+}
+
static void plane_properties(igt_display_t *display, bool atomic)
{
bool found_any = false, found;
@@ -799,6 +862,14 @@ igt_main
igt_subtest("plane-properties-atomic")
plane_properties(&display, true);
+ igt_describe("Tests colorop properties with atomic commit");
+ igt_subtest("colorop-properties-atomic")
+ colorop_properties(&display, true);
+
+ igt_describe("Tests colorop properties with legacy commit");
+ igt_subtest("colorop-properties-legacy")
+ colorop_properties(&display, false);
+
igt_describe("Tests crtc properties with legacy commit");
igt_subtest("crtc-properties-legacy")
crtc_properties(&display, false);
--
2.43.0
next prev parent reply other threads:[~2024-02-14 6:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 6:39 [RFC v4 00/22] IGT tests for the KMS Color Pipeline API Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 01/22] lib/drmtest: Add is_vkms_device() Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 02/22] lib/igt_kms: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 03/22] include/drm-uapi: Add COLOROP object Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 04/22] lib/igt_kms: Introduce drm_colorop and COLOR_PIPELINE Bhanuprakash Modem
2024-02-14 6:39 ` Bhanuprakash Modem [this message]
2024-02-14 6:39 ` [RFC v4 06/22] igt/color: Add SW color transform functionality Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 07/22] lib/igt_fb: Add copy_fb function Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 08/22] tests/kms_colorop: Add kms_colorop tests Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 09/22] drm-uapi: Add 3x4 CTM Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 10/22] lib/igt_kms: Add support for DATA colorop property Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 11/22] lib/igt_color: Add support for 3x4 matrices Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 12/22] tests/kms_colorop: Add 3x4 CTM tests Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 13/22] tests/kms_properties: Fix compilation errors Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 14/22] lib/igt_kms: Destroy colorops on exit Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 15/22] lib/colorops: Move few helpers to common place to reuse Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 16/22] drm-uapi: Add 3x3 CTM Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 17/22] drm-uapi: Add custom 1D LUT Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 18/22] lib/igt_color: Add support for 3x3 matrices Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 19/22] lib/colorops: Add support for Custom 1D LUT Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 20/22] lib/igt_kms: Increase the colorops count Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 21/22] tests/kms_color_helper: Add helpers to clear colorops data Bhanuprakash Modem
2024-02-14 6:39 ` [RFC v4 22/22] tests/kms_color: Add plane color pipeline tests for Intel hardware Bhanuprakash Modem
2024-02-14 7:21 ` ✓ CI.xeBAT: success for IGT tests for the KMS Color Pipeline API (rev4) Patchwork
2024-02-14 7:28 ` ✓ Fi.CI.BAT: " Patchwork
2024-02-14 9:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-20 20:28 ` [RFC v4 00/22] IGT tests for the KMS Color Pipeline API Harry Wentland
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=20240214063953.1285495-6-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=harry.wentland@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox