From patchwork Wed Mar 31 06:49:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 49082 X-Patchwork-Delegate: apw@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 603B5B7C8E for ; Wed, 31 Mar 2010 17:50:00 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NwrkN-000610-LB; Wed, 31 Mar 2010 07:49:51 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NwrkL-00060h-HN for kernel-team@lists.ubuntu.com; Wed, 31 Mar 2010 07:49:49 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NwrkL-0007QI-Fs for ; Wed, 31 Mar 2010 07:49:49 +0100 Received: from 79-66-242-230.dynamic.dsl.as9105.com ([79.66.242.230] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NwrkL-0000O4-BQ for kernel-team@lists.ubuntu.com; Wed, 31 Mar 2010 07:49:49 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: drm/i915: don't change DRM configuration when releasing load detect pipe Date: Wed, 31 Mar 2010 07:49:47 +0100 Message-Id: <1270018187-7923-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1270018187-7923-1-git-send-email-apw@canonical.com> References: <1270018187-7923-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Jesse Barnes 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 Tested-by: Thorsten Leemhuis Signed-off-by: Jesse Barnes BugLink: http://bugs.launchpad.net/bugs/488328 [apw@canonical.com: that this fix was still under discussion upstream with the likely final resolution being different. However the impact is pretty great so we are taking this as an interim fix.] Signed-off-by: Chase Douglas Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader --- drivers/gpu/drm/i915/intel_display.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0d4c401..0574155 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3742,7 +3742,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; @@ -3752,7 +3751,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 */