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 1BDBF219A91 for ; Mon, 21 Jul 2025 04:18:26 +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=1753071508; cv=none; b=ZQjttV3qe1HsDVnE8CDbT2qL2YKT6IGtEyWDDhEqWPv4ex21IRdCihyDgouUCUSlH4FCo8p504sC8pzGQgVYkrfK2exNBlqN+k5mSRu6jyv3uuO/ACqaG7J7E181Me+n+lvGnJ3W9O1ghNg7cgvwODm05KfwvTmkTNTqHJTX71U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753071508; c=relaxed/simple; bh=zVvUOIlnKKCqQgJ3kE21UViYgXE0z1AIp5kpX5JAwaU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N9mslsKN0YSwfyQ00tQ7FzNlWfyp+lxAt6YKrwQE9MBQowO5ru1J+meEcTvjf5mnDGN9zxKQ7mV2+eOJ8wtC7ztwMy9RS4RIx0rD5iaxbjy+ScwdVH9FlqGqEnnjEL0WFnZlkLFnOzTmywTHQPqQTa/VdNNko2NTinjuaNGY4WQ= 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=Pd+gqMZN; 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="Pd+gqMZN" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56L412kx016585 for ; Mon, 21 Jul 2025 04:18:26 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= 0HxS55+QTxxnhovCNlJMVgeCUCIs7adrQbeCrM4+8pY=; b=Pd+gqMZN6VlsReQ2 ApLJJ3KRx8yfPGzjKNebwJ80Go6FToeUYYa4O3lfQ5S2qmB4E34dhEzTL4M9KXN7 vU58SaWiWgI4OzuOYPgSrgb4RQf375zxiPkmT2RUyzmLU7FJsSnJTkBQqSIc0xQe hH68NESm3siMXM5EMpgKo76pIExrNphUcOUVqi/jQgSj23wvtEG8dmGSi6TaCuPI thk+Z/BVtHM2Lw4D3n6mBmBwz1l9IKfKnqGriP6TdGbt06GYnx+uoH91zzfPDYI6 F/Oi+QNMY1ijMZcOsntm8K2USXBvnjx669FrqrQIPQixelVh80lAKL/3UoieitQL j6WMLQ== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48048ruc8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 21 Jul 2025 04:18:25 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-74cf7913166so401041b3a.0 for ; Sun, 20 Jul 2025 21:18:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753071504; x=1753676304; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0HxS55+QTxxnhovCNlJMVgeCUCIs7adrQbeCrM4+8pY=; b=qPP+hsIdFKs/gwJWzEwxohBolcHnzUYS/ZjueAptMfIaqBzjhPWmyDSRlxVu2KH4no EHRZLVOlNXJqG67THkot67AXwHEZOf8ejGpuoY1f591pF1eUKwOqKhKRbDgp4k0pLNgw 8T4CqXoNcf1ywMTIeHgks0V2fFKRs7WT0rmJTUiIEsmegzwSsx1kJIKJbgk7TGwIWBqm B9U5h0k7VnwtphqZF/4X8MGPhbCUc8v9AHbe3vXJ0uaEOG0v+OIF+mVIvM5irwUQEkVE i8Xc/4EWfPQg0jDfdi4vICw2GCmyRoEfyb9OVQE4T5hz7KmKs7WGEazvnv7xIA4lNs4c eXlA== X-Forwarded-Encrypted: i=1; AJvYcCUIuaO31cuDNeSBr4XxDfFX+2EtzjnbKzZiVOBq5vcT7z5j5uBvA/xxr7rUsvvC2DYF2eDRJQ/GqdA1xQk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1pNV7/FS1j++DNU8NklRvlFjFcGp5HRSvlNLMd1WYvf7Zmu7H 385EBniGW6mwX1qpBf582MVOKKX3jic8D6RAoKBodthyUyya+72m618jxzm0+XwF6o+Ux0MNwyM doe23E2Qm01ATSPVkhr1Zz8rWHanZ3k0DADxAhcytSi3HvYY5BXu5XATvjhnDGpz0/sA= X-Gm-Gg: ASbGncubhe2IGjsz90ys+MPh8OKRADwymbb0hyd3fyRhv00aj5WgK8SloQJ0+aQMM6T oOw/+NE/FFHo7xxrsCoUIOZl9KsaPtuGWX8Zk0VIGx85l2yLfY4tofK9jq7IfCSDY9a4t9BnlUP vUv07AnX32/hulMGB4IRVi2OEzqqdE6aZF1tPVWIueDe8oqvoGyprYabtgZ+R/Ra0AQkZYTwgwK nC6UkPUt5cru5COvU4tAhqDwbsveis4Z3sNL8z37whaapmSxp+7RjrEwD1XSsPjXmgPVRJqEmMp CWAhsVZX3CDbGvHWvCBZjpzSHf5WaV7P+L1Mc864/9ekchNhWpQJrWFApSyQKl0WULovQcfixa/ ab6tmK7If2oxftczeR22KunkHPPsS X-Received: by 2002:a05:6a20:9147:b0:1ee:d6da:b645 with SMTP id adf61e73a8af0-237d5c0df9emr13823361637.4.1753071504495; Sun, 20 Jul 2025 21:18:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9E+Jpxuf/n9mwdKcrc+ICdr6n87fGKbL6wE5SUt8XIJ2tugZsZ8TP4nLkT2kWBtaUKyMt+w== X-Received: by 2002:a05:6a20:9147:b0:1ee:d6da:b645 with SMTP id adf61e73a8af0-237d5c0df9emr13823324637.4.1753071503997; Sun, 20 Jul 2025 21:18:23 -0700 (PDT) Received: from [10.133.33.17] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b3f2fe8ea7bsm4493637a12.21.2025.07.20.21.18.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Jul 2025 21:18:23 -0700 (PDT) Message-ID: Date: Mon, 21 Jul 2025 12:18:16 +0800 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 7/8] drm/msm/dp: Retry Link Training 2 with lower pattern To: Dmitry Baryshkov Cc: Konrad Dybcio , Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kuogee Hsieh , Vinod Koul , Kishon Vijay Abraham I , Linus Walleij , Bartosz Golaszewski , quic_lliu6@quicinc.com, quic_fangez@quicinc.com, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-gpio@vger.kernel.org, quic_xiangxuy@quicinc.com References: <20241129-add-displayport-support-for-qcs615-platform-v1-0-09a4338d93ef@quicinc.com> <20241129-add-displayport-support-for-qcs615-platform-v1-7-09a4338d93ef@quicinc.com> From: Xiangxu Yin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzIxMDAzNCBTYWx0ZWRfX42taquz5jzEX IXmjr3E8/PzQDmUTsPBeck4pxFyeJ6icG4PMaBjZgAg74u/37VORTDQi6JR6Z6tGBAEUZzPEySp PyNGGSosEtVehFnQzxQgf6AoRyDrjRrJQOHA2ukbfpAMuJ3reYp9P4tjZnmQyUSvE5ICELesvS+ VHJ6SA7fmrdqbyDgiBO4zCycm38+84BFTpqcpViI3vA/iAtU9WcWtwj2zf0BI36//LP8BHE6DBx 3e6Xv05iFY/yCMw6+pi1GUrySla60f1ZzAko3mcxBc3vjpoqnz6JeuJCOQHmO8Z4gV/k9huuHzS X5wdhowUoWyPGK96TmJRngE5RZXfNopEH8rg2jvm7kSYf9fMZwUUR9Ub6u7VLjRpgy/Uk8DCLMi f4RdvyzrpMUIIHYnNQLQwdzRWw4DMsSCS17cvKji+KUJk5JrK16Hh4RSl24wvjBD2IKGP5fA X-Proofpoint-ORIG-GUID: G5F2macNwBsjTACwjeA-t_zILb4SAu8k X-Proofpoint-GUID: G5F2macNwBsjTACwjeA-t_zILb4SAu8k X-Authority-Analysis: v=2.4 cv=OPUn3TaB c=1 sm=1 tr=0 ts=687dbf91 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=q-zp-rPcFIMxVU44S18A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-21_02,2025-07-17_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 phishscore=0 malwarescore=0 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507210034 On 7/19/2025 5:43 PM, Dmitry Baryshkov wrote: > On Wed, Jul 09, 2025 at 05:16:02PM +0800, Xiangxu Yin wrote: >> >> On 5/28/2025 4:49 AM, Konrad Dybcio wrote: >>> On 12/3/24 3:07 PM, Dmitry Baryshkov wrote: >>>> On Tue, Dec 03, 2024 at 04:13:22PM +0800, Xiangxu Yin wrote: >>>>> >>>>> On 11/29/2024 9:53 PM, Dmitry Baryshkov wrote: >>>>>> On Fri, 29 Nov 2024 at 09:59, Xiangxu Yin wrote: >>>>>>> Add a mechanism to retry Link Training 2 by lowering the pattern level >>>>>>> when the link training #2 first attempt fails. This approach enhances >>>>>>> compatibility, particularly addressing issues caused by certain hub >>>>>>> configurations. >>>>>> Please reference corresponding part of the standard, describing this lowering. >>>>>> >>>>> Per DisplayPort 1.4a specification Section 3.5.1.2 and Table 3-10, while the standard doesn't explicitly define a TPS downgrade mechanism, it does specify: >>>> Anything in DP 2.1? >>>> >> In the DP 2.1 spec, mainly on section '3.6.7.2 8b/10b DP Link Layer LTTPR Link Training Mandates', defined 'LTTPR shall support TPS4'. >> The other parts seems similar to the 1.4 spec. >>>>> - All devices shall support TPS1 and TPS2 >>>>> - HDR2-capable devices shall support TPS3 >>>>> - HDR3-capable devices shall support TPS4 >>>>> While these capabilities are explicitly defined DPCD for sink devices, source device capabilities are less strictly defined, with the minimum requirement being support for TPS1 and TPS2. >>>>> In QCS615 DP phy is only supporting to HBR2, we observed a critical interoperability scenario with a DP->HDMI bridge. When link training at TPS4 consistently failed, downgrading to the next lower training pattern successfully established the link and display output successfully. >>>> Any other driver doing such TPS lowering? Or maybe we should be >>>> selecting TPS3 for HBR2-only devices? >> This logic is porting from qualcomm downstream, > Hopefully a downstream has some sensible commit message which describes > the issue and the configuration to reproduce it? The downstream commit log shows in 2019/08, SM8250 (kernel 4.19) type-c DP meet LT2 failures on Samsung HDR curved monitor, the pattern lowering fix was adopted. On QCS615, an mDP-to-HDMI adapter cable exhibited similar LT failure pattern, and it's works with this solution. However, It's rare compatibility case with special device and lowering seems violates protocol standards, maybe not suitable for general deployment. >> For other device, only found in some older Tx chips like i915(intel_dp_training_pattern) used the maximum hardware-supported patterns, but not lowering. >> >> According to the description in DPCD table 2-232 003h, From the DP spec perspective, it appears that all supported cases should preferably adopt TPS4, as it is more robust. > If other drivers don't perform this kind of lowering, I'd prefer if we > don't perform it too. Agree,  I'll remove this patch in an upcoming version soon. > >> 'DPRXs should support TPS4 and set this bit, regardless of whether the DPRX supports HBR3 because TPS4 is more conducive to robust link establishment than TPS2 and TPS3. >> 0 = TPS4 is not supported. >> 1 = TPS4 is supported (shall be supported for downstream devices with DPCD r1.4, except for eDPRXs).' >> >> Although maximum capability of QCS615 is HBR2, but the actual pattern supports TPS4. >> From pure design perspective, it would be cleaner to drop this lowering in next patch. >>> Bump, this patch looks interesting and I'd like to see it revisited if >>> it's correct >>> >>> Konrad >>