From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380593; b=jyE/hcFxy2P1i4n58jizUMZ672nVxiD1dPxmF3yDbmuFgp1dvPK09o7aenqahekLVcb4 deO9uCiBJPu81zsGVkYxIBUONImfoesGTcE4nI5J6rFRFmgEfhnU3Cs45MWBnB61vQXMF c1FlRhEVjbU/QVcC9pH2X8F094VHlbo2eVP6cvj4d02c5YJeS7tF8qXjCmOn0Cw5m/i+D y4BVPwzCk3qPnPLpGNzacw2kBD18B2cQt45Gx0+M6ZpuqRmSgemrmCnwPgARysz+JzmTB SPTMhf+hDwez79wuXH0RKz4XD1avd3JbCKB3pIwB5siXXYezWk+8reQf7P8oys7E3UA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380593; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=0dWeETmQ3qYYskuXH69Z0psziek3/WDAlRUYqoswtIk=; b=fx9zFXRzKb94Oit0QynR3JzHV6oBdqCkvin4xQ9x16k1CwIjdJc9FPTc9nbv0n6PEVQ1 qv1KnxHyj4IXrFRINwRDdqPXFc4h6sx6tGd9kLTZqmlMlFmqAHlnzkn0FNgnHFm5CwYje PsoUpyZgY35qUEfx+ZnigSRV8spha4J+d8nC1BJ5mGMIorFuprCHcrvgm47uw8OxTnyVc xhtYXS+dDEgO2PBnYNPGUOktLiY7YuFgbhcVYDRLNEhJ6/UKJsUCPdccjIX0Uvb4UaBi3 JbGfsxN9FuoHK84OdigXP/J4X7y71kRqUOEcaZU8C1KUOKFSSypFgJnR5mbQAos6BbA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=F6RR1fbl; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8E73606A686; Fri, 4 Dec 2026 10:36:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=F6RR1fbl Received: by smtp.kernel.org (Postfix) with ESMTPSA id D82321F000CE; Fri, 4 Dec 2026 10:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380593; bh=0dWeETmQ3qYYskuXH69Z0psziek3/WDAlRUYqoswtIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F6RR1fblVfg6WGBhJo/ggQGYJZzhhmAaLOaLx+r3XxV1oBZbHpMc6Xl849NXYUqR8 kCnyAAIdWhQG9jzFikuNIkKGz+kSA3DpSuL6GP12+KDpS0sLbMRY0jdhnZL5SII6Sb 4TXopIJhIhTzIJP34xBLHRt/XKYfi7QJwhNqdBGQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mika Kahola , Imre Deak , Joonas Lahtinen Subject: [PATCH 7.3 340/742] drm/i915/dp_aux: Take the TypeC port lock after the PPS lock Date: Fri, 4 Dec 2026 19:03:24 +0900 Message-ID: <20261204100644.084956300@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Imre Deak commit 5a3ffd06d47d3a7694288327855d6faff42ec3c0 upstream. An upcoming change will need to acquire a TypeC port link reference along with an AUX power domain reference when enabling PPS VDD for the port during an AUX transfer. Acquiring the link reference requires holding the TypeC port lock. To allow the PPS VDD code to take this lock itself, acquire the TypeC port lock in the AUX transfer function only after locking PPS and enabling VDD. CC: stable@vger.kernel.org # 6.14+ Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patch.msgid.link/20261029113017.618286-2-imre.deak@intel.com (cherry picked from commit 86fabed8d8cf7db734a9a3f63af5f500cf0ed139) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_dp_aux.c | 39 +++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c @@ -270,22 +270,6 @@ intel_dp_aux_xfer(struct intel_dp *intel for (i = 0; i < ARRAY_SIZE(ch_data); i++) ch_data[i] = intel_dp->aux_ch_data_reg(intel_dp, i); - intel_digital_port_lock(encoder); - /* - * Abort transfers on a disconnected port as required by - * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX - * timeouts that would otherwise happen. - */ - if (!intel_dp_is_edp(intel_dp) && - !intel_digital_port_connected_locked(&dig_port->base)) { - ret = -ENXIO; - goto out_unlock; - } - - aux_domain = intel_aux_power_domain(dig_port); - - aux_wakeref = intel_display_power_get(display, aux_domain); - /* * The PPS state needs to be locked for: * - eDP on all platforms, since AUX transfers on eDP need VDD power @@ -308,6 +292,21 @@ intel_dp_aux_xfer(struct intel_dp *intel */ vdd = intel_pps_vdd_on_unlocked(intel_dp); + intel_digital_port_lock(encoder); + /* + * Abort transfers on a disconnected port as required by + * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX + * timeouts that would otherwise happen. + */ + if (!intel_dp_is_edp(intel_dp) && + !intel_digital_port_connected_locked(&dig_port->base)) { + ret = -ENXIO; + goto out_unlock; + } + + aux_domain = intel_aux_power_domain(dig_port); + aux_wakeref = intel_display_power_get(display, aux_domain); + /* * dp aux is extremely sensitive to irq latency, hence request the * lowest possible wakeup latency and so prevent the cpu from going into @@ -453,16 +452,16 @@ done: out: cpu_latency_qos_update_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE); + intel_display_power_put_async(display, aux_domain, aux_wakeref); +out_unlock: + intel_digital_port_unlock(encoder); + if (vdd) intel_pps_vdd_off_unlocked(intel_dp, false); if (pps_wakeref) intel_pps_unlock(intel_dp, pps_wakeref); - intel_display_power_put_async(display, aux_domain, aux_wakeref); -out_unlock: - intel_digital_port_unlock(encoder); - return ret; }