Commit 0e26cc72c71c ("drm: Refuse to async flip with atomic prop
changes") only allows async flip with plane's framebuffer and a few
related plane property changes and don't include color management
properties.
Apply the same rule to colorops: accept a value that matches the current
state, so userspace can keep resubmitting its whole color pipeline with
every flip, and reject any change with -EINVAL.
Fixes: cfc27680ee20 ("drm/colorop: Introduce new drm_colorop mode object")
Signed-off-by: Melissa Wen <[email protected]>
---
drivers/gpu/drm/drm_atomic_uapi.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c
b/drivers/gpu/drm/drm_atomic_uapi.c
index 1eebcf6f5e05..a45e61cd9bc3 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1322,6 +1322,14 @@ int drm_atomic_set_property(struct drm_atomic_commit
*state,
break;
}
+ if (async_flip) {
+ /* no-op changes are always allowed */
+ ret = drm_atomic_colorop_get_property(colorop,
colorop_state,
+ prop, &old_val);
+ ret = drm_atomic_check_prop_changes(ret, old_val,
prop_value, prop);
+ break;
+ }
+
ret = drm_atomic_colorop_set_property(colorop, colorop_state,
file_priv, prop,
prop_value,
&replaced);
--
2.53.0