]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
1acd2f9428c5513b5131b7af927abfb7aefe7c83
[thirdparty/kernel/stable-queue.git] /
1 From add1fa75101263ab4d74240f93000998d4325624 Mon Sep 17 00:00:00 2001
2 From: Mario Kleiner <mario.kleiner.de@gmail.com>
3 Date: Sat, 27 Aug 2016 01:02:28 +0200
4 Subject: drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
5
6 From: Mario Kleiner <mario.kleiner.de@gmail.com>
7
8 commit add1fa75101263ab4d74240f93000998d4325624 upstream.
9
10 Due to assigning the 'replaced' value instead of or'ing it,
11 if drm_atomic_crtc_set_property() gets called multiple times,
12 the last call will define the color_mgmt_changed flag, so
13 a non-updating call to a property can reset the flag and
14 prevent actual hw state updates required by preceding
15 property updates.
16
17 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
18 Cc: Daniel Vetter <daniel.vetter@intel.com>
19 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
20 Signed-off-by: Dave Airlie <airlied@redhat.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/gpu/drm/drm_atomic.c | 6 +++---
25 1 file changed, 3 insertions(+), 3 deletions(-)
26
27 --- a/drivers/gpu/drm/drm_atomic.c
28 +++ b/drivers/gpu/drm/drm_atomic.c
29 @@ -465,7 +465,7 @@ int drm_atomic_crtc_set_property(struct
30 val,
31 -1,
32 &replaced);
33 - state->color_mgmt_changed = replaced;
34 + state->color_mgmt_changed |= replaced;
35 return ret;
36 } else if (property == config->ctm_property) {
37 ret = drm_atomic_replace_property_blob_from_id(crtc,
38 @@ -473,7 +473,7 @@ int drm_atomic_crtc_set_property(struct
39 val,
40 sizeof(struct drm_color_ctm),
41 &replaced);
42 - state->color_mgmt_changed = replaced;
43 + state->color_mgmt_changed |= replaced;
44 return ret;
45 } else if (property == config->gamma_lut_property) {
46 ret = drm_atomic_replace_property_blob_from_id(crtc,
47 @@ -481,7 +481,7 @@ int drm_atomic_crtc_set_property(struct
48 val,
49 -1,
50 &replaced);
51 - state->color_mgmt_changed = replaced;
52 + state->color_mgmt_changed |= replaced;
53 return ret;
54 } else if (crtc->funcs->atomic_set_property)
55 return crtc->funcs->atomic_set_property(crtc, state, property, val);