Bug 96915 - [APL] too many voltage retries / CPU pipe X FIFO underrun / audio errors when suspending to ram
Summary: [APL] too many voltage retries / CPU pipe X FIFO underrun / audio errors when...
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Luis Botello
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 13:40 UTC by cprigent
Modified: 2016-12-21 08:19 UTC (History)
3 users (show)

See Also:
i915 platform: BXT
i915 features: display/atomic, display/DP, power/suspend-resume


Attachments
dmesg-error (96.66 KB, text/plain)
2016-07-13 13:40 UTC, cprigent
no flags Details
APL_suspend-to-ram_200-cycles-with-success_all-errors (57.74 KB, text/plain)
2016-07-20 08:18 UTC, cprigent
no flags Details
APL__dmesg__with-patch-applied (1.20 MB, text/plain)
2016-10-14 08:11 UTC, cprigent
no flags Details

Description cprigent 2016-07-13 13:40:25 UTC
Created attachment 125053 [details]
dmesg-error

Platform: APL system
CPU Name : Intel(R) Genuine Processor @ 1.1 GHz (family: 6, model: 12, stepping: 9) 4 cores
QDF : Q6HE
SoC : B1
CRB : Apollo Lake DDR3L RVP1A FAB2
Reworks : R19, R20

Software 
Bios: 144_B10 APLK_B0_IFWI_X64_R_2016_06_27_0956_SPI_RVP1.bin from \\gar\ec\proj\ba\CCG\APL BIOS\External\BIOS_Release\Daily\v144_10_2016_WW27.1\IFWI\IFWI_RVP1_Release\IFWI
KSC: 1.15
Linux distribution: Ubuntu 16.04 64 bits
Kernel: tag drm-intel-testing-2016-07-11 4.7.0-rc6 0230e3c from http://cgit.freedesktop.org/drm-intel/
commit 0230e3c4eb76cf8f57cf40db0e908b96b84e3911
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jul 10 13:24:46 2016 +0100
drm-intel-nightly: 2016y-07m-10d-12h-23m-38s UTC integration manifest
drm: libdrm-2.4.68-14 8c8d5ddfrom git://anongit.freedesktop.org/mesa/drm
mesa: mesa-11.2.2 3a9f628from git://anongit.freedesktop.org/mesa/mesa
cairo: 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xserver: xorg-server-1.18.0-454 033888e from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel: 2.99.917-676 26f8ab5 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva: libva-1.7.0-26 c36971c from git://git.freedesktop.org/git/vaapi/libva
vaapi-intel-driver: 1.7.0-53 bcde10d from git://git.freedesktop.org/git/vaapi/intel-driver
GuC 8.7
DMC 1.07 from https://01.org/linuxgraphics/downloads/broxton-dmc-1.07

Steps:
------
1. Suspend to RAM and resume:
Execute commands
sudo -s 
echo mem > /sys/power/state
Wait 30 seconds
Resume with keyboard
2. Wait 30 seconds
3. Repeat previous steps several times

Actual results:
---------------
2. Log shows example:
[  136.397754] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  144.781652] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to enable link training
[  144.804637] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to start channel equalization
[  154.070393] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe C FIFO underrun

3. DUT crashed after 20 iterations

Expected result:
----------------
No such error
Suspend to ram and resume works each time
Comment 1 cprigent 2016-07-13 13:42:47 UTC
Could be the same as Bug 96914

Related bugs:
*ERROR* CPU pipe B FIFO underrun:
Bug 94605, Bug 94884, Bug 96226, Bug 96851

*ERROR* too many voltage retries, give up:
Bug 96436

*ERROR* failed to start channel equalization:
Bug 96614
Comment 2 cprigent 2016-07-20 08:18:43 UTC
Created attachment 125154 [details]
APL_suspend-to-ram_200-cycles-with-success_all-errors

With new kernel and without GuC, DUT did 200 cycles with success but kernel log contains a lot of errors.

Platform: APL system
CPU Name : Intel(R) Genuine Processor @ 1.1 GHz (family: 6, model: 12, stepping: 9) 4 cores
QDF : Q6HE
SoC : B1
CRB : Apollo Lake DDR3L RVP1A FAB2
Reworks : R19, R20

Software 
Bios: 144_B10 APLK_B0_IFWI_X64_R_2016_06_27_0956_SPI_RVP1.bin from \\gar\ec\proj\ba\CCG\APL BIOS\External\BIOS_Release\Daily\v144_10_2016_WW27.1\IFWI\IFWI_RVP1_Release\IFWI
KSC: 1.15
Linux distribution: Ubuntu 16.04 64 bits
Kernel: 4.7.0-rc7 895a714 from http://cgit.freedesktop.org/drm-intel/ with https://patchwork.freedesktop.org/patch/99445/ applied
  commit 895a714b0b596cfcbe82065f99376ad02d369125
  Author: Daniel Vetter <daniel.vetter@ffwll.ch>
  Date:   Mon Jul 18 14:35:39 2016 +0200
  drm-intel-nightly: 2016y-07m-18d-12h-35m-15s UTC integration manifest
