Bug 78114 - [regression] WARNING: CPU: 1 PID: 1961 at drivers/gpu/drm/i915/intel_sprite.c:58 intel_pipe_update_start
Summary: [regression] WARNING: CPU: 1 PID: 1961 at drivers/gpu/drm/i915/intel_sprite.c...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: high normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-30 13:22 UTC by Chris Wilson
Modified: 2017-07-24 22:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Chris Wilson 2014-04-30 13:22:12 UTC
[ 4981.287656] PM: Entering mem sleep
[ 4981.287795] Suspending console(s) (use no_console_suspend to debug)
[ 4981.288352] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 4981.288512] sd 0:0:0:0: [sda] Stopping disk
[ 4981.346422] ------------[ cut here ]------------
[ 4981.346431] WARNING: CPU: 1 PID: 1961 at drivers/gpu/drm/i915/intel_sprite.c:58 intel_pipe_update_start+0x215/0x230()
[ 4981.346457] Modules linked in: ccm bnep bluetooth arc4 iwldvm mac80211 iwlwifi cfg80211 lpc_ich snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic hp_wmi snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq snd_seq_device sdhci_pci sdhci mmc_core snd_pcm x86_pkg_temp_thermal crc32c_intel sparse_keymap serio_raw snd_timer snd soundcore microcode mfd_core hp_accel rfkill lis3lv02d input_polldev wmi e1000e ptp pps_core
[ 4981.346460] CPU: 1 PID: 1961 Comm: kworker/u16:13 Not tainted 3.15.0-rc2+ #277
[ 4981.346461] Hardware name: Hewlett-Packard HP ProBook 6360b/1620, BIOS 68SCF Ver. B.42 12/29/2010
[ 4981.346477] Workqueue: events_unbound async_run_entry_fn
[ 4981.346480]  00000000 00000000 f0ea5cac c15cd584 00000000 f0ea5cdc c1041b8e c177ac3c
[ 4981.346482]  00000001 000007a9 c17c0b48 0000003a c13b0595 c13b0595 f3150000 f43e2000
[ 4981.346484]  f43e2000 f0ea5cec c1041c52 00000009 00000000 f0ea5d38 c13b0595 f3150000
[ 4981.346485] Call Trace:
[ 4981.346489]  [<c15cd584>] dump_stack+0x41/0x52
[ 4981.346491]  [<c1041b8e>] warn_slowpath_common+0x7e/0xa0
[ 4981.346493]  [<c13b0595>] ? intel_pipe_update_start+0x215/0x230
[ 4981.346495]  [<c13b0595>] ? intel_pipe_update_start+0x215/0x230
[ 4981.346496]  [<c1041c52>] warn_slowpath_null+0x22/0x30
[ 4981.346498]  [<c13b0595>] intel_pipe_update_start+0x215/0x230
[ 4981.346500]  [<c107d620>] ? prepare_to_wait_event+0xd0/0xd0
[ 4981.346502]  [<c13b07e0>] ilk_disable_plane+0x30/0x100
[ 4981.346503]  [<c107d28f>] ? __wake_up+0x3f/0x50
[ 4981.346505]  [<c13b027c>] intel_disable_plane+0x8c/0xd0
[ 4981.346507]  [<c13b147b>] intel_plane_disable+0x1b/0x20
[ 4981.346511]  [<c13986e7>] intel_disable_planes+0x57/0x60
[ 4981.346512]  [<c13a3dea>] ilk_crtc_disable_planes+0x5a/0x80
[ 4981.346514]  [<c13a3e4f>] ironlake_crtc_disable+0x3f/0x830
[ 4981.346516]  [<c10924af>] ? free_irq+0x3f/0x90
[ 4981.346519]  [<c1343f83>] ? drm_irq_uninstall+0x93/0x180
[ 4981.346521]  [<c10578f7>] ? __cancel_work_timer+0x57/0xc0
[ 4981.346524]  [<c13586f8>] i915_drm_freeze+0xb8/0x140
[ 4981.346536]  [<c1069ba8>] ? ttwu_do_wakeup+0x18/0x120
[ 4981.346537]  [<c1358a42>] i915_pm_suspend+0x32/0x50
[ 4981.346540]  [<c12a5342>] pci_pm_suspend+0x62/0x120
[ 4981.346543]  [<c15d1bbf>] ? wait_for_completion+0x1f/0xc0
[ 4981.346556]  [<c12a52e0>] ? pci_pm_freeze+0xc0/0xc0
[ 4981.346562]  [<c13e2a3a>] dpm_run_callback+0x3a/0x90
[ 4981.346568]  [<c13e32b2>] __device_suspend+0xb2/0x1f0
[ 4981.346572]  [<c13e352f>] async_suspend+0x1f/0x90
[ 4981.346576]  [<c1062ec5>] async_run_entry_fn+0x35/0x140
[ 4981.346583]  [<c106c13f>] ? wake_up_process+0x1f/0x40
[ 4981.346589]  [<c1057aad>] process_one_work+0x10d/0x380
[ 4981.346593]  [<c10562b5>] ? start_worker+0x25/0x30
[ 4981.346599]  [<c10583c5>] ? manage_workers.isra.29+0x1a5/0x250
[ 4981.346605]  [<c1058571>] worker_thread+0x101/0x330
[ 4981.346610]  [<c1058470>] ? manage_workers.isra.29+0x250/0x250
[ 4981.346615]  [<c105d711>] kthread+0xa1/0xc0
[ 4981.346621]  [<c15daf01>] ret_from_kernel_thread+0x21/0x30
[ 4981.346625]  [<c105d670>] ? kthread_create_on_node+0x110/0x110
[ 4981.346630] ---[ end trace 7b8bc024e8cc97bd ]---
[ 4981.821205] PM: suspend of devices complete after 532.578 msecs
Comment 1 Chris Wilson 2014-04-30 13:22:55 UTC
intel_pipe_update_start():  WARN_ON(!mutex_is_locked(&crtc->base.mutex));
Comment 2 Chris Wilson 2014-04-30 13:25:49 UTC
Could it be as simple as

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 36bdbdfbedb0..160b4b5eb125 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -476,8 +476,11 @@ static int i915_drm_freeze(struct drm_device *dev)
                 * for _thaw.
                 */
                mutex_lock(&dev->mode_config.mutex);
