drm: Only decouple the old_fb from the crtc is we call mode_set*
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 9 Sep 2010 08:41:32 +0000 (09:41 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:51 +0000 (13:36 -0700)
commitd3ad7717c9fbfd738308b39d47bf830aad23f408
treefdfa9b56fb0b3149fe3c6e271c731a64a6e73256
parent7e8ceff067f0482ee15a7b0b944f958a00a3fac3
drm: Only decouple the old_fb from the crtc is we call mode_set*

commit 356ad3cd616185631235ffb48b3efbf39f9923b3 upstream.

Otherwise when disabling the output we switch to the new fb (which is
likely NULL) and skip the call to mode_set -- leaking driver private
state on the old_fb.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857
Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/drm_crtc_helper.c