From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] drm/mode_object: add drm_object_immutable_property_get_value()
Date: Tue, 6 Jan 2026 08:24:17 +0100 [thread overview]
Message-ID: <bc484bfe-5fd5-42c7-9068-ca4e7984b774@suse.de> (raw)
In-Reply-To: <20260106-drm-fix-lut-checks-v3-1-f7f979eb73c8@oss.qualcomm.com>
Am 06.01.26 um 04:09 schrieb Dmitry Baryshkov:
> We have a helper to get property values for non-atomic drivers and
> another one default property values for atomic drivers. In some cases we
> need the ability to get value of immutable property, no matter what kind
> of driver it is. Implement new property-related helper,
> drm_object_immutable_property_get_value(), which lets the caller to get
> the value of the immutable property.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_mode_object.c | 25 +++++++++++++++++++++++++
> include/drm/drm_mode_object.h | 3 +++
> 2 files changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> index b45d501b10c8..2d943a610b88 100644
> --- a/drivers/gpu/drm/drm_mode_object.c
> +++ b/drivers/gpu/drm/drm_mode_object.c
> @@ -385,6 +385,31 @@ int drm_object_property_get_default_value(struct drm_mode_object *obj,
> }
> EXPORT_SYMBOL(drm_object_property_get_default_value);
>
> +/**
> + * drm_object_immutable_property_get_value - retrieve the value of a property
> + * @obj: drm mode object to get property value from
> + * @property: property to retrieve
> + * @val: storage for the property value
> + *
> + * This function retrieves the software state of the given immutable property
> + * for the given mode object.
> + *
> + * This function can be called by both atomic and non-atomic drivers.
> + *
> + * Returns:
> + * Zero on success, error code on failure.
> + */
> +int drm_object_immutable_property_get_value(struct drm_mode_object *obj,
> + struct drm_property *property,
> + uint64_t *val)
> +{
> + if (drm_WARN_ON(property->dev, !(property->flags & DRM_MODE_PROP_IMMUTABLE)))
> + return -EINVAL;
> +
> + return __drm_object_property_get_prop_value(obj, property, val);
> +}
> +EXPORT_SYMBOL(drm_object_immutable_property_get_value);
> +
> /* helper for getconnector and getproperties ioctls */
> int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic,
> bool plane_color_pipeline,
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index c68edbd126d0..44a0d6f8d01f 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -133,6 +133,9 @@ int drm_object_property_get_value(struct drm_mode_object *obj,
> int drm_object_property_get_default_value(struct drm_mode_object *obj,
> struct drm_property *property,
> uint64_t *val);
> +int drm_object_immutable_property_get_value(struct drm_mode_object *obj,
> + struct drm_property *property,
> + uint64_t *val);
>
> void drm_object_attach_property(struct drm_mode_object *obj,
> struct drm_property *property,
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-01-06 7:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 3:09 [PATCH v3 0/3] drm/atomic: restrict the size of of gamma / degamma LUTs Dmitry Baryshkov
2026-01-06 3:09 ` [PATCH v3 1/3] drm/mode_object: add drm_object_immutable_property_get_value() Dmitry Baryshkov
2026-01-06 7:24 ` Thomas Zimmermann [this message]
2026-01-06 3:09 ` [PATCH v3 2/3] drm/atomic: add max_size check to drm_property_replace_blob_from_id() Dmitry Baryshkov
2026-01-06 7:24 ` Thomas Zimmermann
2026-01-06 3:09 ` [PATCH v3 3/3] drm/atomic: verify that gamma/degamma LUTs are not too big Dmitry Baryshkov
2026-01-06 7:25 ` Thomas Zimmermann
2026-01-14 0:19 ` [PATCH v3 0/3] drm/atomic: restrict the size of of gamma / degamma LUTs Dmitry Baryshkov
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=bc484bfe-5fd5-42c7-9068-ca4e7984b774@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.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
all inboxes | Powered by JetHome®