Skip to contentSkip to conversation

New: [AMDGPU] The HDMI status(/sys) is not change after HDMI connector pull out

Bug 207593 [email protected] 1 participant 2 messages May 6, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore 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: [email protected]
Reporter: [email protected]
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.

(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index c770d73352a7..4809ceb56f5e 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +0 -0
@@ -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?

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

[Bug 207593] [AMDGPU] The HDMI status(/sys) is not change after HDMI connector pull out

https://bugzilla.kernel.org/show_bug.cgi?id=207593

Alex Deucher ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Alex Deucher ([email protected]) --- There's no need to open bugs in every bug tracker. Just one is fine. Let's use the gitlab tracker:
https://gitlab.freedesktop.org/drm/amd/-/issues/1135

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel