Summary: | Improve resume time | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Paul Menzel <pmenzel+bugs.freedesktop.org> | ||||||
Component: | DRM/Intel | Assignee: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||
Status: | CLOSED NOTABUG | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | david.weinehall, intel-gfx-bugs, pmenzel+bugs.freedesktop.org | ||||||
Version: | DRI git | ||||||||
Hardware: | Other | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
i915 platform: | KBL | i915 features: | power/suspend-resume | ||||||
Attachments: |
|
Description
Paul Menzel
2017-02-01 14:46:12 UTC
Here is the used graphics controller. ``` $ lspci -v -nn -s 00:02.0 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5916] (rev 02) (prog-if 00 [VGA controller]) Subsystem: CLEVO/KAPOK Computer Device [1558:2410] Flags: bus master, fast devsel, latency 0, IRQ 130 Memory at de000000 (64-bit, non-prefetchable) [size=16M] Memory at c0000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: i915 Kernel modules: i915 ``` User *Weine* in the IRC channel #intel-gfx@irc.freenode.net asked to look at the eDP panel timings. ``` $ sudo cat /sys/kernel/debug/dri/0/eDP-1/i915_panel_timings Panel power up delay: 200 Panel power down delay: 50 Backlight on delay: 20 Backlight off delay: 230 ``` ``` $ lspci -nn -v -s 0:02.0 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5916] (rev 02) (prog-if 00 [VGA controller]) Subsystem: Dell Device [1028:075b] Flags: bus master, fast devsel, latency 0, IRQ 285 Memory at db000000 (64-bit, non-prefetchable) [size=16M] Memory at 90000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: i915 Kernel modules: i915 ``` Created attachment 129297 [details]
HTML output of `analyze_suspend.py`
Please ignore comment #3 and comment #4, meant for bug #99650 [1]. [1] https://bugs.freedesktop.org/show_bug.cgi?id=99650 35ms suspend, 46ms resume are already quite respectable figures. This includes access to hardware, etc. I suspect this might also include loading the DMC firmware (unless you're running your system without DMC firmware, in which case it's likely to have non-functioning power management instead). If you want me to analyse this further, feel free to provide an analyse_suspend callgraph like the one in #99650. Created attachment 129901 [details] HTML output of `analyze_suspend.py -config config/suspend-callgraph.cfg -filter i915` (In reply to David Weinehall from comment #7) > If you want me to analyse this further, feel free to provide an > analyse_suspend callgraph like the one in #99650. Please find the output attached from a Linux kernel built from today’s latest commit from Linus’ master branch. ``` $ git describe --tag v4.10-9579-gf1ef09f ``` The numbers are higher though. > i915 @ 0000:00:02.0 {i915} async_device (Total Suspend: 331.893 ms Total Resume: 304.859 ms) One more thing that would be helpful is the output of: cat /sys/kernel/debug/dri/0/eDP-1/i915_panel_timings Looking at the suspend/resume log I make the following observations: intel_edp_backlight_off() takes 238ms intel_edp_panel_off() takes 52ms 332ms - 238ms - 52ms = 52ms, which is a totally reasonable suspend time. (It should be noted here, and for the corresponding panel on/backlight on timeouts, that due to the potentially long waits we're doing ranged sleeps, not precise sleeps, meaning that these delays vary in length). The 22ms in resume_noirq() is mostly spent in pci_power_up(), which is outside our control (it's part of the PCI subsystem; I'm no expert here, but I find it likely that the delays imposed here are mandated by specs). The majority of the time spent in resume_early() is spent in intel_csr_load_program() loading the DMC firmware (necessary for deeper display power management). I should probably add some bad news here; it's likely that if you enable GuC submissions and also provide the HuC firmware you'll see further slowdowns, since those firmwares will also need loading. I'm currently investigating the feasibility of loading these firmwares asynchronously, but that will only happen if we can guarantee that it doesn't introduce race conditions or unduly complicates the driver. As for the intel_opregion_setup(), it seems that your BIOS is really slow. We're requesting BIOS data and polling for the data. On the test systems here the BIOS returns the relevant data within 1ms; on your machine it takes 18ms. I'd posit that this is a hardware issue, not a software issue. intel_edp_panel_on() takes 201ms This leaves us with: 274ms - 201ms - (18 - 1)ms = 57ms, which again is a perfectly cromulent figure. So, nothing here stands out apart from the suspected BIOS read slowdown. |
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.