From patchwork Tue May 20 21:10:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 4212931 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 570F6BEEAB for ; Tue, 20 May 2014 21:10:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 811DB20353 for ; Tue, 20 May 2014 21:10:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3431420320 for ; Tue, 20 May 2014 21:10:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD25F6E827; Tue, 20 May 2014 14:10:24 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy4-pub.mail.unifiedlayer.com (gproxy4-pub.mail.unifiedlayer.com [69.89.23.142]) by gabe.freedesktop.org (Postfix) with SMTP id 976C66E1EF for ; Tue, 20 May 2014 14:10:22 -0700 (PDT) Received: (qmail 11114 invoked by uid 0); 20 May 2014 21:10:21 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy4.mail.unifiedlayer.com with SMTP; 20 May 2014 21:10:21 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by cmgw3 with id 4MAE1o00J2UhLwi01MAH0l; Tue, 20 May 2014 15:10:21 -0600 X-Authority-Analysis: v=2.1 cv=XPOjF2RE c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=o7wFLKz77-IA:10 a=3ROhxo7VqVMA:10 a=kj9zAlcOel0A:10 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=noBwr2J6l1kA:10 a=S_4MYZUyeNa72JR-q_sA:9 a=CjuIK1q_8ugA:10 a=rW6DTWptwo0A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=4a5S/Vh7NHJpXnZSPkBgB6KRB4mGHPVZixaVNdg8agI=; b=IPUdNsC4muYHM+fv+nrzU4skf65VSlJU2OpBAePYCuJnwQL/AGa68orkqEmo5OV1DvIktl9GRLtIY8thWWXNSS8bdb0pkB/GWPlCxf9dr+ksqF7UP/ipHVTefcbbx85I; Received: from [67.161.37.189] (port=36329 helo=jbarnes-desktop) by box514.bluehost.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1WmrIb-0007zV-PI; Tue, 20 May 2014 15:10:13 -0600 Date: Tue, 20 May 2014 14:10:16 -0700 From: Jesse Barnes To: Daniel Vetter Message-ID: <20140520141016.3dcd5658@jbarnes-desktop> In-Reply-To: References: <1364315146-20542-1-git-send-email-jbarnes@virtuousgeek.org> <1364315146-20542-3-git-send-email-jbarnes@virtuousgeek.org> <5355494B.5040503@t-online.de> <20140516152047.4743f0f4@jbarnes-desktop> <20140516223807.GA11656@nuc-i3427.alporthouse.com> <20140516224223.GB11656@nuc-i3427.alporthouse.com> <20140520125329.23e9db9a@jbarnes-desktop> <20140520125803.5c86b414@jbarnes-desktop> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: intel-gfx Subject: Re: [Intel-gfx] [PATCH 3/4] drm/i915: enable VT switchless resume v3 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 On Tue, 20 May 2014 22:15:45 +0200 Daniel Vetter wrote: > On Tue, May 20, 2014 at 9:58 PM, Jesse Barnes wrote: > > Ah, poll_enable is false until after _thaw finishes, so > > our hotplug_resume call of hpd_irq_event does nothing. So aside from > > the encoder hot_plug callbacks (which really just check dp link status, > > which ought to be a no-op) our resume_hotplug function doesn't do > > anything right now. May as well kill it and just send an unconditional > > uevent? > > That's expensive since the reprobe will likely result in a few dropped > frames (if the edid reading takes a long time). Better to do that in > the kernel and avoid sending the uevent if nothing changed. Which iirc > hpd_irq_event does for us. Well delaying the resume by a long time isn't much better, but I guess we need to fix this somehow. Knut, does this patch also address your issue? It should reset the connector status fields correctly so the X driver doesn't have to work around things... diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b948c71..e725235 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -623,8 +623,6 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings) * */ intel_hpd_init(dev); dev_priv->enable_hotplug_processing = true; - /* Config may have changed between suspend and resume */ - intel_resume_hotplug(dev); } intel_opregion_init(dev); @@ -694,6 +692,11 @@ int i915_resume(struct drm_device *dev) return ret; drm_kms_helper_poll_enable(dev); + if (drm_core_check_feature(dev, DRIVER_MODESET)) { + /* Config may have changed between suspend and resume */ + intel_resume_hotplug(dev); + } + return 0; }