Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Esteve <aesteve@redhat.com>
To: igt-dev@lists.freedesktop.org
Cc: belmouss@redhat.com, Albert Esteve <aesteve@redhat.com>,
	javierm@redhat.com
Subject: [igt-dev] [PATCH 2/3] igt_kms: add hotspot plane property
Date: Fri, 21 Jul 2023 15:04:57 +0200	[thread overview]
Message-ID: <20230721130458.64856-3-aesteve@redhat.com> (raw)
In-Reply-To: <20230721130458.64856-1-aesteve@redhat.com>

Add HOTSPOT_X and HOTSPOT_Y properties
to the atomic_plane_properties struct.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
---
 lib/igt_kms.c | 9 +++++++++
 lib/igt_kms.h | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index f2b0eed57..0bda9ab15 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -601,6 +601,8 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_CRTC_Y] = "CRTC_Y",
 	[IGT_PLANE_CRTC_W] = "CRTC_W",
 	[IGT_PLANE_CRTC_H] = "CRTC_H",
+	[IGT_PLANE_HOTSPOT_X] = "HOTSPOT_X",
+	[IGT_PLANE_HOTSPOT_Y] = "HOTSPOT_Y",
 	[IGT_PLANE_FB_ID] = "FB_ID",
 	[IGT_PLANE_CRTC_ID] = "CRTC_ID",
 	[IGT_PLANE_IN_FENCE_FD] = "IN_FENCE_FD",
@@ -2296,6 +2298,11 @@ static void igt_plane_reset(igt_plane_t *plane)
 	if (igt_plane_has_prop(plane, IGT_PLANE_SCALING_FILTER))
 		igt_plane_set_prop_enum(plane, IGT_PLANE_SCALING_FILTER, "Default");
 
+	if (igt_plane_has_prop(plane, IGT_PLANE_HOTSPOT_X))
+		igt_plane_set_prop_value(plane, IGT_PLANE_HOTSPOT_X, 0);
+	if (igt_plane_has_prop(plane, IGT_PLANE_HOTSPOT_Y))
+		igt_plane_set_prop_value(plane, IGT_PLANE_HOTSPOT_Y, 0);
+
 	igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD);
 	plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
 	plane->gem_handle = 0;
@@ -2679,6 +2686,8 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
 	if (drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1) == 0)
 		display->is_atomic = 1;
+	
+	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1);
 
 	plane_resources = drmModeGetPlaneResources(display->drm_fd);
 	igt_assert(plane_resources);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1b6988c17..b64be84b3 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -318,7 +318,9 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_ZPOS,
        IGT_PLANE_FB_DAMAGE_CLIPS,
        IGT_PLANE_SCALING_FILTER,
-       IGT_NUM_PLANE_PROPS
+       IGT_PLANE_HOTSPOT_X,
+       IGT_PLANE_HOTSPOT_Y,
+       IGT_NUM_PLANE_PROPS      
 };
 
 /**
-- 
2.40.0

  parent reply	other threads:[~2023-07-21 13:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 13:04 [igt-dev] [PATCH 0/3] Add atomic DRM cursor hotspot test Albert Esteve
2023-07-21 13:04 ` [igt-dev] [PATCH 1/3] drm header update: temp commit Albert Esteve
2023-07-28  7:41   ` Zbigniew Kempczyński
2023-07-28  7:57     ` Albert Esteve
2023-07-28  8:31       ` Zbigniew Kempczyński
2023-07-21 13:04 ` Albert Esteve [this message]
2023-07-25 13:40   ` [igt-dev] [PATCH 2/3] igt_kms: add hotspot plane property Javier Martinez Canillas
2023-07-26 14:42     ` Albert Esteve
2023-07-21 13:04 ` [igt-dev] [PATCH 3/3] kms_cursor_legacy: modeset-atomic-cursor-hotspot Albert Esteve
2023-07-25 14:26   ` Javier Martinez Canillas
2023-07-26 14:50     ` Albert Esteve
2023-07-26 14:53       ` Javier Martinez Canillas
2023-07-24 12:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add atomic DRM cursor hotspot test Patchwork
2023-07-24 17:02 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-25 15:51 ` [igt-dev] [PATCH 0/3] " Kamil Konieczny
2023-07-26 14:52   ` Albert Esteve

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=20230721130458.64856-3-aesteve@redhat.com \
    --to=aesteve@redhat.com \
    --cc=belmouss@redhat.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=javierm@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox