Commit 5973e8e8 authored by Mario Kleiner's avatar Mario Kleiner Committed by Greg Kroah-Hartman

drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.

commit add1fa75 upstream.

Due to assigning the 'replaced' value instead of or'ing it,
if drm_atomic_crtc_set_property() gets called multiple times,
the last call will define the color_mgmt_changed flag, so
a non-updating call to a property can reset the flag and
prevent actual hw state updates required by preceding
property updates.
Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 792a5bf0
...@@ -465,7 +465,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, ...@@ -465,7 +465,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val, val,
-1, -1,
&replaced); &replaced);
state->color_mgmt_changed = replaced; state->color_mgmt_changed |= replaced;
return ret; return ret;
} else if (property == config->ctm_property) { } else if (property == config->ctm_property) {
ret = drm_atomic_replace_property_blob_from_id(crtc, ret = drm_atomic_replace_property_blob_from_id(crtc,
...@@ -473,7 +473,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, ...@@ -473,7 +473,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val, val,
sizeof(struct drm_color_ctm), sizeof(struct drm_color_ctm),
&replaced); &replaced);
state->color_mgmt_changed = replaced; state->color_mgmt_changed |= replaced;
return ret; return ret;
} else if (property == config->gamma_lut_property) { } else if (property == config->gamma_lut_property) {
ret = drm_atomic_replace_property_blob_from_id(crtc, ret = drm_atomic_replace_property_blob_from_id(crtc,
...@@ -481,7 +481,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, ...@@ -481,7 +481,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val, val,
-1, -1,
&replaced); &replaced);
state->color_mgmt_changed = replaced; state->color_mgmt_changed |= replaced;
return ret; return ret;
} else if (crtc->funcs->atomic_set_property) } else if (crtc->funcs->atomic_set_property)
return crtc->funcs->atomic_set_property(crtc, state, property, val); return crtc->funcs->atomic_set_property(crtc, state, property, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment