From: Chris Wilson Date: Mon, 28 Nov 2011 21:10:05 +0000 (+0000) Subject: drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL) X-Git-Tag: v3.2-rc5~54^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eebd6bb5f1ea04f04019e5c39f87a0f17ffb472;p=pandora-kernel.git drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL) Disabling the CRTC by setting its framebuffer to NULL, as used by drm_framebuffer_cleanup(), was failing to pass the current framebuffer to the crtc_func->disable callback. This is because of the dance within drm_crtc_helper_set_config to pass the new_fb (NULL in this case) to the drm_crtc_helper_set_mode with the currently attached fb as a parameter. drm_crtc_helper_set_mode treats this as a no-op and the encoder is still enabled. And so the current fb is forgotten before the call to drm_helper_disable_unused_functions. This patch treats disabling the CRTC as a simple special case rather than adding further complexity into the configuration logic. This fixes a pin-leak of the fb bo on Xserver close. Signed-off-by: Chris Wilson Signed-off-by: Dave Airlie --- Reading git-diff-tree failed