drm: libdrm-2.4.68-15 2212a64 from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-11.2.2 3a9f628from git://anongit.freedesktop.org/mesa/mesa
cairo: 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xserver: xorg-server-1.18.0-460 e8e3675 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel: 2.99.917-676 26f8ab5 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva: libva-1.7.0-26 c36971c from git://git.freedesktop.org/git/vaapi/libva
vaapi-intel-driver: 1.7.0-53 bcde10d from git://git.freedesktop.org/git/vaapi/intel-driver
DMC 1.07 from https://01.org/linuxgraphics/downloads/broxton-dmc-1.07
Comment 3 Imre Deak 2016-07-22 16:27:16 UTC
Could you try the following:

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 78beb7e..3c0c2d6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13682,12 +13682,14 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 			 */
 			intel_check_cpu_fifo_underruns(dev_priv);
 			intel_check_pch_fifo_underruns(dev_priv);
-
-			if (!crtc->state->active)
-				intel_update_watermarks(crtc);
 		}
 	}
 
+	for_each_crtc_in_state(state, crtc, old_crtc_state, i) {
+		if (needs_modeset(crtc->state) && !crtc->state->active)
+			intel_update_watermarks(crtc);
+	}
+
 	/* Only after disabling all output pipelines that will be changed can we
 	 * update the the output configuration. */
 	intel_modeset_update_crtc_state(state);
Comment 4 Imre Deak 2016-08-01 14:03:32 UTC
Ping: could you try the patch at
https://lists.freedesktop.org/archives/intel-gfx/2016-July/101462.html
Comment 5 yann 2016-08-01 14:13:17 UTC
Christophe, please try with Imre's patch (also available at https://patchwork.freedesktop.org/series/10206/)
Comment 6 cprigent 2016-10-14 08:11:21 UTC
Created attachment 127291 [details]
APL__dmesg__with-patch-applied

ERROR CPU pipe B FIFO underrun is not reproduced when suspending to RAM with the patch applied but I see it earlier in my log:

user@BXTP6:~/Desktop$ dmesg |grep ERROR
[   14.343070] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
[  207.578429] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to enable link training
[  207.611828] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to start channel equalization

I also see 2 GPU Hangs, I reported it here: bug 98247

Platform BXT-P: APL system
CPU Name : Intel(R) Genuine Processor @ 1.1 GHz (family: 6, model: 12, stepping: 9) 4 cores
QDF : Q6HE
SoC : B1
CRB : Apollo Lake DDR3L RVP1A FAB2
Reworks: R19, R20

Software 
Bios: 144_B10 APLK_B0_IFWI_X64_R_2016_06_27_0956_SPI_RVP1.bin from \\gar\ec\proj\ba\CCG\APL BIOS\External\BIOS_Release\Daily\v144_10_2016_WW27.1\IFWI\IFWI_RVP1_Release\IFWI
KSC: 1.15
Linux distribution: Ubuntu 16.04 64 bits
DMC 1.07
GuC 8.7

Kernel: 4.8.0 f79322d from http://cgit.freedesktop.org/drm-intel/
  commit f79322df75bf6193458ec601a345ba6bd86befca
  Author: Chris Wilson <chris@chris-wilson.co.uk>
  Date:   Tue Oct 11 10:16:23 2016 +0100
  drm-intel-nightly: 2016y-10m-11d-09h-16m-03s UTC integration manifest
with applied https://patchwork.freedesktop.org/patch/100578/

libdrm-2.4.71 a44c9c3 from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-12.0.0 8b06176 from git://anongit.freedesktop.org/mesa/mesa
cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xorg-server-1.18.99.901-76 97a8353 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.917-712 696f58f from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva-1.7.2-38 3b7e499 from git://git.freedesktop.org/git/vaapi/libva 
vaapi-intel-driver: 1.7.2-133 dd73514 from git://git.freedesktop.org/git/vaapi/intel-driver

External screens: ASUS PB238Q (HDMI), LG 25UM55D (DP)
Comment 7 Jani Saarinen 2016-12-09 10:52:04 UTC
Christophe, is this still valid?
Comment 8 Nobody 2016-12-09 18:37:53 UTC
Luis could you test this with latest configuration, this can happen next week after current activities.
Comment 9 Luis Botello 2016-12-20 18:58:29 UTC
Issue is not seen on my side with the following config:

============================================
 Software information
============================================
Kernel version                  : 4.9.0-drm-tip-ww52-commit-6096aee+
Linux distribution              : Ubuntu 16.04.1 LTS
Architecture                    : 64-bit
Gfx stack code                  : 2121337496
Mesa version                    : 13.0.2 (git-c9e993b
Xorg-Xserver version            : 1.19.0
DRM version                     : 2.4.74
VAAPI version                   : Intel i965 driver for Intel(R) Broxton - 1.7.3
Cairo version                   : 1.15.2
Intel GPU Tools version         : Tag [intel-gpu-tools-1.17] / Commit [e631bb5]
Kernel driver in use            : i915
Hardware acceleration           : Enabled
Bios revision                   : 159.20
Bios release date               : 10/11/2016
KSC revision                    : 1.6

============================================
 Firmwares information
============================================
DMC fw loaded                   : yes
DMC version                     : 1.7


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.