-               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
+               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
+                       mutex_lock(&crtc->mutex);
                        dev_priv->display.crtc_disable(crtc);
+                       mutex_unlock(&crtc->mutex);
+               }
                mutex_unlock(&dev->mode_config.mutex);
 
                intel_modeset_suspend_hw(dev);

?
Comment 3 Chris Wilson 2014-04-30 13:26:41 UTC
Guilty commit:

commit 24576d23976746cb52e7700c4cadbf4bc1bc3472
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue Mar 26 09:25:45 2013 -0700

    drm/i915: enable VT switchless resume v3
    
    With the other bits in place, we can do this safely.
    
    v2: disable backlight on suspend to prevent premature enablement on resume
    v3: disable CRTCs on suspend to allow RTD3 (Kristen)
    
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

but assigning to Daniel as the lock imagineer.
Comment 4 Daniel Vetter 2014-05-19 08:56:46 UTC
(In reply to comment #2)
> Could it be as simple as
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c
> index 36bdbdfbedb0..160b4b5eb125 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -476,8 +476,11 @@ static int i915_drm_freeze(struct drm_device *dev)
>                  * for _thaw.
>                  */
>                 mutex_lock(&dev->mode_config.mutex);
> -               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> +               list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
> {
> +                       mutex_lock(&crtc->mutex);
>                         dev_priv->display.crtc_disable(crtc);
> +                       mutex_unlock(&crtc->mutex);
> +               }
>                 mutex_unlock(&dev->mode_config.mutex);
>  
>                 intel_modeset_suspend_hw(dev);
> 
> ?

Has my review, definitely. Please submit to intel-gfx.
Comment 5 Daniel Vetter 2014-05-22 09:03:05 UTC
commit f87133cf5472415afff9a561ff6342574bde9342
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu May 22 09:44:40 2014 +0100

    drm/i915: Hold CRTC lock whilst freezing the planes


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.