From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 2D6E831DDBB for ; Mon, 25 May 2026 13:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779717083; cv=none; b=A3Ec5buglylpyN8AzGAaqrEZ7R6bYBdOfqkDt/K+SlKRY1ecdYOS66MTA00BsgQ4DT0Iy6SVbXz5wQIR1gB/5YSZqkPe0rxgyuSAtlTJOoMgucZDDbzuCx9AnD+rSjK2VvTyh16+xsc+e5YzfpNiDBFC+zw9wByheFs1IzJPA50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779717083; c=relaxed/simple; bh=1atNRZetigH77dUmSfj77y90koJh4R5EhDL7mGqCL3s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s2P7Pu1rN0/7r+AzT5GuXDx/ogjrz0MndxDIarX9uIHEKQ1Rs7sDKJrS5sAPSggG1PO/u/VvPrHPnnLmW3bK8LJvqUMzDOEzl4lDAr96e4+NxGMElwFiYocob2I+PPxWw8SE/T42nXcoBAgAak+lU1uDnhNKp/z2rwI4j98oiwg= 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=KXKkg+Z8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Rb+l6C0O; arc=none smtp.client-ip=205.220.168.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="KXKkg+Z8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Rb+l6C0O" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64PD3p553604230 for ; Mon, 25 May 2026 13:51:21 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= TBi8TFsiSGuDtHvREBnTkWTPDNdkV9Tw5zfg0QAYJ4k=; b=KXKkg+Z8vBcXBtsX KHmRyL7KyAWVnoCkVIiaxygnDIS93yFjFtE40PlQ+2Rq0g5uhDGkICqiRmV6iqCy jjuZHOdcm73BRHvw47aYpFvAI+x5bp9eqmPGqzUFLQUPXtt++yFlUH9dtadOhORl CZxU13Vy8fhIlNCDEzKH18UL1g+rVO1I21XXLIK3gizce2f65pr5CWotJWKJVE3C AcBtMjQqWniX5FCWD9oCnovX8fSRlvhOdkMlHr1odPzM0QijIUEPUHJLppdZFYPq x91Z7MQBj6qAO3jcKubJPyLJlkh2++/yT9P/GXubr0BUg/lusw9kjH72v4++E7nH ZA14gA== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ecpyqg65w-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 25 May 2026 13:51:21 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-914aa01cc21so69959285a.0 for ; Mon, 25 May 2026 06:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779717080; x=1780321880; 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=TBi8TFsiSGuDtHvREBnTkWTPDNdkV9Tw5zfg0QAYJ4k=; b=Rb+l6C0OMZIvZdmS7SWv0rFp9Mf1gdATa3PNiMJHy3UXPEQkBvQXatjtedbdthfP+x Pth+8q4YjdFes1vj2f0qZ0YXRL9FHI1O4ckRkx+iOa9ytTRiNAkBxq28s0Gz975ZnTzT FcoJsCLK6g1pJiEjwTu7PDJb8Y1GwCU5hOjKeS2IGVkAxfa3993ZhI3BLECODD618732 yaHC1pdAdp2dr1v/rX/D5GbvbkrMnYqMSV+CMVt6RjWQS3lw2F9rfQ3HVovyBxwVj8aP x1d6XPv3CkRQMX5tLph9yLaC63LiGTDxJEqi47qMQL7yz5LL5mG4WeZhX5Hv9cOYpXyM X9/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779717080; x=1780321880; 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=TBi8TFsiSGuDtHvREBnTkWTPDNdkV9Tw5zfg0QAYJ4k=; b=j8S3R6oh5qhqCL9MsDzO3reXbzxeOg7awGMd1XG7G/ByvM/iIFjdxMND8DuY2pqdsM j2bO35v3bRMIuxm7JPQPHvoWp1cf0okvwa6UCMjvipwjcGu1HH3lYDrOEFUQuKDgjsos TzdeORjwBKRnkf4PzMvPhDe247kIS4oSVksQEXzNdRvoVn3coU0yU3qGGLAJMDBHV4mX LyHaaonkODagPeFM4lYqfhiaAFE3vZFbzfg6VNO7ELW4z6DZMc7DCYw2M/LJ5VjMxnQH HQ80Vtq07uj0NEtgCP2Jss/IzBs+bF26zYtcwaLalh7Qnox/3D5hUeFarV4RWz/b6639 /+UQ== X-Forwarded-Encrypted: i=1; AFNElJ/vR80OAa/R4voajCZBO45K89BEv9A58/0vvXpdqOvsH8HK5kxvo9BqLVQLX4LM4iFmFi45HN1nME3x8Jk=@vger.kernel.org X-Gm-Message-State: AOJu0YySxt1e8GaPY5e26Yryfu1sX8kP13L9zmS6JW6/0enN2a6VeZ6Y 27HpPzMRnVwLYgsEPag3B6tjz7Bn5LIc7vjznPyntyrBlwXJMiPj7xTY+EUo7rWsMsWb/9ppeYv sp5hZeub+OdBxUPzegC4ioAwIfJqqrSeXpEKldmkJNxN5XoK9tjjZxgc1ZxIf8FWAF8M= X-Gm-Gg: Acq92OHQpQ9tEhRj8z07vJhH5e0Eq3+t9JhpbDAW4JnEyjQd5bfkkJoDj2vyDOzVziB XknjhXFUETc+AlTt5AQxiUrhkX9w1bVmFtL5o06M6r2N1aEh9sAFDLYKbbxcJcBo1sp5/c8bwZR WhNS5T82aDwSkm0ZHSFQQl3LKj+djEYTAlK7lKfooJHUfun0hFjm7qcm/fEqh25Dzf9XckxactT 6dsFNznDXVXFiISTmpJQwpMWDNS0RYun08ATlZrRVRhgvId64pVV0ZbTSCtBddXIH9L9Pl++/yC Famdn8NIuTXSjKh/W0XqU9imX36npJJZ2lHGljgU/nVzAV5/JA2YSuP81r4IhhoD/uPtHPefmcA KHGB/iO1IK8UUzzZjQaKpNvAax4K7t3IxDYZnhQccVDOjJg== X-Received: by 2002:a05:620a:462a:b0:910:79db:c946 with SMTP id af79cd13be357-914b49a1bf3mr1379219485a.5.1779717080498; Mon, 25 May 2026 06:51:20 -0700 (PDT) X-Received: by 2002:a05:620a:462a:b0:910:79db:c946 with SMTP id af79cd13be357-914b49a1bf3mr1379215985a.5.1779717080090; Mon, 25 May 2026 06:51:20 -0700 (PDT) Received: from [192.168.119.254] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-688baf2ec1dsm3984677a12.21.2026.05.25.06.51.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2026 06:51:19 -0700 (PDT) Message-ID: <0c6ace6f-26e3-4a15-a467-1715480b1115@oss.qualcomm.com> Date: Mon, 25 May 2026 15:51:15 +0200 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 v6 07/10] drm/msm/dp: rework HPD handling To: Dmitry Baryshkov , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Kuogee Hsieh , Yongxing Mou Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jessica Zhang , Val Packett References: <20260524-hpd-refactor-v6-0-cf3ab488dd7b@oss.qualcomm.com> <20260524-hpd-refactor-v6-7-cf3ab488dd7b@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260524-hpd-refactor-v6-7-cf3ab488dd7b@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=dtfrzVg4 c=1 sm=1 tr=0 ts=6a1453d9 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=V3MyGVYEbErwUeSx0MIA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: fKolKgwyMmtIdKcLnIxXLGAPfpq-i-S8 X-Proofpoint-ORIG-GUID: fKolKgwyMmtIdKcLnIxXLGAPfpq-i-S8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTI1MDE0MiBTYWx0ZWRfXzb9b67/mR1kT DjfKqGH83TbGVD9BAsAZn83z0kpKpBh72Xp+VhxFW3asBSY0JKv7E10gVnWRs9peEQH0OyAEuCg Fu6Ly5JB2E310UkfZ6uokhPH4FUU6fFevCU0K+iDbome9X2pX0jRwUtXmWp1wapE0Vw68Oc5vLX ttZwuiMOFG7J4Z5B3IysXQwcUiLE5hwoM48T1KwFUzqxEjJGsHPCKcbK6Ku3zUMkb/KTADpHLfb E3TiQJuod/eEOF4/Wo/GOdQW2xDsL0f0Je36OingTpAIcq8oaq3OwZCBNfxoJn3XGr68DtMrVvA lhymdg0FktLS9N0LQJLwBLoNcM9R7t9DOkwIfkMczYI7JrC2rF9e10oGsB7o+f3szmJSkrfJ0JW XPAcslQPYAAoPohGMwrGZpf8EXrDB/52g2NQnAKfRKt5mabjCFuTM2M94tpTEregWgSgx53vLyH rXYRTkG2OaBPYpRl4mg== 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-05-25_04,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605250142 On 5/24/26 12:33 PM, Dmitry Baryshkov wrote: > From: Jessica Zhang > > Handling of the HPD events in the MSM DP driver is plagued with lots of > problems. It tries to work aside of the main DRM framework, handling the > HPD signals on its own. There are two separate paths, one for the HPD > signals coming from the DP HPD pin and another path for signals coming > from outside (e.g. from the Type-C AltMode). It lies about the connected > state, returning the link established state instead. It is not easy to > understand or modify it. Having a separate event machine doesn't add > extra clarity. > > Drop the whole event machine. When the DP receives a HPD event, send it > to the DRM core. Then handle the events in the hpd_notify callback, > unifying paths for HPD signals. > > Signed-off-by: Jessica Zhang > Tested-by: Val Packett # x1e80100-dell-latitude-7455 > Tested-by: Yongxing Mou # Hamoa IOT EVK, QCS8300 Ride > Co-developed-by: Dmitry Baryshkov > Signed-off-by: Dmitry Baryshkov > --- This is way too complex for me to grasp at once, so I have a couple nits [...] > + drm_dbg_dp(dp->drm_dev, "After, type=%d\n", > + dp->msm_dp_display.connector_type); Most debug prints added in this patch have odd indent and some have vague messages [...] > + /* Send HPD as connected and distinguish it in the notifier */ > + if (hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK) > + drm_bridge_hpd_notify(dp->msm_dp_display.bridge, > + connector_status_connected); > + > + ret = IRQ_HANDLED; > + > + return ret; Return directly [...] > +} > + > static int msm_dp_display_request_irq(struct msm_dp_display_private *dp) > { > int rc = 0; > @@ -1247,9 +933,13 @@ static int msm_dp_display_request_irq(struct msm_dp_display_private *dp) > return dp->irq; > } > > - rc = devm_request_irq(&pdev->dev, dp->irq, msm_dp_display_irq_handler, > - IRQF_TRIGGER_HIGH|IRQF_NO_AUTOEN, > - "dp_display_isr", dp); > + spin_lock_init(&dp->irq_thread_lock); > + irq_set_status_flags(dp->irq, IRQ_NOAUTOEN); > + rc = devm_request_threaded_irq(&pdev->dev, dp->irq, > + msm_dp_display_irq_handler, > + msm_dp_display_irq_thread, > + IRQ_TYPE_LEVEL_HIGH, I think this field expects IRQF_-prefixed flags too Konrad