Summary: | [SKL] Unplugging the HDMI/DP/mDP cable from dock will not automically resize framebuffer | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Ethan Hsieh <ethan.hsieh> | ||||||||||||||||||||||||||
Component: | DRM/Intel | Assignee: | Dhinakaran Pandiyan <dhinakaran.pandiyan> | ||||||||||||||||||||||||||
Status: | CLOSED FIXED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||||||||||||||||||
Severity: | normal | ||||||||||||||||||||||||||||
Priority: | medium | CC: | dhinakaran.pandiyan, ethan.hsieh, intel-gfx-bugs, ricardo.vega, tjaalton | ||||||||||||||||||||||||||
Version: | XOrg git | ||||||||||||||||||||||||||||
Hardware: | x86-64 (AMD64) | ||||||||||||||||||||||||||||
OS: | Linux (All) | ||||||||||||||||||||||||||||
Whiteboard: | ReadyForDev | ||||||||||||||||||||||||||||
i915 platform: | SKL | i915 features: | display/Other | ||||||||||||||||||||||||||
Attachments: |
|
Description
Ethan Hsieh
2017-06-16 03:48:46 UTC
Hello Ethan, could you please attach the logs and images uncompressed. Thank you. Created attachment 132033 [details]
1-kern.log
Created attachment 132034 [details]
1-Xorg.0.log
Created attachment 132035 [details]
2-kern.log
Created attachment 132036 [details]
2-Xorg.0.log.0
Compile xserver-xorg-video-intel with --enable-debug=full
Created attachment 132037 [details]
2-Xorg.0.log.1
Compile xserver-xorg-video-intel with --enable-debug=full
Created attachment 132038 [details]
screenshot
Created attachment 132039 [details]
xrandr
Adding tag into "Whiteboard" field - ReadyForDev *Status is correct *Platform is included *Feature is included *Priority and Severity correctly set *Logs included Created attachment 132079 [details]
kern.log
When I unplugged the cable, the status of DP-4 was still "connected".
That is why the framebuffer is not resized automatically.
Here is the log:
[313.665321] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x10101012, pins 0x00000020
[313.665383] [drm:intel_hpd_irq_handler [i915]] digital hpd port B - long
[313.665436] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 5 - cnt: 0
[313.665539] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port B - long
[313.944743] [drm:intel_dp_destroy_mst_connector [i915]]
//[313.944745] intel_dp_destroy_mst_connector: connector->name=DP-4 status=connected
[313.944848] [drm:intel_dp_destroy_mst_connector [i915]]
---
The framebuffer is resized automatically after applying the following workaround.
drivers/gpu/drm/i915/intel_dp_mst.c
@@ -474,6 +478,20 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
struct intel_connector *intel_connector = to_intel_connector(connector);
struct drm_device *dev = connector->dev;
+ enum drm_connector_status old_status;
+
+ printk(KERN_ERR "%s: connector->name=%s status=%s\n", __func__, connector->name, drm_get_connector_status_name(connector->status));
+
+ old_status = connector->status;
+ connector->status = connector->funcs->detect(connector, false);
+ if (old_status != connector->status)
+ DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
+ connector->base.id,
+ connector->name,
+ drm_get_connector_status_name(old_status),
+ drm_get_connector_status_name(connector->status));
Here is the log:
[43.175787] intel_dp_destroy_mst_connector: connector->name=DP-4 status=connected
[43.175798] [drm:intel_dp_destroy_mst_connector [i915]] [CONNECTOR:70:DP-4] status updated from connected to disconnected
[43.175870] [drm:intel_dp_destroy_mst_connector [i915]]
[43.177675] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:70:DP-4]
[43.177679] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:70:DP-4] disconnected
I *think* the real problem is we do not differentiate between the dock being unplugged and a monitor connected to the dock being unplugged. This issue still happen with the following configuration: Monitor with DP/mDP/HDMI cable connected to MST ====================================== Graphic stack ====================================== ====================================== Software ====================================== kernel version : 4.12.0-rc3-drm-tip-ww22-commit-187376e+ architecture : x86_64 os version : Ubuntu 17.04 os codename : zesty kernel driver : i915 bios revision : 5.12 bios release date : 09/12/2016 ====================================== Graphic drivers ====================================== mesa : 17.0.3 modesetting : modesetting_drv.so xorg-xserver : 1.19.3 libdrm : 2.4.81 cairo : 1.14.8 xserver : X.Org X Server 1.19.99.1 intel-gpu-tools (tag) : intel-gpu-tools-1.18-211-g00ce341b intel-gpu-tools (commit) : 00ce341b ====================================== Hardware ====================================== platform : KBL-Nuc motherboard model : MS-B142 motherboard id : MS-B1421 form factor : Desktop manufacturer : Micro-StarInternationalCo.,Ltd. cpu family : Core i7 cpu family id : 6 cpu information : Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz gpu card : Intel Corporation Device 5916 (rev 02) (prog-if 00 [VGA controller]) memory ram : 7.65 GB max memory ram : 64 GB display resolution : 1600x900 cpu thread : 4 cpu core : 2 cpu model : 142 cpu stepping : 9 socket : Other signature : Type 0, Family 6, Model 142, Stepping 9 hard drive : 111GiB (120GB) current cd clock frequency : 450000 kHz maximum cd clock frequency : 675000 kHz displays connected : DP-2 DP-4 DP-8 ====================================== Firmware ====================================== dmc fw loaded : yes dmc version : 1.1 guc fw loaded : NONE guc version wanted : 0.0 guc version found : 0.0 ====================================== kernel parameters ====================================== quiet splash fastboot drm.debug=0xe Regards. Created attachment 132379 [details]
kernel log
(In reply to Ethan Hsieh from comment #10) > Created attachment 132079 [details] > kern.log > > When I unplugged the cable, the status of DP-4 was still "connected". > That is why the framebuffer is not resized automatically. > > Here is the log: > [313.665321] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat > 0x00200000, dig 0x10101012, pins 0x00000020 > [313.665383] [drm:intel_hpd_irq_handler [i915]] digital hpd port B - long > [313.665436] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on > PIN 5 - cnt: 0 > [313.665539] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port B - long > [313.944743] [drm:intel_dp_destroy_mst_connector [i915]] > //[313.944745] intel_dp_destroy_mst_connector: connector->name=DP-4 > status=connected > [313.944848] [drm:intel_dp_destroy_mst_connector [i915]] > > --- > > The framebuffer is resized automatically after applying the following > workaround. > drivers/gpu/drm/i915/intel_dp_mst.c > @@ -474,6 +478,20 @@ static void intel_dp_destroy_mst_connector(struct > drm_dp_mst_topology_mgr *mgr, > struct intel_connector *intel_connector = > to_intel_connector(connector); > struct drm_device *dev = connector->dev; > + enum drm_connector_status old_status; > + > + printk(KERN_ERR "%s: connector->name=%s status=%s\n", __func__, > connector->name, drm_get_connector_status_name(connector->status)); > + > + old_status = connector->status; > + connector->status = connector->funcs->detect(connector, false); > + if (old_status != connector->status) > + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to > %s\n", > + connector->base.id, > + connector->name, > + drm_get_connector_status_name(old_status), > + > drm_get_connector_status_name(connector->status)); > > Here is the log: > [43.175787] intel_dp_destroy_mst_connector: connector->name=DP-4 > status=connected > [43.175798] [drm:intel_dp_destroy_mst_connector [i915]] [CONNECTOR:70:DP-4] > status updated from connected to disconnected > [43.175870] [drm:intel_dp_destroy_mst_connector [i915]] > [43.177675] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] > [CONNECTOR:70:DP-4] > [43.177679] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] > [CONNECTOR:70:DP-4] disconnected Hello Ethan, I did some debugging, this patch does solve one issue I am seeing. I'll be happy to review your patch if you send it to intel-gfx. -DK Hi DK, I have submitted the patch to upstream. Please help to review it. https://patchwork.freedesktop.org/patch/169752/ Ethan According to Daniel's comment, this issue should be caused by userspace. I installed ubuntu 17.04 (4.10.0-30-generic) to use newer deb packages, and found that I cannot reproduce the issue. Here is the kernel log: [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:70:DP-4] status updated from connected to disconnected [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:70:DP-4] disconnected I ran this test with the latest kernel and the follow configuration, and everything works correctly: Using Monitors connected with mDP-MST/ DP / HDMI ====================================== Software ====================================== kernel version : 4.13.0-rc4-drm-tip-ww32-commit-b7a69d4+ architecture : x86_64 os version : Ubuntu 17.04 os codename : zesty kernel driver : i915 bios revision : 5.6 bios release date : 09/29/2016 ====================================== Graphic drivers ====================================== mesa : 17.0.3 modesetting : modesetting_drv.so xorg-xserver : 1.19.3 libdrm : 2.4.76 libva : 1.7.3-2 vaapi (intel-driver) : 1.7.3 cairo : 1.14.8-1 intel-gpu-tools : 1.17-1 ====================================== Hardware ====================================== platform : SKL Canyon motherboard id : NUC6i7KYB form factor : Desktop cpu family : Core i7 cpu family id : 6 cpu information : Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz gpu card : Intel Corporation Iris Pro Graphics 580 (rev 09) (prog-if 00 [VGA controller]) memory ram : 31.31 GB max memory ram : 32 GB display resolution : 3840x1080 cpu thread : 8 cpu core : 4 cpu model : 94 cpu stepping : 3 socket : Other signature : Type 0, Family 6, Model 94, Stepping 3 hard drive : 223GiB (240GB) current cd clock frequency : 450000 kHz maximum cd clock frequency : 675000 kHz displays connected : DP-5 Adding dmesg.log and kern.log Created attachment 133384 [details]
dmesg.log
Created attachment 133385 [details]
kern.log
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.