Bug 81537 - [snb dp regression] dp retry forever due to setting sink dpms to OFF
Summary: [snb dp regression] dp retry forever due to setting sink dpms to OFF
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Jani Nikula
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-19 14:51 UTC by Adam Skillen
Modified: 2017-07-24 22:52 UTC (History)
3 users (show)

See Also:
i915 platform: SNB
i915 features: display/DP


Attachments
dmesg.txt (11.71 KB, text/plain)
2014-07-19 14:51 UTC, Adam Skillen
no flags Details
Xorg.0.log (33.14 KB, text/plain)
2014-07-19 14:52 UTC, Adam Skillen
no flags Details
lspci (11.64 KB, text/plain)
2014-07-19 14:53 UTC, Adam Skillen
no flags Details
dmesg.txt booted with "drm.debug=14" (353.98 KB, text/plain)
2014-07-21 20:50 UTC, Adam Skillen
no flags Details
dmesg.txt booted branch drm-intel-nightly with drm.debug=14 (376.17 KB, text/plain)
2014-07-21 23:39 UTC, Adam Skillen
no flags Details
set sink dpms around edid reads (1.58 KB, patch)
2014-07-22 05:57 UTC, Daniel Vetter
no flags Details | Splinter Review
set sink dpms around edid reads v2 (1.60 KB, patch)
2014-07-22 06:05 UTC, Daniel Vetter
no flags Details | Splinter Review
dmesg mainline dp_dpms.patch (405.50 KB, text/plain)
2014-07-22 16:33 UTC, Adam Skillen
no flags Details
dmesg drm-intel-nightly dp_dpms.patch (358.57 KB, text/plain)
2014-07-22 16:36 UTC, Adam Skillen
no flags Details
dmesg mainline new patch (372.15 KB, text/plain)
2014-07-22 18:56 UTC, Adam Skillen
no flags Details
dmesg mainline both patches (359.19 KB, text/plain)
2014-07-22 18:57 UTC, Adam Skillen
no flags Details
dmesg drm-intel-nightly new dp patch (378.23 KB, text/plain)
2014-07-22 19:01 UTC, Adam Skillen
no flags Details
drm/i915: debug sink dpms aux errors also on enable (1.33 KB, patch)
2014-09-02 13:30 UTC, Jani Nikula
no flags Details | Splinter Review
Kernel messages (361.15 KB, text/plain)
2014-11-26 19:50 UTC, Alberto Garcia
no flags Details

Description Adam Skillen 2014-07-19 14:51:21 UTC
Created attachment 103107 [details]
dmesg.txt

After upgrading my kernel from 3.11 to 3.13, I have been experiencing
issues with graphical freezes.  Specific dmesg errors started showing up
after the upgrade (see attached).

When waking the screen from power saving/screensaver, the primary
display wakes but X stops responding to input (the mouse cursor can
still move, but clicking has no effect). Secondary display does not wake.

This issue persists up to the latest 3.16-rc5.  A commit bisect shows
that fdbc3b1f639bb2cbfb32c612b2699e0ba373317d is the first bad commit.
Reverting that commit on the 3.16-rc5 branch seemed to fix the problem.

A Ubuntu bug report also contains relevant logs and configuration
information:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1343543

Please let me know if you require any further logs or information.

Sincerely,

Adam Skillen


Hardware:
Dell System XPS L502X/0NJT03, BIOS A12 09/07/2012
Intel Corporation 2nd Generation Core Processor Family Integrated
Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])


Bisect result:
fdbc3b1f639bb2cbfb32c612b2699e0ba373317d is the first bad commit

$ git show
commit fdbc3b1f639bb2cbfb32c612b2699e0ba373317d
Author: Jani Nikula <email address hidden>
Date: Tue Nov 12 17:10:13 2013 +0200

    drm/i915/dp: set sink to power down mode on dp disable

    We used to put the local sink and any downstream sinks to power down
    mode at disable or dpms off using the DPCD SET_POWER register, until
    this was broken by

    commit e8cb455876fa8f67c6aba394d0a14b697bf04cc3
    Author: Daniel Vetter <email address hidden>
    Date: Sun Jul 1 13:05:48 2012 +0200

        drm/i915/dp: convert to encoder disable/enable

    Fix it.

    Signed-off-by: Jani Nikula <email address hidden>
    Reviewed-by: Todd Previte <email address hidden>
    Signed-off-by: Daniel Vetter <email address hidden>

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index eb8139d..0b2e842 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1774,7 +1774,7 @@ static void intel_disable_dp(struct intel_encoder *encoder)
         * ensure that we have vdd while we switch off the panel. */
        ironlake_edp_panel_vdd_on(intel_dp);
        ironlake_edp_backlight_off(intel_dp);
- intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+ intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
        ironlake_edp_panel_off(intel_dp);

        /* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
Comment 1 Adam Skillen 2014-07-19 14:52:47 UTC
Created attachment 103108 [details]
Xorg.0.log
Comment 2 Adam Skillen 2014-07-19 14:53:09 UTC
Created attachment 103109 [details]
lspci
Comment 3 Adam Skillen 2014-07-21 20:50:13 UTC
Created attachment 103225 [details]
dmesg.txt booted with "drm.debug=14"

Here is the dmesg output from 3.16-rc5 with the "drm.debug=14" flag for set.  I'll build drm-intel-nightly and attach the debug log shortly.
Comment 4 Adam Skillen 2014-07-21 23:39:45 UTC
Created attachment 103240 [details]
dmesg.txt booted branch drm-intel-nightly with drm.debug=14

I tried booting the drm-intel-nightly build with the following results (see attached dmesg.drm-intel-nightly.post_freeze.txt).  Booted with kernel flag drm.debug=14 set.
Comment 5 Daniel Vetter 2014-07-22 05:57:48 UTC
Created attachment 103253 [details] [review]
set sink dpms around edid reads

Please test the attached patch, thanks.
Comment 6 Daniel Vetter 2014-07-22 06:05:03 UTC
Created attachment 103254 [details] [review]
set sink dpms around edid reads v2

This one actually compiles ...
Comment 7 Adam Skillen 2014-07-22 16:33:29 UTC
Created attachment 103290 [details]
dmesg mainline dp_dpms.patch

I wasn't sure if you wanted me to test the patch on the drm-intel-nightly or mainline build so I tried both.  It doesn't seem to solve the issue.

On the mainline build, my secodary monitor remained off, although it was reported as connected by xrandr.

Please see attached error log from the mainline build.
Comment 8 Adam Skillen 2014-07-22 16:36:19 UTC
Created attachment 103291 [details]
dmesg drm-intel-nightly dp_dpms.patch

On the drm-intel-nightly build, X froze as soon as my desktop came up (as opposed to freezing after entering power-saving mode).  My secodary monitor also remained off.

Please see attached error log from the drm-intel-nightly build.
Comment 9 Daniel Vetter 2014-07-22 17:05:42 UTC
Can you please test the below patch?

http://patchwork.freedesktop.org/patch/29720/
Comment 10 Adam Skillen 2014-07-22 18:23:13 UTC
(In reply to comment #9)
> Can you please test the below patch?
> 
> http://patchwork.freedesktop.org/patch/29720/

Just to clarify, should I apply this on top of the previous patch or revert it first?  Also, should I try this on the mainline or intel-nightly branch?

Thanks
Comment 11 Adam Skillen 2014-07-22 18:56:40 UTC
Created attachment 103293 [details]
dmesg mainline new patch

dmesg from mainline kernel when trying new patch only
Comment 12 Adam Skillen 2014-07-22 18:57:22 UTC
Created attachment 103294 [details]
dmesg mainline both patches

dmesg from mainline kernel when trying both patches
Comment 13 Adam Skillen 2014-07-22 19:01:27 UTC
Created attachment 103295 [details]
dmesg drm-intel-nightly new dp patch

dmesg from drm-intel-nightly kernel when trying new patch only.
Comment 14 Todd Previte 2014-07-22 19:19:23 UTC
What display do you have connected on Displayport? Do you have a converter dongle attached there?
Comment 15 Adam Skillen 2014-07-22 19:40:24 UTC
(In reply to comment #14)
> What display do you have connected on Displayport? Do you have a converter
> dongle attached there?

I have an Acer v193 and it is connect via a dongle.


$ grep "EDID" /var/log/Xorg.0.log
[    64.240] (II) intel(0): EDID vendor "ACR", prod id 36
Comment 16 Todd Previte 2014-07-22 19:58:57 UTC
I'm assuming that with the dongle/secondary display disconnected, this problem does not occur? Looking over the code, intel_dp_sink_dpms() just enables/disables power in the sink device via the DPCD. So my first suspicion is that the dongle isn't behaving, however it could also have something to do with how the driver handles branch devices.

What is the make/model of the dongle?
Comment 17 Adam Skillen 2014-07-22 20:33:44 UTC
(In reply to comment #16)
> I'm assuming that with the dongle/secondary display disconnected, this
> problem does not occur? Looking over the code, intel_dp_sink_dpms() just
> enables/disables power in the sink device via the DPCD. So my first
> suspicion is that the dongle isn't behaving, however it could also have
> something to do with how the driver handles branch devices.
> 
> What is the make/model of the dongle?

The dongle is a Dell CN-0JG7P4.

I just tried booting with the dongle disconnected and the error did not occur.  Furthermore, if I connect the dongle after the system is fully booted, the error does not seem to occur (I have only tested this on the 3.13 kernel so far, I'll test the latest mainline shortly).
Comment 18 Adam Skillen 2014-07-22 21:05:27 UTC
Sorry.  It looks like I was wrong about that last part:  I tested it on 3.16-rc6 and the error does not occur when I boot with the secondary display disconnected.  If I reconnect the display after booting the error does occur when the screen enters power-saving mode.
Comment 19 Jani Nikula 2014-09-02 13:30:23 UTC
Created attachment 105610 [details] [review]
drm/i915: debug sink dpms aux errors also on enable

Please apply this patch and see if it prints any error messages with drm.debug=0xe module parameter set.
Comment 20 Alberto Garcia 2014-11-26 19:50:03 UTC
Created attachment 110085 [details]
Kernel messages

Hello, I have a similar problem as the one described here.

I have a ThinkPad x230 with the following graphics card:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)

The monitor is an ASUS PA248Q, connected to the computer using a MiniDisplayPort to DisplayPort cable.

I've also been experiencing freezes, and the kernel regularly prints
stack traces like the ones you can see in the attached log.

This happens when I turn the monitor off (using the power button)
while the cable is connected.

I generated the log using the patch from comment #19. The kernel is from Debian:

Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-2 (2014-11-06) x86_64 GNU/Linux

Reverting the patch mentioned by Adam also makes my system more stable.
Comment 21 Jani Nikula 2015-04-02 16:54:34 UTC
We've fixed several issues with dp aux communication lately. Please try drm-intel-nightly branch of http://cgit.freedesktop.org/drm-intel
Comment 22 Jani Nikula 2015-10-07 14:11:08 UTC
Related, same bisected bad commit
https://bugs.freedesktop.org/show_bug.cgi?id=92237
Comment 23 Jani Nikula 2016-04-22 14:14:27 UTC
Presumed fixed, closing. Please reopen if the problem persists with latest kernels.


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.