From patchwork Wed Dec 7 00:43:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Navare, Manasi" X-Patchwork-Id: 9463617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BF676022E for ; Wed, 7 Dec 2016 00:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 434AA284F7 for ; Wed, 7 Dec 2016 00:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38130284F9; Wed, 7 Dec 2016 00:41:48 +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=-4.2 required=2.0 tests=BAYES_00,HEXHASH_WORD, 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 CCB5E284F7 for ; Wed, 7 Dec 2016 00:41:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C687589C46; Wed, 7 Dec 2016 00:41:42 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id C667D89C46 for ; Wed, 7 Dec 2016 00:41:40 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 06 Dec 2016 16:41:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,310,1477983600"; d="scan'208"; a="1068873407" Received: from manasi-otcmedia.jf.intel.com ([10.7.199.175]) by orsmga001.jf.intel.com with ESMTP; 06 Dec 2016 16:41:39 -0800 From: Manasi Navare To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Dec 2016 16:43:51 -0800 Message-Id: <1481071431-4252-1-git-send-email-manasi.d.navare@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: Do not reset detect_done flag in intel_dp_detect 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The detect_done flag was introduced in the commit 7d23e3c37bb3fc6952dc84007ee60cb533fd2d5c in order to avoid multiple detects on hotplug where intel_dp_long_pulse() was called from HPD handler as well as in intel_dp_detect. So this detect_done flag was required to make sure intel_dp_detect() did not call long pulse handler again if it was already been called from HPD handler. However commit 1015811609c0328b5ed670d07748591b837e74eb differs the long hpd handling entirely until the hotplug work runs to avoid the double long hpd handling the "detect_done" flag is trying to prevent. So now we do not need to reset the detect_done flag to false in intel_dp_detect. It will be reset in the intel_dp_hpd_pulse so that intel_dp_detect does a full detect. However if the .detect gets called during mode enumeration then we do not need to do a full detect. This patch avoids the WARNS_ONS during connected boot case when it calls intel_dp_check_link_status() due to multiple detects and also avoids DP compliance failures. It avoids doing a full detect every single time on .detect(). Cc: Ville Syrjala Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Manasi Navare --- drivers/gpu/drm/i915/intel_dp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index db75bb9..9c9277e 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4470,8 +4470,6 @@ static bool intel_digital_port_connected(struct drm_i915_private *dev_priv, if (!intel_dp->detect_done) status = intel_dp_long_pulse(intel_dp->attached_connector); - intel_dp->detect_done = false; - return status; }