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 B6FD4391E49 for ; Sun, 24 May 2026 10:33:57 +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=1779618842; cv=none; b=q0eoi2ob+zTm/SvsDF7qMbUT3Oq6Lt6GiEiIGgk2UghqXIfrW3u6RQuX/7J0N4I4EW4S6p/1mVbJTwdFSwGhnCqRd5FdaAcUlw3yZhN+2fAP38Zsbe/32nSgsVCCnYHjIoVpD568Q0ReMaiq7uiGbWj1dgELmWzYEDco54IP12o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779618842; c=relaxed/simple; bh=mGqmteM+m4hLI5Gvz9eQdzWvrlFnUpxrfaJFRPfDGQg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QxlOfenYKco/CJoNNjwryru8msUU7NQSyZ/q3ngQfS93lni1Dit42xxz3/sFEahTIsb86rvQT7mUrMgT9PBZ7/di2w+UMvh6RTrT8qxZXSbXTDAJPDxiNpPXTw1TVkWnIOEvcqvAMNrJM8QAdnJrN3N3Eo3bLK7O258umjlwFvk= 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=a6J9Lfg6; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KlU2m/Ix; 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="a6J9Lfg6"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KlU2m/Ix" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64O8kvMw1231122 for ; Sun, 24 May 2026 10:33:57 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= VVckI6rGuC7U14wE7wUxK06VoWfdQ0drTPZ1Rf+ykCc=; b=a6J9Lfg6epSPS2YA sxt7DnvJz3Xw0+U8r+kexsDc7509fFT4FLdRz1Cvnw/PD5HXTv0WL0G+IfmEkPf5 jJmwNppFZ2Cn/zyRD69WziEVEWasvE0jIBQFasjuRB5g5xpDUVLtpN0qjPbtMGo3 weEDFFeAhtNACGEytSIQUI+/FYeoJpsvAKUJQWNHb/c1oM7+FcFLgilFe3FxhZBR SGoVlcONPte+TcsfYKE1/KnHAmw1US+Qht4Cu7N+h2uA2PKSKeqXrlGOfMUNnZh6 DO5HJPWx7O6OJG93MbVbmQ/JyCUFxDdgVSY18oPnKKvet/F/Egi5ZjY3n22NSGlG ci6ycA== Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eb50ftupt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 24 May 2026 10:33:56 +0000 (GMT) Received: by mail-vk1-f198.google.com with SMTP id 71dfb90a1353d-56fab6d9242so19952248e0c.0 for ; Sun, 24 May 2026 03:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779618836; x=1780223636; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VVckI6rGuC7U14wE7wUxK06VoWfdQ0drTPZ1Rf+ykCc=; b=KlU2m/IxcALpsEOaGXfspI/5CLStr/+gV35yuwYZx6FcOKPMTchnsTVIPeb4JbLY3i N9nYBqfGlxVV+hE4w5JbWvmSFz/DzIimie53PxNkitBtc7BtviArFHr0sElECM/yqXTD 4KER3m+ykVmc6hB3Cbtr12GqfS0rfJD4X9a96L3OeyL+KH1izkqtUpPeNH1b1hbbWg5F eVP5q1goQf5AZ09Ei0r8VjjtRo4lIQq3gm3KJ9HvkezRX940SQn64moh1PnK4jutz7t/ KZj7ZTAQfMauzVgz2craePQb1sZ7GHKxG3mwx2oyvi5iyTVcIZWC8OA7uKgZffZwh/zR xFbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779618836; x=1780223636; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VVckI6rGuC7U14wE7wUxK06VoWfdQ0drTPZ1Rf+ykCc=; b=FBMCja4aXjvKP4H0UcwFg5gnUqr94EkGRFXjG5zD5pL2+Rc071z7aSytUF0umkkbux r4jGz4abZJP70IgldMIUShR+KNh9n1e14UuZNzmiJIviEK+tQ4rbmI/gxm1ON7LhGJO3 JYY/OCVbAlVr3C13FxD040hY/4FswNWkA62aB5T9M45ijfWbKJWrafOzKmyYdSuGOfZN E9ES4Nkm3SPmX+Pg6vLDyDA4sIrBQ3JquOg4y/tH0R3eaXVTND+I1WJzRDnNWb207ZwT +Go/kHszmf3KV4lr6i2rrz9LGBC3l0WDl9oQxvqArkRERKnW1aaqxVCIuZiQ0Z6yCNdu kfPA== X-Forwarded-Encrypted: i=1; AFNElJ+TWbkqJcQxtCye8hwHErjrIS+RJ8hjk8XjzUQokQIQzaf3Q0SUTRbU1b6fFi4DqvdiH9G+B0uEEoTKf5M=@vger.kernel.org X-Gm-Message-State: AOJu0YwY/zmk4L06Fjm4qr6a4N7TtaSFckBuPWg4gZVD2lRTPiVS8bF5 gWO7z9F3Hi97L14FKXhIFKich0RfhmqSh7n84V/B6IusjPMrU/J8wg/3ujXXPDeCUyWgtXVOk01 8i+DrIbwMCYW06nVIeUA1Nw600GD8VrHjMDBSHvggyTfDC7pv2AJB9Vhzcchzg5Om0iY= X-Gm-Gg: Acq92OE5fxa3p6/mPxYz4O4QKuWwdMsgGMIMDUDnGrRT5x79WdvS6EUqB59cljycKu2 Fl5mKSoz0QW7hKV/oLD8VoS4dD+UemZoSP4+HNjIXUlkbI1ngRQWoINsi4wanNKfSpPtItU+QP5 sM2pwd+fpmaUCNZtQFv6vB+IwuF+BWxgeC5znoUitYcxId7VXMGen0nAs5+p/ZQjOnlJCXkG95x VYsuQPggwRZ+Fmn+g3lhQqi68bGy5DpPDm0gDSKfsR33UVPME78AGW4BML6jZ+XxnZqi1JxtK91 DsUWUStabcDlxqlNjPIWLU7HqU2Kp5b3wK40i4YXJQJqUHYmE+SApvo+HFcnUf3q9FYjcWJA0yf QBqCoxN2yYUAvyxTq150dtmbGyPKyUFYWKCSMJzqS2jpY8+BuIWCQfuz6oX1v9bCS+av9ZWEjNU FqbxV6EDtkMwdvTP/Eo7PoMtqiwnlhba9VzmjNcoNOBBrtrw== X-Received: by 2002:a05:6122:4896:b0:575:27de:3eab with SMTP id 71dfb90a1353d-5866347ff44mr6103384e0c.9.1779618835899; Sun, 24 May 2026 03:33:55 -0700 (PDT) X-Received: by 2002:a05:6122:4896:b0:575:27de:3eab with SMTP id 71dfb90a1353d-5866347ff44mr6103372e0c.9.1779618835536; Sun, 24 May 2026 03:33:55 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aa32cba880sm1816148e87.32.2026.05.24.03.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2026 03:33:54 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 24 May 2026 13:33:38 +0300 Subject: [PATCH v6 10/10] drm/msm/dp: clear EDID on display unplug 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: <20260524-hpd-refactor-v6-10-cf3ab488dd7b@oss.qualcomm.com> References: <20260524-hpd-refactor-v6-0-cf3ab488dd7b@oss.qualcomm.com> In-Reply-To: <20260524-hpd-refactor-v6-0-cf3ab488dd7b@oss.qualcomm.com> To: 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, Val Packett X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2721; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=mGqmteM+m4hLI5Gvz9eQdzWvrlFnUpxrfaJFRPfDGQg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBqEtP9ak9oVvpCmWFPCObKin3NC2NbwoC3Y5mtg 6N6KGWWN12JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCahLT/QAKCRCLPIo+Aiko 1RM9CACMTtdXkwt6OJzCTlqYe1RL+OTe5uRHjgpBQmycP+rPLqWqYtsTTSK4B8OY77OuubDBgqr a0d+IV5yrsalCLmrldKu3wjux/l30cgyRTlsVm6PCOF3jvoLrybo6O9wrqgdOWXTJMG33xswszw Eyh7xoBqU+4eE2hpo5Pot7+WsjRS8csEk/peIuXH38g8f74BDEedB9Jua10U7YmB6vx21eAlC+k Gw96GUN6sm3wNEJI7gNnPGh7ccSBt/U+PGYaKefw7vDTmIsBaeV8aKFav6fHZ7S5QeuM+5mK70D p3cx341tChRRYCRYBGNSdrJiOlQFIet+OKXxjd/7N99LCCJL X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTI0MDEwNyBTYWx0ZWRfX5iyC4oTwi62a fNDYr9aYCUYiBAFDawEecdeuGPYtILzJ+7LfuWBBbPVQlZL5RngMbLp1zhw75uxLge9e0fPIYbk YcIrRxRWAZsaIprFlIn4groidMOzyEbT1mXTzZiGEhyejk3dXoaHsuBghSr6Of3Jr3k310PKhtm TAycqdQPq8oqcqm5a2vDP31nEi6CqipiZ8E9APqLbsh6Uqgm1dPVsKuGvS7+2OIMQR7qZD81+wY opWm7/vXdeT0bDo/G6Rjp5mD/v0zJP8GzFSyPeot9LsOPDyXQG7hiaX9LpERq7rWk3RkBG17bJ7 I+nsU/x8UbZlh3tsOM/5P+yCv5eKz9iqbrButCKaAt74yjXJJr9+TTLrjN14OeyiTXBrojOuxRE KgJ0lxIgNu5C8NN3aHaedhSFcGMiLYkRnhwV4Bv8Dve7j8FzyJNZ1X0uU4sHZRfp4o0mSg3Fp62 0k7o3bASdAuE687vgPw== X-Proofpoint-ORIG-GUID: cVYAIOPBig9QxA4h9sMw89nEcBF6vzgD X-Authority-Analysis: v=2.4 cv=UdBhjqSN c=1 sm=1 tr=0 ts=6a12d414 cx=c_pps a=1Os3MKEOqt8YzSjcPV0cFA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=NIqqIfc2bYnrFRhDr3kA:9 a=QEXdDO2ut3YA:10 a=hhpmQAJR8DioWGSBphRh:22 X-Proofpoint-GUID: cVYAIOPBig9QxA4h9sMw89nEcBF6vzgD 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-24_03,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 suspectscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605240107 Currently the driver only updates the EDID when it detects a connected monitor, which results in the connector still listing outdated modes even after the display is unplugged. Set connector's EDID to NULL on unplug to clear the list of modes. Tested-by: Val Packett # x1e80100-dell-latitude-7455 Tested-by: Yongxing Mou # Hamoa IOT EVK, QCS8300 Ride Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++++ drivers/gpu/drm/msm/dp/dp_panel.c | 8 ++++++++ drivers/gpu/drm/msm/dp/dp_panel.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 5fa745b486f5..6800c628adb4 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -451,6 +451,10 @@ static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp) if (!dp->plugged) return 0; + /* Don't forget modes for eDP */ + if (!dp->msm_dp_display.is_edp) + msm_dp_panel_unplugged(dp->panel, dp->msm_dp_display.connector); + /* triggered by irq_hdp with sink_count = 0 */ if (dp->link->sink_count == 0) msm_dp_display_host_phy_exit(dp); diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c index 891211b23202..6bb021820d7c 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -293,6 +293,14 @@ int msm_dp_panel_read_sink_caps(struct msm_dp_panel *msm_dp_panel, return rc; } +void msm_dp_panel_unplugged(struct msm_dp_panel *msm_dp_panel, + struct drm_connector *connector) +{ + drm_edid_connector_update(connector, NULL); + drm_edid_free(msm_dp_panel->drm_edid); + msm_dp_panel->drm_edid = NULL; +} + u32 msm_dp_panel_get_mode_bpp(struct msm_dp_panel *msm_dp_panel, u32 mode_edid_bpp, u32 mode_pclk_khz) { diff --git a/drivers/gpu/drm/msm/dp/dp_panel.h b/drivers/gpu/drm/msm/dp/dp_panel.h index 177c1328fd99..9173e90a5053 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.h +++ b/drivers/gpu/drm/msm/dp/dp_panel.h @@ -49,6 +49,8 @@ int msm_dp_panel_deinit(struct msm_dp_panel *msm_dp_panel); int msm_dp_panel_timing_cfg(struct msm_dp_panel *msm_dp_panel, bool wide_bus_en); int msm_dp_panel_read_sink_caps(struct msm_dp_panel *msm_dp_panel, struct drm_connector *connector); +void msm_dp_panel_unplugged(struct msm_dp_panel *msm_dp_panel, + struct drm_connector *connector); u32 msm_dp_panel_get_mode_bpp(struct msm_dp_panel *msm_dp_panel, u32 mode_max_bpp, u32 mode_pclk_khz); int msm_dp_panel_get_modes(struct msm_dp_panel *msm_dp_panel, -- 2.47.3