From patchwork Thu Nov 25 10:10:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Chiu X-Patchwork-Id: 1559619 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=LGGPKS9H; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J0DDn3Zsqz9s5P for ; Thu, 25 Nov 2021 21:11:37 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mqBiq-0006HM-L0; Thu, 25 Nov 2021 10:11:20 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mqBie-0005wO-VP for kernel-team@lists.ubuntu.com; Thu, 25 Nov 2021 10:11:09 +0000 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id E2EC740742 for ; Thu, 25 Nov 2021 10:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637835066; bh=iRabhOxifFk2Uotca4fAZIHPEKOAQpK5tFIsJxXmEtQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=LGGPKS9HTbLEmaDK/noO7DFUqxokCVDZzbYARgZAGxAwbYK8eSX4oeQPK0Lra5A4r 7yTpDclgY0z07seO0qO2ChpezER2Yi5+WLKC8CvZTpjZhSNyBERydX+/UQ2wUePoHW G6C3IkDdNFxzV1dXUeoAcjq9PRG5g+aMY1NUkqPvHq9/7WDoO7lA2cBrfEe9eNWV3Z 4F7+1NLbjMQLlq5f2U/pVFoZzqR1kfcGNcpL7bPpyzpng9FhB6ZFVBgAqZ606Jdpgm foy8/+rDD/R9L1ek+JaBCpokL90gxWrfRGOQHiJPlsZgucnSStRVX31Y1aGjbu8gfr 28ynFs5TLHxJA== Received: by mail-pj1-f72.google.com with SMTP id n6-20020a17090a670600b001a9647fd1aaso4669802pjj.1 for ; Thu, 25 Nov 2021 02:11:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iRabhOxifFk2Uotca4fAZIHPEKOAQpK5tFIsJxXmEtQ=; b=Ux7z5EI69ZAVYETXeyhFXFrQJZYVAKkVjUdRSOSoCkPmew4JR7/cKv2SQv6R31ct1R qcTKaZmqt4lGehKja+YfO8iZpJ54AFR+ueyYVDZ3jaAhW67j6FjgA38wK4S7ghussgM2 2UgTK5B6XItImEypysrtLw48q/TFn7kXx8+DWMl+P27Myrs0zyzWo638USvKtht9RYeG b50gTnxfCDujLGkCHC4hkpg/2KNhCky5WXwhg+UGSTNnlGIdnWnDUG7QRVxnKKKErKJN ikphin/56HbM3RE1/CLTSiCyJWAxsniu8h9qcvn0LKQt1cQo0zQflfCzo6R/opVsdSRj 24lw== X-Gm-Message-State: AOAM530KHIdAp5Kt3dLq0uX0LVLIUJiWRM11aq+uCjHTJvcHvUtVEl2p Ot7KdVQ9MYr03V4ourD2SW7r40WtOKET5OFY/b2VTa6dDqwuMKKB+q61joKJRDpdL7Z3pxFeTFS w8REhpc6XKUPAhZZJ/m1PaiKyuGJhwhzhI0IVBWAf8A== X-Received: by 2002:a17:90b:20d:: with SMTP id fy13mr5529061pjb.47.1637835065377; Thu, 25 Nov 2021 02:11:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxIhSh/8/1g2U1oRZG1gzBFGX+MyD4NDCprj2rNUnhZiy3Ti4RC9tK+Zaf+0gX9Y7OF0cRfw== X-Received: by 2002:a17:90b:20d:: with SMTP id fy13mr5529032pjb.47.1637835065117; Thu, 25 Nov 2021 02:11:05 -0800 (PST) Received: from localhost.localdomain (111-240-133-170.dynamic-ip.hinet.net. [111.240.133.170]) by smtp.gmail.com with ESMTPSA id il7sm2554831pjb.54.2021.11.25.02.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 02:11:04 -0800 (PST) From: Chris Chiu To: kernel-team@lists.ubuntu.com Subject: [PATCH 05/12][SRU][Jammy/Unstable] drm/i915/tc: Don't keep legacy TypeC ports in connected state w/o a sink Date: Thu, 25 Nov 2021 18:10:49 +0800 Message-Id: <20211125101056.20316-6-chris.chiu@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211125101056.20316-1-chris.chiu@canonical.com> References: <20211125101056.20316-1-chris.chiu@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Imre Deak BugLink: https://bugs.launchpad.net/bugs/1952041 A follow-up patch will disconnect/reconnect PHYs around AUX transfers and modeset enable/disables. To prepare for that and make things consistent for all TypeC modes stop connecting the PHY in legacy mode without a sink being connected. This was done before since in legacy mode the PHY is dedicated to display usage, so there was no point in disconnecting it. However after the follow-up changes the TC-cold blocking power domains will be held as long as the PHY is in the connected state, so we'll need to disconnect/re-connect the PHY in all TypeC modes to allow for power saving. Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210921002313.1132357-7-imre.deak@intel.com (cherry picked from commit 675d23c14821fbaef3df5cbad94b42ec2e3a858a) Signed-off-by: Chris Chiu --- drivers/gpu/drm/i915/display/intel_tc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index f9242056693e..6d0a1b376767 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -527,8 +527,6 @@ static void icl_tc_phy_disconnect(struct intel_digital_port *dig_port) { switch (dig_port->tc_mode) { case TC_PORT_LEGACY: - /* Nothing to do, we never disconnect from legacy mode */ - break; case TC_PORT_DP_ALT: tc_phy_take_ownership(dig_port, false); dig_port->tc_mode = TC_PORT_TBT_ALT; @@ -596,9 +594,7 @@ intel_tc_port_get_target_mode(struct intel_digital_port *dig_port) if (live_status_mask) return fls(live_status_mask) - 1; - return tc_phy_status_complete(dig_port) && - dig_port->tc_legacy_port ? TC_PORT_LEGACY : - TC_PORT_TBT_ALT; + return TC_PORT_TBT_ALT; } static void intel_tc_port_reset_mode(struct intel_digital_port *dig_port, @@ -659,14 +655,8 @@ void intel_tc_port_sanitize(struct intel_digital_port *dig_port) "Port %s: PHY disconnected with %d active link(s)\n", dig_port->tc_port_name, active_links); intel_tc_port_link_init_refcount(dig_port, active_links); - - goto out; } - if (dig_port->tc_legacy_port) - icl_tc_phy_connect(dig_port, 1); - -out: drm_dbg_kms(&i915->drm, "Port %s: sanitize mode (%s)\n", dig_port->tc_port_name, tc_port_mode_name(dig_port->tc_mode));