<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [SKL] scaler atomic code tries to read back CDCLK while the device is suspended"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90874">90874</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SKL] scaler atomic code tries to read back CDCLK while the device is suspended
</td>
</tr>
<tr>
<th>Product</th>
<td>DRI
</td>
</tr>
<tr>
<th>Version</th>
<td>XOrg git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>DRM/Intel
</td>
</tr>
<tr>
<th>Assignee</th>
<td>intel-gfx-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>damien.lespiau@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-gfx-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>intel-gfx-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>When waking up from run-time PM, I get this warning:
[ 3757.817202] WARNING: CPU: 1 PID: 23158 at
drivers/gpu/drm/i915/intel_uncore.c:70
assert_device_not_suspended.isra.10+0x60/0x70 [i915]()
[ 3757.817203] Device suspended
[ 3757.817204] Modules linked in: snd_hda_codec_hdmi cfg80211 bluetooth rfkill
vfat fat snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal
coretemp snd_hda_intel kvm_intel snd_hda_codec kvm snd_hwdep snd_hda_core
snd_seq crc32_pclmul crc32c_intel snd_seq_device ghash_clmulni_intel snd_pcm
microcode snd_timer serio_raw snd soundcore acpi_pad pegasus mii i915
i2c_algo_bit drm_kms_helper drm sdhci_acpi i2c_core sdhci mmc_core video
[ 3757.817231] CPU: 1 PID: 23158 Comm: pm_rpm Tainted: G W
4.1.0-rc6+ #7
[ 3757.817233] Hardware name: Intel Corporation Skylake Client platform/Skylake
Y LPDDR3 RVP3, BIOS SKLSE2P1.86C.X060.R00.1411120819 11/12/2014
[ 3757.817234] ffffffffa01c5680 ffff88009a8c3968 ffffffff8178848c
0000000000000000
[ 3757.817238] ffff88009a8c39b8 ffff88009a8c39a8 ffffffff8109425a
0000000000000000
[ 3757.817241] ffff880093040000 0000000000046010 ffff88003f051400
ffff880093040080
[ 3757.817244] Call Trace:
[ 3757.817249] [<ffffffff8178848c>] dump_stack+0x45/0x57
[ 3757.817253] [<ffffffff8109425a>] warn_slowpath_common+0x8a/0xc0
[ 3757.817255] [<ffffffff810942d6>] warn_slowpath_fmt+0x46/0x50
[ 3757.817272] [<ffffffffa01449e0>]
assert_device_not_suspended.isra.10+0x60/0x70 [i915]
[ 3757.817289] [<ffffffffa0147ae5>] gen9_read32+0x35/0x310 [i915]
[ 3757.817307] [<ffffffffa0151c23>] skylake_get_display_clock_speed+0x23/0x130
[i915]
[ 3757.817326] [<ffffffffa016d011>] skl_max_scale+0x31/0x70 [i915]
[ 3757.817346] [<ffffffffa016d313>] intel_check_primary_plane+0x2c3/0x330
[i915]
[ 3757.817358] [<ffffffffa006c2c9>] ? drm_crtc_get_hv_timing+0x39/0x60 [drm]
[ 3757.817377] [<ffffffffa018054d>] intel_plane_atomic_check+0x11d/0x220
[i915]
[ 3757.817384] [<ffffffffa00d4b1a>] drm_atomic_helper_check_planes+0xca/0x1f0
[drm_kms_helper]
[ 3757.817401] [<ffffffffa0166484>] intel_modeset_compute_config+0x634/0x1260
[i915]
[ 3757.817414] [<ffffffffa007fa5d>] ? drm_atomic_set_fb_for_plane+0x2d/0x90
[drm]
[ 3757.817430] [<ffffffffa016bc98>] intel_crtc_set_config+0x358/0x5b0 [i915]
[ 3757.817441] [<ffffffffa006e262>] drm_mode_set_config_internal+0x72/0x120
[drm]
[ 3757.817445] [<ffffffff811d6f12>] ? might_fault+0x42/0xa0
[ 3757.817455] [<ffffffffa007248e>] drm_mode_setcrtc+0xde/0x560 [drm]
[ 3757.817462] [<ffffffffa0062c79>] drm_ioctl+0x359/0x690 [drm]
[ 3757.817471] [<ffffffffa00723b0>] ? drm_mode_setplane+0x1e0/0x1e0 [drm]
[ 3757.817475] [<ffffffff81239948>] do_vfs_ioctl+0x318/0x570
[ 3757.817478] [<ffffffff81149e01>] ? __audit_syscall_entry+0x21/0x110
[ 3757.817481] [<ffffffff8133786b>] ? selinux_file_ioctl+0x5b/0x110
[ 3757.817483] [<ffffffff81239c21>] SyS_ioctl+0x81/0xa0
[ 3757.817486] [<ffffffff8179152e>] system_call_fastpath+0x12/0x76
[ 3757.817202] WARNING: CPU: 1 PID: 23158 at
drivers/gpu/drm/i915/intel_uncore.c:70
assert_device_not_suspended.isra.10+0x60/0x70 [i915]()
[ 3757.817203] Device suspended
[ 3757.817204] Modules linked in: snd_hda_codec_hdmi cfg80211 bluetooth rfkill
vfat fat snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal
coretemp snd_hda_intel kvm_intel snd_hda_codec kvm snd_hwdep snd_hda_core
snd_seq crc32_pclmul crc32c_intel snd_seq_device ghash_clmulni_intel snd_pcm
microcode snd_timer serio_raw snd soundcore acpi_pad pegasus mii i915
i2c_algo_bit drm_kms_helper drm sdhci_acpi i2c_core sdhci mmc_core video
[ 3757.817231] CPU: 1 PID: 23158 Comm: pm_rpm Tainted: G W
4.1.0-rc6+ #7
[ 3757.817233] Hardware name: Intel Corporation Skylake Client platform/Skylake
Y LPDDR3 RVP3, BIOS SKLSE2P1.86C.X060.R00.1411120819 11/12/2014
[ 3757.817234] ffffffffa01c5680 ffff88009a8c3968 ffffffff8178848c
0000000000000000
[ 3757.817238] ffff88009a8c39b8 ffff88009a8c39a8 ffffffff8109425a
0000000000000000
[ 3757.817241] ffff880093040000 0000000000046010 ffff88003f051400
ffff880093040080
[ 3757.817244] Call Trace:
[ 3757.817249] [<ffffffff8178848c>] dump_stack+0x45/0x57
[ 3757.817253] [<ffffffff8109425a>] warn_slowpath_common+0x8a/0xc0
[ 3757.817255] [<ffffffff810942d6>] warn_slowpath_fmt+0x46/0x50
[ 3757.817272] [<ffffffffa01449e0>]
assert_device_not_suspended.isra.10+0x60/0x70 [i915]
[ 3757.817289] [<ffffffffa0147ae5>] gen9_read32+0x35/0x310 [i915]
[ 3757.817307] [<ffffffffa0151c23>] skylake_get_display_clock_speed+0x23/0x130
[i915]
[ 3757.817326] [<ffffffffa016d011>] skl_max_scale+0x31/0x70 [i915]
[ 3757.817346] [<ffffffffa016d313>] intel_check_primary_plane+0x2c3/0x330
[i915]
[ 3757.817358] [<ffffffffa006c2c9>] ? drm_crtc_get_hv_timing+0x39/0x60 [drm]
[ 3757.817377] [<ffffffffa018054d>] intel_plane_atomic_check+0x11d/0x220
[i915]
[ 3757.817384] [<ffffffffa00d4b1a>] drm_atomic_helper_check_planes+0xca/0x1f0
[drm_kms_helper]
[ 3757.817401] [<ffffffffa0166484>] intel_modeset_compute_config+0x634/0x1260
[i915]
[ 3757.817414] [<ffffffffa007fa5d>] ? drm_atomic_set_fb_for_plane+0x2d/0x90
[drm]
[ 3757.817430] [<ffffffffa016bc98>] intel_crtc_set_config+0x358/0x5b0 [i915]
[ 3757.817441] [<ffffffffa006e262>] drm_mode_set_config_internal+0x72/0x120
[drm]
[ 3757.817445] [<ffffffff811d6f12>] ? might_fault+0x42/0xa0
[ 3757.817455] [<ffffffffa007248e>] drm_mode_setcrtc+0xde/0x560 [drm]
[ 3757.817462] [<ffffffffa0062c79>] drm_ioctl+0x359/0x690 [drm]
[ 3757.817471] [<ffffffffa00723b0>] ? drm_mode_setplane+0x1e0/0x1e0 [drm]
[ 3757.817475] [<ffffffff81239948>] do_vfs_ioctl+0x318/0x570
[ 3757.817478] [<ffffffff81149e01>] ? __audit_syscall_entry+0x21/0x110
[ 3757.817481] [<ffffffff8133786b>] ? selinux_file_ioctl+0x5b/0x110
[ 3757.817483] [<ffffffff81239c21>] SyS_ioctl+0x81/0xa0
[ 3757.817486] [<ffffffff8179152e>] system_call_fastpath+0x12/0x76
The intel_check_primary_plane() codes tries to access the hardware, which I
believe is not what we're supposed to do in those functions. We do have the
cdclk frequency cached into dev_priv, but that may not be the right fix either
as, at that time, the device is suspended and we haven't quite decided if the
cached cdclk value when we're on the reference clock should be the previous
CDCLK or the reference clock freq (most likely the latter).
To properly solve this I think we need to make CDCLK part of the atomic state
and derive the target CDCLK frequency when computing the configuration.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are on the CC list for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>