From: Harry Wentland <harry.wentland@amd.com>
To: <igt-dev@lists.freedesktop.org>
Subject: [igt-dev] [RFC PATCH v3 02/12] lib/igt_kms: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
Date: Wed, 8 Nov 2023 11:39:51 -0500 [thread overview]
Message-ID: <20231108164006.106967-3-harry.wentland@amd.com> (raw)
In-Reply-To: <20231108164006.106967-1-harry.wentland@amd.com>
We don't want to set this by default since existing tests
might require COLOR_RANGE and COLOR_ENCODING plane properties.
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
---
include/drm-uapi/drm.h | 15 +++++++++++++++
lib/igt_kms.c | 4 ++++
lib/igt_kms.h | 1 +
3 files changed, 20 insertions(+)
diff --git a/include/drm-uapi/drm.h b/include/drm-uapi/drm.h
index 02540248deb1..002337cc9709 100644
--- a/include/drm-uapi/drm.h
+++ b/include/drm-uapi/drm.h
@@ -836,6 +836,21 @@ struct drm_get_cap {
*/
#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
+/**
+ * DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
+ *
+ * If set to 1, the DRM core will
+ * - expose plane COLOR_PIPELINE properties for pre-blending color management.
+ * - reject setting of these plane properties:
+ * - COLOR_ENCODING
+ * - COLOR_RANGE
+ *
+ * The client must enable &DRM_CLIENT_CAP_ATOMIC first.
+ *
+ * This capability is currently in development.
+ */
+#define DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE 7
+
/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap {
__u64 capability;
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 453103f900a6..033fa1e236e8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2797,6 +2797,10 @@ void igt_display_require(igt_display_t *display, int drm_fd)
if (drmSetClientCap(drm_fd, LOCAL_DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1) == 0)
display->has_virt_cursor_plane = 1;
+ if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE, 1) == 0)
+ display->has_plane_color_pipeline = 1;
+
+
plane_resources = drmModeGetPlaneResources(display->drm_fd);
igt_assert(plane_resources);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 9028ab9be40a..0ebb2c640b81 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -464,6 +464,7 @@ struct igt_display {
bool has_cursor_plane;
bool is_atomic;
bool has_virt_cursor_plane;
+ bool has_plane_color_pipeline;
bool first_commit;
uint64_t *modifiers;
--
2.42.0
next prev parent reply other threads:[~2023-11-08 16:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 16:39 [igt-dev] [RFC PATCH v3 00/12] IGT tests for the KMS Color Pipeline API Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 01/12] lib/drmtest: Add is_vkms_device() Harry Wentland
2023-11-08 16:39 ` Harry Wentland [this message]
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 03/12] include/drm-uapi: Add COLOROP object Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 04/12] lib/igt_kms: Introduce drm_colorop and COLOR_PIPELINE Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 05/12] tests/kms_properties: Add colorop properties test Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 06/12] igt/color: Add SW color transform functionality Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 07/12] lib/igt_fb: Add copy_fb function Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 08/12] tests/kms_colorop: Add kms_colorop tests Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 09/12] drm-uapi: Add 3x4 CTM Harry Wentland
2023-11-08 16:39 ` [igt-dev] [RFC PATCH v3 10/12] lib/igt_kms: Add support for DATA colorop property Harry Wentland
2023-11-08 16:40 ` [igt-dev] [RFC PATCH v3 11/12] lib/igt_color: Add support for 3x4 matrices Harry Wentland
2023-11-08 16:40 ` [igt-dev] [RFC PATCH v3 12/12] tests/kms_colorop: Add 3x4 CTM tests Harry Wentland
2023-11-08 17:56 ` [igt-dev] ✗ GitLab.Pipeline: warning for IGT tests for the KMS Color Pipeline API (rev3) Patchwork
2023-11-08 18:23 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-08 18:40 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2024-02-09 16:32 ` [igt-dev] [RFC PATCH v3 00/12] IGT tests for the KMS Color Pipeline API Modem, Bhanuprakash
2024-02-09 16:50 ` 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=20231108164006.106967-3-harry.wentland@amd.com \
--to=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