drm/object: Add drm_object_property_get_default_value() function
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 21 Feb 2022 09:59:02 +0000 (10:59 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 25 Feb 2022 16:55:42 +0000 (17:55 +0100)
commitadf47b75297ebc71c53b6dc2d3c55f42b8fb79fd
tree36431419fe1a978bd2e82c1b71ef3e105afad1fb
parentf6e63222c0a042098eaeea58f66116902208e2f5
drm/object: Add drm_object_property_get_default_value() function

Some functions to create properties (drm_plane_create_zpos_property or
drm_plane_create_color_properties for example) will ask for a range of
acceptable value and an initial one.

This initial value is then stored in the values array for that property.

Let's provide an helper to access this property.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-7-maxime@cerno.tech
drivers/gpu/drm/drm_mode_object.c
include/drm/drm_mode_object.h