From patchwork Sat Apr 20 14:57:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwan-gyeong Mun X-Patchwork-Id: 10910333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3CFD922 for ; Sat, 20 Apr 2019 14:02:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A42AB2838F for ; Sat, 20 Apr 2019 14:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9191628449; Sat, 20 Apr 2019 14:02:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2ABFD2838F for ; Sat, 20 Apr 2019 14:02:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA247892C2; Sat, 20 Apr 2019 14:02:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FCCC892C2; Sat, 20 Apr 2019 14:02:25 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id q66so6772788ljq.7; Sat, 20 Apr 2019 07:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KDyT0K4bunBckLXryZx8RsBKrmrzkaKmRFYW/EOPlWA=; b=TcbqHPYKd6WFs7h4nnPpjuKbJS+FwHp6T7HFX2wseyFHyPNRnRV0VY1AjUikrftkaB lfEwyCjifv9d3ivqO28QbTUNjhTzxJVA8bYppEC9FBB0KlJbvzHQrREQeLFcl99vZoKf yrK2QX8kP2w9v/DdoA4iNYfYyCTKXPTBhjGPCM/nHBmfSTaz+EZdDV3bz4PlFPM/C/xd Kz5Gye+QbFR57nn2twHZ4Iy5WKVJ/DuNHYBpT3oSptaksOy34NgXy4+wZk6yZDVAglqj DDRUdOf7kJo41z8TUkjmhVmmF9WWmFWC/Lyjsuf82yD1LCqutYerm9i6jscTsZAQMZWQ ntKw== X-Gm-Message-State: APjAAAUT+NfWom22VZOuLZfUbZGcCdQQysShHT4twcF90HRd9IWB8Fe2 59SLandKKnQFTNPqCe26VkIe2ClGA00= X-Google-Smtp-Source: APXvYqz2RKSDWLv72IUmY5QYPGUumvcLyrJmgWvBG892Mjme5X4HF/GzAawpBGYYv9Pq6KW4HDcRbA== X-Received: by 2002:a2e:96cb:: with SMTP id d11mr4982821ljj.157.1555768943461; Sat, 20 Apr 2019 07:02:23 -0700 (PDT) Received: from localhost.localdomain ([193.94.200.82]) by smtp.gmail.com with ESMTPSA id 77sm1719348ljc.69.2019.04.20.07.02.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Apr 2019 07:02:22 -0700 (PDT) From: Gwan-gyeong Mun X-Google-Original-From: Gwan-gyeong Mun To: intel-gfx@lists.freedesktop.org Subject: [PATCH v3] drm: Fire off KMS hotplug events if probe detect says the connector is connected Date: Sat, 20 Apr 2019 17:57:57 +0300 Message-Id: <20190420145757.8443-1-gwan-gyeong.mun@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KDyT0K4bunBckLXryZx8RsBKrmrzkaKmRFYW/EOPlWA=; b=plDPdrJ2Iu6k3bisM+35s59pTnZ/kXQjpFF8vajciE0D/DgK4SZ2+Y+23LUtjChpAC oh4woUxHQ9IPFTOF7N/Qfg5U//drMwbDmGZAY6tk0eGSkUSL2y2PMJb3wwt8RkHps9UW v/kuEldYLajWuC0MFzXRxbhQGTqyWpHIrZc0W9zGQjv4uz2JuhEfctY6HRkl90ekdaib 6Lll9QWKp+t5aZNbnGrTUPzZA34OlSHttICv15okOFp8rjfHUy9fOpVEm33aXK5swa+p R98+4UYcjukZmQqE8Tlo7GBwpa44lBE/Wv48eFI3jRDpi8XAog3p+/O+/NXWZwI8BYpT a4/w== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, Gwan-gyeong Mun Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The hotplug detection routine of drm_helper_hpd_irq_event() can detect changing of status of connector, but it can not detect changing of properties of the connector. e.g. changing of edid while suspend/resume, changing of dp lanes in dp aux. Following scenario explains one of them; A detection of changing of edid. 1) plug display device to a connector 2) system suspend 3) unplug 1)'s display device and plug the other display device to a connector 4) system resume To solve explained cases, It fires off KMS hotplug events if drm_helper_probe_detect() says the connector is connected. Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate Testcase: igt/kms_chamelium/dp-edid-change-during-suspend v2: Remove suggested-by line (danvet) v3: Remove a misused Link line and add References (Jani) References: https://bugs.freedesktop.org/show_bug.cgi?id=105540 References: https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html Signed-off-by: Gwan-gyeong Mun --- drivers/gpu/drm/drm_probe_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 6fd08e04b323..081a849104f2 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev) connector->name, drm_get_connector_status_name(old_status), drm_get_connector_status_name(connector->status)); - if (old_status != connector->status) + if (old_status != connector->status || + connector->status == connector_status_connected) changed = true; } drm_connector_list_iter_end(&conn_iter);