From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 207593] New: [AMDGPU] The HDMI status(/sys) is not change after HDMI connector pull out
Date: Wed, 06 May 2020 07:52:25 +0000 [thread overview]
Message-ID: <bug-207593-2300@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=207593
Bug ID: 207593
Summary: [AMDGPU] The HDMI status(/sys) is not change after
HDMI connector pull out
Product: Drivers
Version: 2.5
Kernel Version: 4.19.90
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri@kernel-bugs.osdl.org
Reporter: zhoubb.aaron@gmail.com
Regression: No
Hi all:
I'm a newer about the amdgpu driver.
I have a question about it.
In my company, there are some experiments about HDMI hotplug.
First, I introduce the lab environment:
cpu: huawei kunpeng
os: uos
kernel: 4.19.90
video card: Radeon HD 700
the lab step is:
1, I connect the hdmi and vga with the expand mode;
2. I disconnect the hdmi connector, but the app display in the hdmi is
not back to vga, and the mode is still expand mode.
I found when I disconnect the hdmi connector, the sys files about HDMI
are keep the connection status.
Such as the value of /sys/class/drm/card0-HDMI-A-1/status is
connected, and I can read the edid file correctly.
At this moment, I use I2C driver to read the edid via /dev/i2c-X. I
can not get the edid value.
In kernel source ,I found the suspicious points in
amdgpu_connector_dvi_detect() (amdgpu_connector.c)
In amdgpu_connector_dvi_detect() function,
The hpd status was correctly through the amdgpu_display_hpd_sence(),
but the ddc probe operation is successed via
amdgpu_display_ddc_probe()
I am so confused.
Is it a normal behavior?
I have written a workaround patch to fix this problem.
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index c770d73352a7..4809ceb56f5e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -975,7 +975,7 @@ amdgpu_connector_dvi_detect(struct drm_connector
*connector, bool force)
const struct drm_encoder_helper_funcs *encoder_funcs;
int r;
enum drm_connector_status ret = connector_status_disconnected;
- bool dret = false, broken_edid = false;
+ bool dret = false, broken_edid = false, unknown_status = false;
if (!drm_kms_helper_is_poll_worker()) {
r = pm_runtime_get_sync(connector->dev->dev);
@@ -990,7 +990,11 @@ amdgpu_connector_dvi_detect(struct drm_connector
*connector, bool force)
if (amdgpu_connector->ddc_bus)
dret = amdgpu_display_ddc_probe(amdgpu_connector, false);
- if (dret) {
+
+ if (!amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd))
+ unknown_status = true;
+
+ if (dret && !unknown_status) {
amdgpu_connector->detected_by_load = false;
amdgpu_connector_free_edid(connector);
amdgpu_connector_get_edid(connector);
Is it correctly?
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2020-05-06 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 7:52 bugzilla-daemon [this message]
2020-05-06 20:10 ` [Bug 207593] [AMDGPU] The HDMI status(/sys) is not change after HDMI connector pull out bugzilla-daemon
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=bug-207593-2300@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.