[Intel-gfx] drm/i915: don't change DRM configuration when releasing load detect pipe

Jesse Barnes jbarnes at virtuousgeek.org
Thu Feb 18 23:51:54 CET 2010


When we get a CRTC to use for load detection, we restore its DPMS state
if needed.  We shouldn't, however, change the DRM configuration by
calling drm_helper_disable_unused_functions when we release the CRTC.
Doing so can cause problems with resume, since at suspend or lid close
time, X may choose to probe outputs.  If it doesn't re-probe them at
open or resume time, LVDS won't be restored, since
drm_helper_disable_unused_functions will have turned it off, preventing
the mode set at lid open from restoring it.

Fixes kernel bz #14997.

Cc: stable at kernel.org
Tested-by: Takashi Iwai <tiwai at suse.de>
Tested-by: Thorsten Leemhuis <fedora at leemhuis.info>
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a483f41..cbb58e5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3758,7 +3758,6 @@ struct drm_crtc *intel_get_load_detect_pipe(struct intel_output *intel_output,
 void intel_release_load_detect_pipe(struct intel_output *intel_output, int dpms_mode)
 {
 	struct drm_encoder *encoder = &intel_output->enc;
-	struct drm_device *dev = encoder->dev;
 	struct drm_crtc *crtc = encoder->crtc;
 	struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
 	struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
@@ -3768,7 +3767,6 @@ void intel_release_load_detect_pipe(struct intel_output *intel_output, int dpms_
 		intel_output->base.encoder = NULL;
 		intel_output->load_detect_temp = false;
 		crtc->enabled = drm_helper_crtc_in_use(crtc);
-		drm_helper_disable_unused_functions(dev);
 	}
 
 	/* Switch crtc and output back off if necessary */



More information about the Intel-gfx mailing list