From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D155F393DE9 for ; Mon, 9 Mar 2026 10:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773053925; cv=none; b=tC2OTI2kpKcMihgXm/qooI3klGd7A+m1L3kiYzRmsmaqkXwdF240TstlDWTLkSdgbFFZhdAlzZM10RnTxkTdcSUo8v0Zwxyrzylv5fqPjUTO6P/vjA3IxX48oBuVlauzH5a4RAkScnznpvIE49B/UNsq3yjZxQfJSiH067JpuuU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773053925; c=relaxed/simple; bh=cPN17tanCuxHIPt66ZVlk+Nknuel7E6wQZegu2AGcWs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eBG12fm89Mr7ujWlZHEyU7nylIlyFTqHbGMQE0ezflKObu9chXkSf0AXn4dwvVPqCioptWMc1n0ZE6SFAIItkrWkur5UCQ/nhCi/kiSrhwDYa9rSrFkTRyZ/RUHkp995YsMyIf16CJQ84k5rnpmy41OqbtcN819VQZ6eFfpVs94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=KAxQJJIx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e45KddOV; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="KAxQJJIx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e45KddOV" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62963egB2200772 for ; Mon, 9 Mar 2026 10:58:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gUAH7KxJegFfyFOxkYyD1UGTu3CJ30xhCcw3r4MXq74=; b=KAxQJJIxo2SEUFx3 PIATAFuPWplP/0xqsR6o2g05LgCnzHl9kaxNKIfgsCU+uK4I/whIQDjdXF4MhGix pleiumRQFVPUzzwek1pCojqUv+u73DAPEktn+n+cw7OgtaZaLWdoBq+MWDiOgRHv mq0lyr0AvL1g0clFYH2GWg8ZWBhBFukLB3A1KNUn9Sf/xqBOSCY9qWmC0s9Zk0g/ K3HVCT+R0jhETNDRvWtNdDm2OqkXAo83jVaVNPuMeqPfmt/oebz7gmqIAbu7tXMF cyTQoL8YtvADq5OHxo/Xt7eZw38Ltm9rblDflcipNRhxSGThDfEIHhrCs7FH5Iph A5H6Bw== Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4crcd8d139-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Mar 2026 10:58:40 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-8954b9b5da7so84051986d6.2 for ; Mon, 09 Mar 2026 03:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773053920; x=1773658720; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gUAH7KxJegFfyFOxkYyD1UGTu3CJ30xhCcw3r4MXq74=; b=e45KddOVbH9vE7KM8SRyFxrDQ06Tlne5DoIol0NevjYybaFEyQiCP62pSe3YoCZ823 fDttU4+YtIGk8WlYcEi+Ku9J0yOkNJh0AbOVXxwsKVtQpXX3GrEUYdVrs/dgZqahy3py AJjx2aC6xjMt1rrtnejtQtv+psmDKDIWcl9kLBi3FR1IzxinwtFpMVq3WE1jcoAeeoxW jWWhRYyCnEb8Cf7wnJbbnrTQXInIYpZQSjwtj0oJU3JF0GCLoMCtrHZq/e9+rBftThpm rqa0REAdG5CSIKxaDAo5yJVWc9ctAEEtA+dY8lvDxictXexsh5K9xrLaFbgQIeIeXg4m ZOGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773053920; x=1773658720; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gUAH7KxJegFfyFOxkYyD1UGTu3CJ30xhCcw3r4MXq74=; b=AyHwUH2lAmKsL34X/9nDQzjixBdoNOXv0NLZ7z/z1zvZI6BPXq46R3gdkDU1zaxoHC EHMwesdfsPbu2oR6UcK7Ta4bvkHt6ULffxhxxAsMXViQl+ECXQnjEcScEYRFsMDseZs1 HO5vo1L9FwAVKhNY2p13YFkxk6uGXdRXzpUJFHIZb5eq/Iv0dUE5HWswVRBbRYr0IdyM h7vyRut6sQpTEOLfOpVvB1zZGCwAA/WGuqEW6Xlqm133AUyGUgvqeDUBDcJZQTG5hKmF hntuGUCiMBaBzZ3Ov6xFfRqMFU7/0ngxOi89Yx4qH4fERMzWRUlqjOyRqbtGlTAI/pKm sKRA== X-Forwarded-Encrypted: i=1; AJvYcCX8LFRyo+0d8VLNbMfnR1KxcuPgWvIvMTHL8rF8v6oGjBhTto8YofU6lki+eYeNssJ8HnexxkqN4REY3rE=@vger.kernel.org X-Gm-Message-State: AOJu0Yyy/ct0yeqk2pRtgjFwP+Rf0mRWlVuj+zaYWzEuqTCFho5p5A7f 2vVJqRjDNvlc52eKHBN/FyXjpOm+cWVtW7Pilfag6UdqQ0osTp0FKuYTqhuenFfHVMCIBOR1cNm o/44UdhyQg8YV6eNh5NFSK4bO5HGBIfWycw0dpqIwdK0doaFGxXnzHTeu7iXwO7AOwf4= X-Gm-Gg: ATEYQzxPswzaYrZLnWgxvKFKrY1uMoLKZ1bv7wqYoNbrdGeMptVpE5CzH+19Mohudi/ njMm6e4GRBQPFBW5xJvs5qqeJr1H/+Ctm3X4Yu9n/8CGeN27hKWRUIVw3E7MDv21EI3f/0fwJON U77693t/wIvY4BS8oz9EKp72XfVXRZTDe5AkU3d0w0bFDCR04WF+sthLC8n9tVoBC36MnSwSm0J KOzj2cyYvvOalI0swJ9pt/1EFeDL05lLmHRq2xoVT8ITcArkftaXFjqxoY7eGF3TYt5vlZaqNTE 66ZFMtqNERvJ0UAQIV7Bgfss1yKTxhmMAOlGfA9vp/jOBL3m103spGe1JDsXPQpf0LxivqHWNMK +kIuurGH5L5/eJxN2Hqm0LGrpM0eRaVLcTgyrmBU3fymxHwI7O+6k+FnctunaKMlpqPZwBuTbcn W7xVU= X-Received: by 2002:a05:6214:8016:b0:89a:4741:2147 with SMTP id 6a1803df08f44-89a4741260fmr40404656d6.8.1773053919952; Mon, 09 Mar 2026 03:58:39 -0700 (PDT) X-Received: by 2002:a05:6214:8016:b0:89a:4741:2147 with SMTP id 6a1803df08f44-89a4741260fmr40404486d6.8.1773053919590; Mon, 09 Mar 2026 03:58:39 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b942f18929fsm353834566b.60.2026.03.09.03.58.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2026 03:58:38 -0700 (PDT) Message-ID: Date: Mon, 9 Mar 2026 11:58:36 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soc: qcom: pmic_glink_altmode: Fix SVID=DP && unconnected edge case To: Neil Armstrong , Konrad Dybcio , Bjorn Andersson , Jack Pham Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa References: <20260306-topic-pgaltmode_fixup-v1-1-ec154b2d8e89@oss.qualcomm.com> <7fcbf142-f2c6-4b9e-bb63-befa553aceff@linaro.org> <0af1c6d9-2408-4111-8738-5eea2c5d42f1@linaro.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <0af1c6d9-2408-4111-8738-5eea2c5d42f1@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: -LwRggmsja8Kdvtxn9wRMh4n6IsfIlae X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA5MDEwMSBTYWx0ZWRfX+A5Vke8BI7Lz NoPT/b1PllXCkLiEwtEaVc2gro4pKabxW4PtVqjdg1IB7ouO9vDpxhNg6QBsvt4yhwxswf3N5ZD KBRmCzju+d1EinY2qLVn1elOTLkptTvg0YpPBF1pq22sMviFTq7yaOUrnrkGDceq/SHNMDqPiqa 5Y12QQDi0OVhM/2L7RGQFdgMCb5VFFQjKF+pSAaxhIl913tFHZJagx3zyJbPiQoIRYxr5U2beSa Yo13R3B8UXOhNHeJrgV19CxrwCQi4ZCuHSttrJyCKvCD6OUXoND9y9gq7bSpZNGzy/mnOLDqWyy NShUEr6JfvCtmkFsnu4YMens7MSsGITR91WLDvC7q8yqoK+xblOJXvb5LBRq9TUiWHa02tNMVBo MAMb4s1vxJPYCegBJhTsupYtdLwOaBeukN5dVaD0vzOd0kUnpUpxIUvNCbswd6Rk6TLku2+i1tN Pu5HxX8gWjJJrfwJinw== X-Authority-Analysis: v=2.4 cv=O/w0fR9W c=1 sm=1 tr=0 ts=69aea7e0 cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=mZ143PVFjIVEdXETRk4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pJ04lnu7RYOZP9TFuWaZ:22 X-Proofpoint-GUID: -LwRggmsja8Kdvtxn9wRMh4n6IsfIlae X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-09_03,2026-03-06_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 impostorscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603090101 On 3/9/26 11:43 AM, Neil Armstrong wrote: > On 3/9/26 11:38, Konrad Dybcio wrote: >> On 3/6/26 3:47 PM, Neil Armstrong wrote: >>> On 3/6/26 12:20, Konrad Dybcio wrote:[...] >> >>> So what's the difference with : >>> >>> >>> if (blah) >>>      ... >>> else (alt_port->svid == USB_TYPEC_DP_SID) { >>>      if (alt_port->mux_ctrl == MUX_CTRL_STATE_NO_CONN) >>>          pmic_glink_altmode_safe() >>>      else >>>          pmic_glink_altmode_enable_dp >>> } >>> else (blah) >>>      ... >>> else (blah) >>>      ... >>> else (alt_port->mux_ctrl == MUX_CTRL_STATE_NO_CONN) >>>      pmic_glink_altmode_safe() >>> >>> >>> Before, if mux_ctrl was MUX_CTRL_STATE_NO_CONN, it would set to safe mode whatever the svid, >>> now it's either in the DP case or at the end. >>> >>> I don't see the difference here, except if your desire is to ignore >>> the MUX_CTRL_STATE_NO_CONN for USB_TYPEC_TBT_SID and MUX_CTRL_STATE_TUNNELING. >>> >>> But it doesn't match the commit message at all. >> >> >> The difference is the call to drm_aux_hpd_bridge_notify() in the DP >> case, which isn't very visible in the patch diff. > > Oh I see it now thx, but with this change MUX_CTRL_STATE_NO_CONN will be ignored for USB_TYPEC_TBT_SID and MUX_CTRL_STATE_TUNNELING. Both are very much intended For TBT SVID, it can only show up if STATE_TUNNELING In the other case, STATE_TUNNELING and STATE_NO_CONN appear in the same field, so only one of them can be present at once Actually that's why I made the mistake of ignoring the DP case in the first place - I assumed NO_CONN must not be valid with any active (alt)mode, but the DP path was wired up in this.. interesting.. way Konrad