From: yaolu@kylinos.cn
To: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de
Cc: airlied@gmail.com, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Lu Yao <yaolu@kylinos.cn>
Subject: [PATCH] drm/atomic: determine the hotspots attribute first
Date: Mon, 11 May 2026 10:19:26 +0800 [thread overview]
Message-ID: <20260511021926.67673-1-yaolu@kylinos.cn> (raw)
From: Lu Yao <yaolu@kylinos.cn>
If drm driver has both 'DRIVER_CURSOR_HOTSPOT' and
'atomic_set/get_property' will cause hotspots property
set/get error.
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
drivers/gpu/drm/drm_atomic_uapi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9e9b2f3f106c..21b6b79f5f9e 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -548,9 +548,6 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
return ret;
} else if (property == plane->scaling_filter_property) {
state->scaling_filter = val;
- } else if (plane->funcs->atomic_set_property) {
- return plane->funcs->atomic_set_property(plane, state,
- property, val);
} else if (property == plane->hotspot_x_property) {
if (plane->type != DRM_PLANE_TYPE_CURSOR) {
drm_dbg_atomic(plane->dev,
@@ -567,6 +564,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
return -EINVAL;
}
state->hotspot_y = val;
+ } else if (plane->funcs->atomic_set_property) {
+ return plane->funcs->atomic_set_property(plane, state,
+ property, val);
} else {
drm_dbg_atomic(plane->dev,
"[PLANE:%d:%s] unknown property [PROP:%d:%s]\n",
@@ -625,12 +625,12 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
state->fb_damage_clips->base.id : 0;
} else if (property == plane->scaling_filter_property) {
*val = state->scaling_filter;
- } else if (plane->funcs->atomic_get_property) {
- return plane->funcs->atomic_get_property(plane, state, property, val);
} else if (property == plane->hotspot_x_property) {
*val = state->hotspot_x;
} else if (property == plane->hotspot_y_property) {
*val = state->hotspot_y;
+ } else if (plane->funcs->atomic_get_property) {
+ return plane->funcs->atomic_get_property(plane, state, property, val);
} else {
drm_dbg_atomic(dev,
"[PLANE:%d:%s] unknown property [PROP:%d:%s]\n",
--
2.25.1
next reply other threads:[~2026-05-11 2:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 2:19 yaolu [this message]
2026-05-16 5:55 ` Claude review: drm/atomic: determine the hotspots attribute first Claude Code Review Bot
2026-05-16 5:55 ` Claude Code Review Bot
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=20260511021926.67673-1-yaolu@kylinos.cn \
--to=yaolu@kylinos.cn \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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