From patchwork Tue Dec 12 09:55:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kahola, Mika" X-Patchwork-Id: 13488851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3A0CC4332F for ; Tue, 12 Dec 2023 10:02:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D51D10E17F; Tue, 12 Dec 2023 10:02:01 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FC7810E17F for ; Tue, 12 Dec 2023 10:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702375320; x=1733911320; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4d93tAxECp0NQYcJJVtj2+oVyHAgC7riaea7YXplzUs=; b=HWHv6+9RnKEymJpnQvzuDzhJdpByHCekT0NXetGJU/HLv5Xo8W0ZgVdK mf0/MmHykO4tICKADnAii9YiKweMZBqU7FZNAtvddgBLDjW6Ef689LEgh 1rQ4sYhLdDTz7YIE+YKhcw8d0CrvOu/5XVA4YHLogD5HnEbCJAPFYoMKs 4Klr2mI5hdanI5Q7wCOc4VWO/zipNTm6U/9XZABJLVhx1w3DtyA64WGf4 gfYISPPj2cvtYnwRD5WXIEC5sm94oic0xAOTxsWYmSIvN6t4hrvPvqU+Z xQ6jxLnsWocZSQ3z3F5EzpgdIPlLHJ6l+t7eizbTBU6nBJHCvmODahxXg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="385192863" X-IronPort-AV: E=Sophos;i="6.04,269,1695711600"; d="scan'208";a="385192863" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 02:01:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="773479765" X-IronPort-AV: E=Sophos;i="6.04,269,1695711600"; d="scan'208";a="773479765" Received: from sorvi2.fi.intel.com ([10.237.72.194]) by orsmga002.jf.intel.com with ESMTP; 12 Dec 2023 02:01:42 -0800 From: Mika Kahola To: intel-gfx@lists.freedesktop.org Subject: [PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence Date: Tue, 12 Dec 2023 11:55:20 +0200 Message-Id: <20231212095520.452363-1-mika.kahola@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" When going through the disconnection flow we don't need to wait for PHY readiness and hence we can skip the wait part. For disabling the function returns false as an indicator that the power is not enabled. After all, we are not even using the return value when Type-C is disconnecting. BSpec: 65380 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index f64d348a969e..79ec17fa3edd 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -1030,6 +1030,9 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl __xelpdp_tc_phy_enable_tcss_power(tc, enable); + if (!enable) + return false; + if ((!tc_phy_wait_for_ready(tc) || !xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) && !drm_WARN_ON(&i915->drm, tc->mode == TC_PORT_LEGACY)) {