drm: make drm_atomic_set_mode_prop_for_crtc() more reliable
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 31 May 2016 12:03:17 +0000 (15:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 16:47:35 +0000 (09:47 -0700)
commitf956468c5b6ca1e4a1048564706b06b8fc4a79b2
tree2abe48a01976c64c689a9c19d895871ff4b8f2b8
parentec00d4d71abfd92d6cc3023dec46ff1428f74514
drm: make drm_atomic_set_mode_prop_for_crtc() more reliable

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.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_atomic.c