From patchwork Wed Aug 29 21:13:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1385961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 24A18DF2AB for ; Wed, 29 Aug 2012 22:20:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8FEC9F6A5 for ; Wed, 29 Aug 2012 15:20:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 206CB9F5F7 for ; Wed, 29 Aug 2012 15:20:38 -0700 (PDT) Received: by wibhn17 with SMTP id hn17so989172wib.12 for ; Wed, 29 Aug 2012 15:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=2vZt5iVK/gJzDeuzRfG9Tq4QJBsbk4KZtqDzp5GxEIE=; b=dwYpiHG5Diz2anR7W6Zwuli4Rir6d7RFuOdKHfbOw3KR7AqtfLPdnO6Eb/mY6AY+4v Qp4h8UtwftJQGShPD+c7dy18cSlcqxJXXSEAKE80apmQR2GVeM8ddGiK5CB4BqGLiKKg CEeXCTBa6EcTcUpkfybLHKQvHkLpsmiGfRzpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=2vZt5iVK/gJzDeuzRfG9Tq4QJBsbk4KZtqDzp5GxEIE=; b=Zk4Jv710q3N1vwBHbSjBW3r4WA1IhopdaS9XTRbyJoA7/9B9dNmlxkBh/DonupMkME Nye75YYri51/fdeFKaTVVwH8w1Kj7SUOPZPwiBwTHIX9+jtcgLx49Pq7zKoU0qNfGsVD /ynd0UoeBw+O9HrvQ6sDS3bRtYP7b9UB5nfzK9ZQVJs5fsTM8DfgfYTQ81JQhJyC0UGV Y2kaO7OMiU71E9pAioDe3IFG7bnlxcL+ArxgnPwKeSNcCBEns3X1uFn6VhrX7uROd3pQ U36aRZYugdstog7UrIcesy+9CsIJqhqnxo2QGEqHMU2VzB1OydGnt5kMakCaiZcChG/6 c/dQ== Received: by 10.180.93.68 with SMTP id cs4mr43253241wib.14.1346278838329; Wed, 29 Aug 2012 15:20:38 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id l6sm12436646wiz.4.2012.08.29.15.20.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Aug 2012 15:20:36 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 29 Aug 2012 23:13:29 +0200 Message-Id: <1346274809-31155-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1345403595-9678-58-git-send-email-daniel.vetter@ffwll.ch> References: <1345403595-9678-58-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnXDeFJZKARbfPM3TcBGwhAdnCO6elPqnR3Lb3RQutIvWQaDHvy+hDQh08Yt9SrdOJhMy7F Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: no longer call drm_helper_resume_force_mode X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Since this only calls crtc helper functions, of which a shocking amount are NULL. Now the curious thing is how the new modeset code worked with this function call still present: Thanks to the hw state readout and the suspend fixes to properly quiescent the register state, nothing is actually enabled at resume (if the bios doesn't set up anything). Which means resume_force_mode doesn't actually do anything and hence nothing blows up at resume time. The other reason things do work is that the fbcon layer has it's own resume notifier callback, which restores the mode. And thanks to the force vt switch at suspend/resume, that then forces X to restore it's own mode. Hence everything still worked (as long as the bios doesn't enable anything). And we can just kill the call to resume_force_mode. The upside of both this patch and the preceeding patch to quiescent the modeset state is that our resume path is much simpler: - We now longer restore bogus register values (which most often would enable the backlight a bit and a few ports), causing flickering. - We now longer call resume_force_mode to restore a mode that the fbcon layer would overwrite right away anyway. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index fe7512a..cd6697c 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -549,11 +549,6 @@ static int i915_drm_thaw(struct drm_device *dev) intel_modeset_setup_hw_state(dev); drm_mode_config_reset(dev); drm_irq_install(dev); - - /* Resume the modeset for every activated CRTC */ - mutex_lock(&dev->mode_config.mutex); - drm_helper_resume_force_mode(dev); - mutex_unlock(&dev->mode_config.mutex); } intel_opregion_init(dev);