* [PATCH] drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
@ 2016-08-26 23:02 Mario Kleiner
2016-08-28 16:50 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Mario Kleiner @ 2016-08-26 23:02 UTC (permalink / raw)
To: dri-devel; +Cc: mario.kleiner.de, Daniel Vetter, # v4 . 6+
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: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: <stable@vger.kernel.org> # v4.6+
---
drivers/gpu/drm/drm_atomic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 8d2f111..3a985d6 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -475,7 +475,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val,
-1,
&replaced);
- state->color_mgmt_changed = replaced;
+ state->color_mgmt_changed |= replaced;
return ret;
} else if (property == config->ctm_property) {
ret = drm_atomic_replace_property_blob_from_id(crtc,
@@ -483,7 +483,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val,
sizeof(struct drm_color_ctm),
&replaced);
- state->color_mgmt_changed = replaced;
+ state->color_mgmt_changed |= replaced;
return ret;
} else if (property == config->gamma_lut_property) {
ret = drm_atomic_replace_property_blob_from_id(crtc,
@@ -491,7 +491,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
val,
-1,
&replaced);
- state->color_mgmt_changed = replaced;
+ state->color_mgmt_changed |= replaced;
return ret;
} else if (crtc->funcs->atomic_set_property)
return crtc->funcs->atomic_set_property(crtc, state, property, val);
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
2016-08-26 23:02 [PATCH] drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates Mario Kleiner
@ 2016-08-28 16:50 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2016-08-28 16:50 UTC (permalink / raw)
To: Mario Kleiner, Dave Airlie, Lionel Landwerlin
Cc: dri-devel, Daniel Vetter, # v4 . 6+
On Sat, Aug 27, 2016 at 01:02:28AM +0200, Mario Kleiner wrote:
> 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: Mario Kleiner <mario.kleiner.de@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: <stable@vger.kernel.org> # v4.6+
Fixes: 5488dc16fde7 ("drm: introduce pipe color correction properties")
Oops. I wonder why we didn't catch this in testcases ...
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dave, can you pls pick this up?
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-28 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 23:02 [PATCH] drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates Mario Kleiner
2016-08-28 16:50 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox