From patchwork Tue Dec 15 22:25:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cpaul@redhat.com X-Patchwork-Id: 7857901 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDB4ABEEE5 for ; Tue, 15 Dec 2015 22:26:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35448203E1 for ; Tue, 15 Dec 2015 22:26:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 63FAD203E3 for ; Tue, 15 Dec 2015 22:26:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E2A56E7D6; Tue, 15 Dec 2015 14:26:12 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 97C226E7D6 for ; Tue, 15 Dec 2015 14:26:10 -0800 (PST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 771A2C0B9338; Tue, 15 Dec 2015 22:26:06 +0000 (UTC) Received: from ecstaticemu.bos.redhat.com. (dhcp-25-74.bos.redhat.com [10.18.25.74]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBFMQ36s032641; Tue, 15 Dec 2015 17:26:04 -0500 From: Lyude To: David Airlie , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), Daniel Vetter Subject: [PATCH v2] drm/i915: Send a hotplug event on resume instead of an IRQ event Date: Tue, 15 Dec 2015 17:25:56 -0500 Message-Id: <1450218356-24028-1-git-send-email-cpaul@redhat.com> In-Reply-To: <1450211658.8084.11.camel@redhat.com> References: <1450211658.8084.11.camel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Cc: kuddel.mail@gmx.de, Julien Wajsberg , Benjamin Tissoires , Lennart Poettering , Lyude X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 We currently call drm_helper_hpd_irq_event() to handle reprobing displays on resume, however drm_helper_hpd_irq_event() only checks the status of hpd. HPD doesn't update if the displays connected changed before resuming the system, and as such causes us not to detect any connection changes after resume. This originally wasn't the case since drm would reset all of the connectors to unknown during resume and cause a reprobe (since the connector statuses would change), however this behavior changed in 5677d67ae394 ('drm: Stop resetting connector state to unknown'). Signed-off-by: Lyude --- I did some research into why setting the connector state to unknown was causing a reprobe and discovered that the fact that this reprobing ever worked at all was just a coincidence (i915's IRQ handler gets called by the irq event, notices the state of all the connectors changed since they were set to unknown, causes a reprobe). This seems to fix everything (including monitor detection in normal VTs), and I can't figure out any real use now for us to set everything to unknown so I'm going to go the route of just sending the hotplug event instead. drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 760e0ce..27a6c1b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -792,7 +792,7 @@ static int i915_drm_resume(struct drm_device *dev) * */ intel_hpd_init(dev_priv); /* Config may have changed between suspend and resume */ - drm_helper_hpd_irq_event(dev); + drm_kms_helper_hotplug_event(dev); intel_opregion_init(dev);