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 A09DB2E718F for ; Thu, 30 Jul 2026 12:46:45 +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=1785415606; cv=none; b=uRBxSCd4UssvS7t9jxsuyWDKrJnkgxgXtk2ajQxlchzQxox9ASy6vz/mUgaC0gfCMiC7tqrRwXK6TbMC5Y0lBnvTy7hPJJSg12yJFNWWSewJlv3ZNPVzos7WG2jCNEwGCaL3MVHKRzHjSKEADtaQYM5H69d32dKdAeR1Y1q79Jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785415606; c=relaxed/simple; bh=EFGTEjAar5YhWvy8+yn14BXjJJUj+nzWsgy1UuC08vU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=EtJmHjpY5Fgx2csYmcESbsYAHj//xTgqagL/uHdKbOEKcQp1L2gHW4LhPznKeWgkz6vCcsPeuzccItYwTA16oCEyRw6LV6mviGXb/BoTunTd4ugu6ZOSu2hSr9qrKTD3v8vlJsW4cD28E/y+/pvwJL3TISGHKyTpSCGZ7mEbwzw= 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=o+Srbpp6; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Fwyenrln; 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="o+Srbpp6"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Fwyenrln" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66UCfQKi643033 for ; Thu, 30 Jul 2026 12:46:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=BqbrmHoDLhgXhTFX5QmIyC tjQJ8YVIbFwSlJNmOQKlk=; b=o+Srbpp6NQVjwn7F7wSHgxJCd1fHqMQ0Kpz3H5 W5T++fttx3gpwLCiaRFoQRS8BYHK0Z8MGodB9+OAWskvSMLFvQZ09MY4gt7DLPcl UV4+HavGsw31ITktZNT1Jvkxbj23oJcQA3uZTkZQJVYWW+0igybwnQcNXY+UtYb/ fLAT8SzF1inBPk8WM3g2gsBjlNcJZcydolznKeLi/cWGv7SYS0N80XSjzER8PKGw YjohthjT1FPIcmlH7dlBge+VZmu0RMYWYO0KRBDX6wYAZaSQ4fenXIxuxEYiUD8+ yyyjCRPK9qk9CHDIeMslWMXAievamMtKEkZEjB/Eo0QM7D0Q== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fr6ucr0tk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Jul 2026 12:46:44 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-cb11535e6a1so1723341a12.0 for ; Thu, 30 Jul 2026 05:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785415604; x=1786020404; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=BqbrmHoDLhgXhTFX5QmIyCtjQJ8YVIbFwSlJNmOQKlk=; b=Fwyenrlnn71F5nsad/DB18bhaYAjdWDakDjMkmFDdKBVl5hsFECcduHSwTDOlcqxpc kHSam7zZNThKdLo8d+Acs+0bL/h0f/sCpjGQqIRB2QnmolBAV9ZunkNvdET5UFCOyWxI T1ekgpUIVjtgQ7hlhZbclZvjtSE5bWuHMuhIAcUGDEji6X0S0CPPl0LsxyG1GOHdo/3a wFM1FCocEiBcfZb66ct8NQD8WLrowtEBZ+it7uhhAQUiwdHUbGzokjznW1UwDciJuS4N 6fM3KohEOoFdD2szB9SDG9qtXTTWmqNHEQOfQPyeX74py8vCAv3yu59I31cDNFvz2pte dgNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785415604; x=1786020404; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=BqbrmHoDLhgXhTFX5QmIyCtjQJ8YVIbFwSlJNmOQKlk=; b=GP9sUWyY/IeKkebYmhJl0WRcLrwNsGIcvcC67gYu55MmJcQqjUca90VQUyh/KlwCjp 3oLuvhXhGfTM0ak4E34wLI1gWhgjWvRu8K7oeRASFBtgg/B+c3Sfh+6tl5mGTzPLORK0 tvz3Vw3ueFEmupeFz49uTG3252o97vEYGLFxrm9fW8jnhEJTCHMYQ8uSOZtjwRdo0aUw 1x2wYR5qMrq1ZmNjyZ0pEmRb1pAN9F618Bg3pBEXMADnujqvYPQTWFDA6K0H2gKOdYz2 eVTjJYBS37GXhyr8RWHtKylFhmtdjNxXvGsZYAjalN7DvVBhLGVkSJza/chPUpIv0/yO 0hKA== X-Forwarded-Encrypted: i=1; AHgh+RrVqWlC2IRN6o0NyNO5SzM4I53bXoizGgQ2/Fe7tmy4Ab2SfSAG5PKel25QPpDuQ/kKq19fFfdFsmuoMPk=@vger.kernel.org X-Gm-Message-State: AOJu0YxTFFId/9F/lZ2dqfW8XXwqYrAj14xqtpV9rUnrcD5mx5Zkm/05 QeyostEBb1DjxAyhb4L/Jhg3uz+NC3TsHjtlbxFSphT+ru58JFby0vTqvY85cHgK3pkH1KOOVs3 NNsPG60+vJptYgUTYoIpM/k2wnPxHL6lxWiCNI1fsC+BPNyv0VKwmvVinR7fzLKUMrfPKX7gT5Y Y= X-Gm-Gg: AR+sD11J6xrwjRPG0MNr3BPpJ5fZqLLhBo+0AfuL+5GtDqmC3YYgLIcyH73ssKVlwI/ 7oWyEmr9KtyCWdeV1hYRBK2+4+IAUJKUH2pBAIP0hXnLQXQE8Dj2YFjdYd82Cw66e+Y21IYjQoM eMiJtmAyIkXRsmLjWndBk3Di+JRo2YncMo5d8TrOxAw19cal5g50yYeiXuukLwrBZe0SfFXBwKa SNGsjv0HwsO8X/SZkcHCt+WgVBfar09/hunWcIKCvyeC4/+KxLCInTv0mURh7LAukHKgDGtQV1d XmKkgUXFHQ6I5PZCkOkNZWu/PwMPaRDfZV+DwT2n/7T59CvYCcX/P6U7vr6+y3H0aDtHZf2zWvo +1Kd0F2UTpfMRL5azkKeDfdlO/88= X-Received: by 2002:a05:6a21:3212:b0:3c3:8315:80b7 with SMTP id adf61e73a8af0-3c90066cd34mr2432467637.9.1785415604057; Thu, 30 Jul 2026 05:46:44 -0700 (PDT) X-Received: by 2002:a05:6a21:3212:b0:3c3:8315:80b7 with SMTP id adf61e73a8af0-3c90066cd34mr2432429637.9.1785415603465; Thu, 30 Jul 2026 05:46:43 -0700 (PDT) Received: from hu-mahap-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cbdb824d421sm2137336a12.10.2026.07.30.05.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 05:46:42 -0700 (PDT) From: Mahadevan P Date: Thu, 30 Jul 2026 18:16:26 +0530 Subject: [PATCH v2] drm/atomic-helper: tear down HPD/polling in drm_atomic_helper_shutdown() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260730-dpshutdown-v2-1-441fc5543bed@oss.qualcomm.com> X-B4-Tracking: v=1; b=H4sIAKFHa2oC/22MywrDIBQFfyXcdQ0qRWlX/Y+SRXxVodHUm5iW4 L/XZt3NgTkwswPaHCzCtdsh2xIwpNiAnzrQfowPS4JpDJxyQSWTxMzo18WkLRJ6lhfGnXaCKmj CnK0L7yN2Hxr7gEvKn6Nd2O/9mymMMKKo4Jo7aZxit4TYv9bxqdM09W1gqLV+AfXYiAKrAAAA X-Change-ID: 20260717-dpshutdown-047912fcf60b To: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Mahadevan P X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785415598; l=3268; i=mahadevan.p@oss.qualcomm.com; s=20250923; h=from:subject:message-id; bh=EFGTEjAar5YhWvy8+yn14BXjJJUj+nzWsgy1UuC08vU=; b=Eny1S2NirVpYVYcbGMfZ4+XgUkdnQhmG/cIII5qgjK70slzsbxMRLPZkzT6DqbbzX/nCsSBt5 bRJTZ7HzH5ZDfzRraZnrlLkGiGyPT8FH7L7tWVfTYzb4gmVWCg2Yaoz X-Developer-Key: i=mahadevan.p@oss.qualcomm.com; a=ed25519; pk=wed9wuAek0VbCYfkANx7ujIG4VY0XfCYrffFKPN2p0Y= X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMwMDA5NSBTYWx0ZWRfX46e3dQkP3+yp hy7MHdqNRdO8feLOyoODxWgzMonBrijqq+GeKK0fKDDcpwY3jBy6OL6PI6Lu9a14pE2t9eTH8Pu gKiE6hJAsjH5qfxVcdWYqGujITBsiJE= X-Proofpoint-GUID: S-rQLT_7lwW-QppnpqovwECEnkELqraO X-Proofpoint-ORIG-GUID: S-rQLT_7lwW-QppnpqovwECEnkELqraO X-Authority-Analysis: v=2.4 cv=W6QIkxWk c=1 sm=1 tr=0 ts=6a6b47b4 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=-dNxFGlIl_otlAVcVrYA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMwMDA5NSBTYWx0ZWRfX8PiA+k6DJW6w 8HIM4e3R4c+lww2TtcchQs745SLzX8SbHWSqQmWzRNKRvJiEI2+nND/Nvlhg1+vvX1y0zq249WL +a+L5Yq6NUqXmuFv6cTP9dwowwYI35z3+W8lUfRa7sP1ruPnlMCWMi5mvK8aX3jaSfZ4S/9/Fas 53aDDRLSiFf0um05LbnSwGUNs2JacZlE/T/fAPIOKeso0dW7QpQPDGUjGxrI4tFjScltKeh27qi kQEjX20fSX0+4TlHu7H78faXYdJV4n1K0cIHRZ2rjmbwaQC8G3X6WPT4jjmNVel4nTEPPjQajdP o3PWsX9SuQIe3KPGYTTTShBgwbhVmuDDt+mD5/0m66His3KgICxQ5uf5dFy/kDQQPldVnlKPNFL iiaU3q8fSevyFzrSvklSUs4aBNBC7D2vJJn7gfMiFTxfl/Ldyo4RMKKtSo3btZVGzQaVvgxbhuc K3VjHHXpUzhMyRuDTWg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-30_03,2026-07-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 suspectscore=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607300095 drm_atomic_helper_shutdown() disables all CRTCs but leaves output polling and IRQ-driven hot-plug detection running. On reboot, a late DP hot-plug-detect (HPD) IRQ can fire after apps_smmu has already disabled translation for the display subsystem, causing the HPD thread to kick off a new modeset that drives DPU/DP hardware and DMA through a stale IOMMU mapping. drm_atomic_helper_shutdown() disables all CRTCs first, but a pending HPD IRQ thread wakes up afterwards, reads the DPCD, and fires an unsolicited hotplug event that triggers a second atomic commit turning the display back on -- right as the IOMMU is disabling translation: systemd-shutdown[1]: Rebooting. msm_dpu: drm_atomic_commit: committing (shutdown disabling CRTCs) arm-smmu 3da0000.iommu: disabling translation msm_dpu: drm_dp_read_dpcd_caps (late HPD IRQ thread wakes up) msm_dpu: drm_sysfs_connector_hotplug_event: DP-1 hotplug event msm_dpu: drm_client_modeset_probe: DP-1 found preferred mode msm_dpu: drm_atomic_commit: committing (unsolicited, re-enables display) dpu_crtc_commit_kickoff: crtc94 first commit arm-smmu 15200000.iommu: disabling translation drm_kms_helper_poll_fini() tears down this: it stops the output poll worker and calls each connector's &drm_connector_helper_funcs.disable_hpd, which for HPD-capable bridges masks the interrupt in hardware. Reported on Qualcomm platforms such as lemans-evk and monaco-evk during reboot stress testing. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Mahadevan P --- Changes in v2: - Dropped the drm/msm/dp local .shutdown patch (disable_irq()/ synchronize_irq() in dp_display.c)., fixed this at the DRM core level instead so every driver benefits, not just msm_dp.(Dmitry). - Link to v1: https://lore.kernel.org/r/20260717-dpshutdown-v1-1-b062c2f7dfb1@oss.qualcomm.com --- drivers/gpu/drm/drm_atomic_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 285aac3554df..80c67623180a 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -3676,6 +3677,8 @@ EXPORT_SYMBOL(drm_atomic_helper_reset_crtc); * * This is just a convenience wrapper around drm_atomic_helper_disable_all(), * and it is the atomic version of drm_helper_force_disable_all(). + * + * This also tears down output polling and HPD via drm_kms_helper_poll_fini(). */ void drm_atomic_helper_shutdown(struct drm_device *dev) { @@ -3685,6 +3688,8 @@ void drm_atomic_helper_shutdown(struct drm_device *dev) if (dev == NULL) return; + drm_kms_helper_poll_fini(dev); + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); ret = drm_atomic_helper_disable_all(dev, &ctx); --- base-commit: 1a1757b76427f6201bfe0bf1bea9f7574f332a93 change-id: 20260717-dpshutdown-047912fcf60b Best regards, -- Mahadevan P