Bug 90868 - [BYT/BSW Bisected] Suspend Resume time increase by 10 times longer
Summary: [BYT/BSW Bisected] Suspend Resume time increase by 10 times longer
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: highest critical
Assignee: Maarten Lankhorst
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 08:51 UTC by wendy.wang
Modified: 2017-10-06 14:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
suspend resume time failure dmesg (123.01 KB, text/plain)
2015-06-05 08:51 UTC, wendy.wang
no flags Details
manually responsiveness script (1.07 KB, text/plain)
2015-06-05 08:52 UTC, wendy.wang
no flags Details
dmesg_remove_intel_display_set_init_power_on_byt01 (288.04 KB, text/plain)
2015-06-08 01:49 UTC, wendy.wang
no flags Details
dmesg with log_buf_len=4M drm.debug=0x1f (386.79 KB, text/plain)
2015-06-08 06:00 UTC, wendy.wang
no flags Details
dmesg info of the commit 490f400d bad (383.97 KB, text/plain)
2015-06-09 02:07 UTC, ye.tian
no flags Details
dmesg info of the commit 7f0724 good (369.28 KB, text/plain)
2015-06-09 02:09 UTC, ye.tian
no flags Details
BYT Platform_dmesg_unify-flip-modeset _branch_i915_responsiveness_testing (334.92 KB, text/plain)
2015-06-10 07:57 UTC, wendy.wang
no flags Details

Description wendy.wang 2015-06-05 08:51:19 UTC
Created attachment 116315 [details]
suspend resume time failure dmesg

==System Environment==       
-----------------------------------------------------
Kernel Regression: Yes
Non-working platforms: BYT/HSW


Bisect result show :
490f400db5d886fc28566af69b02f6497f31be4b is the first bad commit
commit 490f400db5d886fc28566af69b02f6497f31be4b
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Jun 1 12:50:05 2015 +0200

    drm/i915: Make intel_display_suspend atomic, v2.

    Calculate all state using a normal transition, but afterwards fudge
    crtc->state->active back to its old value. This should still allow
    state restore in setup_hw_state to work properly.

    Calling intel_set_mode will cause intel_display_set_init_power to be
    called, make sure init_power gets set again afterwards.

    Changes since v1:
    - Fix to compile with v2 of the patch that adds intel_display_suspend.
    - Add intel_display_set_init_power.
    - Set return value to int to allow error checking.

    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

:040000 040000 b53b1c05451c72787a26e1efc85c0e544ae1ec94 1e8df3b7f16307d9e637276c10c54e                                                                                                               3b94850486 M    drivers

==Bug detailed description==
Suspend resume time is too large: 6000+ ms


==Reproduce steps==
----------------------------
1. Boot up system with initcall_debug drm.debug=0xe kernel parameter
2. echo 0 > /sys/class/rtc/rtc0/wakealarm 
echo +20 > /sys/class/rtc/rtc0/wakealarm 
echo mem > /sys/power/state
3. run attached script.
Comment 1 wendy.wang 2015-06-05 08:52:05 UTC
Created attachment 116316 [details]
manually responsiveness script
Comment 2 Maarten Lankhorst 2015-06-07 15:56:04 UTC
Could you remove the line:
"intel_display_set_init_power(dev_priv, false);"

