Patch "drm: make drm_atomic_set_mode_prop_for_crtc() more reliable" has been added to the 4.6-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm: make drm_atomic_set_mode_prop_for_crtc() more reliable
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-make-drm_atomic_set_mode_prop_for_crtc-more-reliable.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
6709887c448d1cff51b52d09763c7b834ea5f0beMon Sep 17 00:00:00 2001
From: Tomi Valkeinen <[email protected]>
Date: Tue, 31 May 2016 15:03:17 +0300
Subject: drm: make drm_atomic_set_mode_prop_for_crtc() more reliable
From: Tomi Valkeinen <[email protected]>
commit 6709887c448d1cff51b52d09763c7b834ea5f0be upstream.
drm_atomic_set_mode_prop_for_crtc() does not clear the state->mode, so old data may be left there when a new mode is set, possibly causing odd issues.
This patch improves the situation by always clearing the state->mode first.
--- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic.c +2 -1
@@ -354,6 +354,8 @@ int drm_atomic_set_mode_prop_for_crtc(stdrm_property_unreference_blob (state->mode_blob); state->mode_blob =NULL ; +memset (&state->mode,0 ,sizeof (state->mode)); + if (blob) { if (blob->length != sizeof(struct drm_mode_modeinfo) || drm_mode_convert_umode(&state->mode,
@@ -366,7 +368,6 @@ int drm_atomic_set_mode_prop_for_crtc(stDRM_DEBUG_ATOMIC ("Set [MODE:%s] for CRTC state %p\n" , state->mode.name, state); }else { -memset (&state->mode,0 ,sizeof (state->mode)); state->enable = false;DRM_DEBUG_ATOMIC ("Set [NOMODE] for CRTC state %p\n" , state);
Patches currently in stable-queue which might be from [email protected] are
queue-4.6/drm-make-drm_atomic_set_mode_prop_for_crtc-more-reliable.patch queue-4.6/drm-add-missing-drm_mode_set_crtcinfo-call.patch