drm_colorops use immutable properties, for type and next.
Even though drivers create these properties at initialization
they will need to look at the properties when parsing a
color pipeline for programming during an atomic check
or commit operation.

This aligns the get_value call with behavior of the set_value
call.

Signed-off-by: Harry Wentland <[email protected]>
Cc: Ville Syrjala <[email protected]>
Cc: Pekka Paalanen <[email protected]>
Cc: Simon Ser <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Melissa Wen <[email protected]>
Cc: Jonas Ådahl <[email protected]>
Cc: Sebastian Wick <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Alexander Goins <[email protected]>
Cc: Joshua Ashton <[email protected]>
Cc: Michel Dänzer <[email protected]>
Cc: Aleix Pol <[email protected]>
Cc: Xaver Hugl <[email protected]>
Cc: Victoria Brekenfeld <[email protected]>
Cc: Sima <[email protected]>
Cc: Uma Shankar <[email protected]>
Cc: Naseer Ahmed <[email protected]>
Cc: Christopher Braga <[email protected]>
Cc: Abhinav Kumar <[email protected]>
Cc: Arthur Grillo <[email protected]>
Cc: Hector Martin <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Sasha McIntosh <[email protected]>
---
 drivers/gpu/drm/drm_mode_object.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mode_object.c 
b/drivers/gpu/drm/drm_mode_object.c
index ac0d2ce3f870..c9b1cd48547a 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -351,7 +351,8 @@ static int __drm_object_property_get_value(struct 
drm_mode_object *obj,
 int drm_object_property_get_value(struct drm_mode_object *obj,
                                  struct drm_property *property, uint64_t *val)
 {
-       WARN_ON(drm_drv_uses_atomic_modeset(property->dev));
+       WARN_ON(drm_drv_uses_atomic_modeset(property->dev) &&
+               !(property->flags & DRM_MODE_PROP_IMMUTABLE));
 
        return __drm_object_property_get_value(obj, property, val);
 }
-- 
2.42.0

Reply via email to