From patchwork Wed May 27 05:30:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 6487621 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 42A549F1CC for ; Wed, 27 May 2015 05:30:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63122206F6 for ; Wed, 27 May 2015 05:30:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 15533206B5 for ; Wed, 27 May 2015 05:30:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 690896E802; Tue, 26 May 2015 22:30:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id B59D86E802 for ; Tue, 26 May 2015 22:30:23 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 26 May 2015 22:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,502,1427785200"; d="scan'208";a="732252397" Received: from lemogne-mobl.ger.corp.intel.com (HELO patser.lan) ([10.252.4.211]) by fmsmga002.fm.intel.com with ESMTP; 26 May 2015 22:30:02 -0700 Message-ID: <55655659.9060109@linux.intel.com> Date: Wed, 27 May 2015 07:30:01 +0200 From: Maarten Lankhorst User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: intel-gfx@lists.freedesktop.org References: <1432129094-11765-1-git-send-email-maarten.lankhorst@linux.intel.com> <1432137874-20543-1-git-send-email-maarten.lankhorst@linux.intel.com> <1432137874-20543-6-git-send-email-maarten.lankhorst@linux.intel.com> In-Reply-To: <1432137874-20543-6-git-send-email-maarten.lankhorst@linux.intel.com> Cc: Ander Conselvan de Oliveira , Daniel Stone Subject: Re: [Intel-gfx] [PATCH v3 15/22] drm/i915: Read hw state into an atomic state struct X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hey, Op 20-05-15 om 18:04 schreef maarten.lankhorst@linux.intel.com: > From: Ander Conselvan de Oliveira > > To make this work we load the new hardware state into the > atomic_state, then swap it with the sw state. > > This lets us change the force restore path in setup_hw_state() > to use a single call to intel_mode_set() to restore all the > previous state. > > As a nice bonus this kills off encoder->new_encoder, > connector->new_enabled and crtc->new_enabled. They were used only > to restore the state after a modeset. > > Signed-off-by: Ander Conselvan de Oliveira > Signed-off-by: Maarten Lankhorst > --- > drivers/gpu/drm/i915/intel_atomic.c | 2 +- > drivers/gpu/drm/i915/intel_display.c | 377 ++++++++++++++++++++++------------- > drivers/gpu/drm/i915/intel_drv.h | 14 +- > 3 files changed, 241 insertions(+), 152 deletions(-) > Small fix up. This patch may force the modeset code to no longer do a modeset on boot, causing a black screen on Daniel Stone's machine. Fixup below disables all crtc's for the !i915.fastboot case. diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 13b09efeb2a0..b70e3890e2bf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14138,7 +14138,7 @@ void intel_modeset_init(struct drm_device *dev) intel_fbc_disable(dev); drm_modeset_lock_all(dev); - intel_modeset_setup_hw_state(dev, false); + intel_modeset_setup_hw_state(dev, !i915.fastboot); drm_modeset_unlock_all(dev); for_each_intel_crtc(dev, crtc) {