From patchwork Wed Nov 28 21:18:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guang Bai X-Patchwork-Id: 10703397 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 5342C13AD for ; Wed, 28 Nov 2018 21:32:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42EA42DD69 for ; Wed, 28 Nov 2018 21:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3740A2DD6C; Wed, 28 Nov 2018 21:32:39 +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,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 E54902DD6B for ; Wed, 28 Nov 2018 21:32:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F41A6E3DD; Wed, 28 Nov 2018 21:32:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FEF26E3DA for ; Wed, 28 Nov 2018 21:32:37 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 13:32:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,292,1539673200"; d="scan'208";a="105171561" Received: from gbai-ub1604-lts.fm.intel.com ([10.1.23.154]) by FMSMGA003.fm.intel.com with ESMTP; 28 Nov 2018 13:32:36 -0800 From: Guang Bai To: intel-gfx@lists.freedesktop.org Date: Wed, 28 Nov 2018 13:18:13 -0800 Message-Id: <1543439893-27350-1-git-send-email-guang.bai@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH] drm/i915: Fix the HDMI hot plug disconnection failure (v3) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Chris Chiu MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP On some GEN9 platforms, slowly unplugging (wiggling) the HDMI cable makes the kernel to believe the HDMI display is still connected. This is because the HDMI DDC lines are disconnected a little bit later after the hot-plug interrupt triggered thus an immediate edid fetch can be made. Use digital port live states to authorize the edid read. v2: Fix the formatting issue v3: Use digital port states to authorize the edid read Cc: Jani Nikula Cc: Chris Chiu Signed-off-by: Guang Bai --- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index e2c6a2b3e8f2..8cf7c78b8cdd 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -1929,7 +1929,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force) intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS); - if (IS_ICELAKE(dev_priv) && + if ((IS_ICELAKE(dev_priv) || IS_GEN9_BC(dev_priv)) && !intel_digital_port_connected(encoder)) goto out;