from intel_display.c ? Does that fix this issue?
Comment 3 wendy.wang 2015-06-08 01:42:15 UTC
(In reply to Maarten Lankhorst from comment #2)
> Could you remove the line:
> "intel_display_set_init_power(dev_priv, false);"
> 
> from intel_display.c ? Does that fix this issue?

Remove "intel_display_set_init_power(dev_priv, false);", Suspend resume time still very large: 7000+ ms on baytray platform.
Comment 4 wendy.wang 2015-06-08 01:49:26 UTC
Created attachment 116343 [details]
dmesg_remove_intel_display_set_init_power_on_byt01
Comment 5 Maarten Lankhorst 2015-06-08 05:14:42 UTC
Could you boot with log_buf_len=4M drm.debug=0x1f ?
Comment 6 wendy.wang 2015-06-08 06:00:41 UTC
Created attachment 116348 [details]
dmesg with log_buf_len=4M drm.debug=0x1f
Comment 7 Maarten Lankhorst 2015-06-08 14:25:52 UTC
First issue seems to be dpll failing to lock.

Could you get me 2 dmesg logs with log_buf_len=4M drm.debug=0x1f?
First one on commit 490f400db5d886fc28566af69b02f6497f31be4b, the other one before it?
Comment 8 ye.tian 2015-06-09 02:07:41 UTC
Created attachment 116379 [details]
dmesg info of the commit 490f400d   bad
Comment 9 ye.tian 2015-06-09 02:09:05 UTC
Created attachment 116380 [details]
dmesg info of the commit 7f0724 good
Comment 10 Maarten Lankhorst 2015-06-09 14:04:59 UTC
Ah thanks, that's useful.

Doing some analysis on the diff:

intel_display_power_put is called on more domains on the good commit.
This points to a possible bug in power domains.

For the primary plane src and dst seems to indicate why planes stay hidden:
-[drm:intel_dump_pipe_config] scaler:0 src (0, 0) 0x0 dst (0, 0) 0x0
+[drm:intel_dump_pipe_config] scaler:0 src (0, 0) 1920x1080 dst (0, 0) 1920x1080

This shows a bug caused by not having support for atomic planes, it's fixed by convert to atomic, part 3.

I also see the following, more worrying error:
-[drm:vlv_enable_pll [i915]] *ERROR* DPLL 0 failed to lock

Just in case I already fixed it, could you test with

http://cgit.freedesktop.org/~mlankhorst/linux/log/?h=unify-flip-modeset ?

If it doesn't fit it, post a log with drm.debug=0x1f on that branch please.
Comment 11 wendy.wang 2015-06-10 07:57:38 UTC
Created attachment 116417 [details]
BYT Platform_dmesg_unify-flip-modeset _branch_i915_responsiveness_testing
Comment 12 wendy.wang 2015-06-10 08:01:15 UTC
(In reply to Maarten Lankhorst from comment #10)
> Ah thanks, that's useful.
> 
> Doing some analysis on the diff:
> 
> intel_display_power_put is called on more domains on the good commit.
> This points to a possible bug in power domains.
> 
> For the primary plane src and dst seems to indicate why planes stay hidden:
> -[drm:intel_dump_pipe_config] scaler:0 src (0, 0) 0x0 dst (0, 0) 0x0
> +[drm:intel_dump_pipe_config] scaler:0 src (0, 0) 1920x1080 dst (0, 0)
> 1920x1080
> 
> This shows a bug caused by not having support for atomic planes, it's fixed
> by convert to atomic, part 3.
> 
> I also see the following, more worrying error:
> -[drm:vlv_enable_pll [i915]] *ERROR* DPLL 0 failed to lock
> 
> Just in case I already fixed it, could you test with
> 
> http://cgit.freedesktop.org/~mlankhorst/linux/log/?h=unify-flip-modeset ?
> 
> If it doesn't fit it, post a log with drm.debug=0x1f on that branch please.

We tested unify-flip-modeset branch on BYT platform, result show the regression failure has been fixed, but we see the suspend resume time still be a little big: 900 ms,do you have any idea to improve it? Thanks.
init time=106.271 ms
suspend time =374.996 ms
suspend resume time=904.815 ms
Comment 13 Jani Nikula 2015-06-10 12:11:56 UTC
Should be fixed by

commit aee5624f3158be1aecd808351607d7a6ded09643
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Wed Jun 10 10:24:19 2015 +0200

    Revert "drm/i915: Make intel_display_suspend atomic, v2."

commit f662af8c5c1619b91e3834fff103e7423e20df81
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Wed Jun 10 10:24:20 2015 +0200

    Revert "drm/i915: Read hw state into an atomic state struct, v2."

please retest current drm-intel-nightly.
Comment 14 wendy.wang 2015-06-11 06:51:07 UTC
(In reply to Jani Nikula from comment #13)
> Should be fixed by
> 
> commit aee5624f3158be1aecd808351607d7a6ded09643
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Wed Jun 10 10:24:19 2015 +0200
> 
>     Revert "drm/i915: Make intel_display_suspend atomic, v2."
> 
> commit f662af8c5c1619b91e3834fff103e7423e20df81
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Wed Jun 10 10:24:20 2015 +0200
> 
>     Revert "drm/i915: Read hw state into an atomic state struct, v2."
> 
> please retest current drm-intel-nightly.

Hello Jani,
We cannot verify latest drm-intel-nightly kernel, as there is a block issue after do the patches revert:
90929 - [BYT/BDW/BSW/SKL Bisected]system boot fail 
https://bugs.freedesktop.org/show_bug.cgi?id=90929
Comment 15 wendy.wang 2015-06-12 13:36:55 UTC
This issue can be fix test with http://cgit.freedesktop.org/~mlankhorst/linux/log/?h=topic/bug-90929 
https://bugs.freedesktop.org/show_bug.cgi?id=90929

So we are waiting for bug 90929 fix patch merge up.
Comment 16 wendy.wang 2015-06-15 01:20:33 UTC
Verified latest drm-intel-nightly branch kernel on BSW and BYT, this issue has been fixed, so closed.
Comment 17 Elizabeth 2017-10-06 14:29:42 UTC
Closing old verified.


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.