From: oushixiong <oushixiong@kylinos.cn>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Xinhui.Pan@amd.com,
"Shixiong Ou" <oushixiong@kylinos.cn>
Subject: [PATCH] drm/radeon: Delay Connector detecting when HPD singals is unstable
Date: Thu, 9 May 2024 16:57:58 +0800 [thread overview]
Message-ID: <20240509085758.123046-1-oushixiong@kylinos.cn> (raw)
From: Shixiong Ou <oushixiong@kylinos.cn>
In some causes, HPD signals will jitter when plugging in
or unplugging HDMI.
Rescheduling the hotplug work for a second when EDID may still be
readable but HDP is disconnected, and fixes this issue.
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
---
drivers/gpu/drm/radeon/radeon_connectors.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index b84b58926106..cf0114ca59a4 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1267,6 +1267,16 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
goto exit;
}
}
+
+ if (dret && radeon_connector->hpd.hpd != RADEON_HPD_NONE &&
+ !radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) {
+ DRM_DEBUG_KMS("EDID is readable when HPD disconnected\n");
+ schedule_delayed_work(&rdev->hotplug_work, msecs_to_jiffies(1000));
+ ret = connector_status_disconnected;
+ goto exit;
+ }
+
if (dret) {
radeon_connector->detected_by_load = false;
radeon_connector_free_edid(connector);
--
2.17.1
next reply other threads:[~2024-05-09 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 8:57 oushixiong [this message]
2024-05-09 17:24 ` [PATCH] drm/radeon: Delay Connector detecting when HPD singals is unstable Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240509085758.123046-1-oushixiong@kylinos.cn \
--to=oushixiong@kylinos.cn \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).