Hello,
I'm running latest kernel on my PC and when suspending the system, there is a lot of warnings/errors from i915 driver ...
The following are indicated while suspending:
[drm:intel_cleanup_ring_buffer] *ERROR* failed to quiesce render ring whilst cleaning up: -16
There was an enormous amount of such warnings in rc3/rc4, but with the latest fixes the number is significantly reduced - some still remaining though:
[10360.310580] WARNING: at drivers/gpu/drm/i915/i915_drv.c:322 gen6_gt_force_wake_get+0xec/0x100 [i915]() [10360.310607] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.310609] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.310613] [<ffffffffa023575c>] gen6_gt_force_wake_get+0xec/0x100 [i915] [10360.310619] [<ffffffffa024ee34>] i915_save_state+0x54/0x880 [i915] [10360.310627] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.310631] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.310635] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.310698] WARNING: at drivers/gpu/drm/i915/i915_drv.c:340 gen6_gt_force_wake_put+0x58/0x60 [i915]() [10360.310716] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.310718] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.310722] [<ffffffffa02357c8>] gen6_gt_force_wake_put+0x58/0x60 [i915] [10360.310727] [<ffffffffa024ee47>] i915_save_state+0x67/0x880 [i915] [10360.310731] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.310735] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.310739] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311290] WARNING: at drivers/gpu/drm/i915/i915_drv.c:322 gen6_gt_force_wake_get+0xec/0x100 [i915]() [10360.311307] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311309] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311313] [<ffffffffa023575c>] gen6_gt_force_wake_get+0xec/0x100 [i915] [10360.311318] [<ffffffffa024f120>] i915_save_state+0x340/0x880 [i915] [10360.311322] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311326] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311330] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311388] WARNING: at drivers/gpu/drm/i915/i915_drv.c:340 gen6_gt_force_wake_put+0x58/0x60 [i915]() [10360.311405] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311407] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311411] [<ffffffffa02357c8>] gen6_gt_force_wake_put+0x58/0x60 [i915] [10360.311415] [<ffffffffa024f133>] i915_save_state+0x353/0x880 [i915] [10360.311419] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311423] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311427] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311456] WARNING: at drivers/gpu/drm/i915/i915_drv.c:322 gen6_gt_force_wake_get+0xec/0x100 [i915]() [10360.311473] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311475] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311479] [<ffffffffa023575c>] gen6_gt_force_wake_get+0xec/0x100 [i915] [10360.311483] [<ffffffffa024ef7b>] i915_save_state+0x19b/0x880 [i915] [10360.311487] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311491] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311495] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311523] WARNING: at drivers/gpu/drm/i915/i915_drv.c:340 gen6_gt_force_wake_put+0x58/0x60 [i915]() [10360.311540] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311542] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311546] [<ffffffffa02357c8>] gen6_gt_force_wake_put+0x58/0x60 [i915] [10360.311550] [<ffffffffa024ef8e>] i915_save_state+0x1ae/0x880 [i915] [10360.311554] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311558] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311562] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311589] WARNING: at drivers/gpu/drm/i915/i915_drv.c:322 gen6_gt_force_wake_get+0xec/0x100 [i915]() [10360.311607] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311608] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311612] [<ffffffffa023575c>] gen6_gt_force_wake_get+0xec/0x100 [i915] [10360.311616] [<ffffffffa024efb2>] i915_save_state+0x1d2/0x880 [i915] [10360.311621] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311624] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311628] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
[10360.311706] WARNING: at drivers/gpu/drm/i915/i915_drv.c:340 gen6_gt_force_wake_put+0x58/0x60 [i915]() [10360.311723] [<ffffffff8105c5ef>] warn_slowpath_common+0x7f/0xc0 [10360.311725] [<ffffffff8105c64a>] warn_slowpath_null+0x1a/0x20 [10360.311729] [<ffffffffa02357c8>] gen6_gt_force_wake_put+0x58/0x60 [i915] [10360.311733] [<ffffffffa024efc5>] i915_save_state+0x1e5/0x880 [i915] [10360.311737] [<ffffffffa01a5e17>] ? drm_irq_uninstall+0x197/0x1c0 [drm] [10360.311741] [<ffffffffa0235066>] i915_drm_freeze+0x66/0xc0 [i915] [10360.311745] [<ffffffffa02352b7>] i915_pm_suspend+0x47/0xa0 [i915]
and the following when resuming:
[drm:drm_mode_getfb] *ERROR* invalid framebuffer id
lspci -v shows the following for the details of the gpu: 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] Device 0491 Flags: bus master, fast devsel, latency 0, IRQ 44 Memory at fe000000 (64-bit, non-prefetchable) [size=4M] Memory at d0000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] Expansion ROM at <unassigned> [disabled] Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [d0] Power Management version 2 Capabilities: [a4] PCI Advanced Features Kernel driver in use: i915 Kernel modules: i915
Despite the error/warnings, i haven't observed any problems with the display
Please let me know if I can help in any way in debugging this ...
Marcin
On Wed, 29 Jun 2011 06:27:53 +0100, Marcin Nowakowski marcin.nowakowski.000@gmail.com wrote:
There was an enormous amount of such warnings in rc3/rc4, but with the latest fixes the number is significantly reduced - some still remaining though:
Thanks for finding a few more. Here's a patch which fixes these on my system:
From 84a46e9ba3c077535c22a006c5da9988524a6b8b Mon Sep 17 00:00:00 2001 From: Keith Packard keithp@keithp.com Date: Wed, 29 Jun 2011 00:30:34 -0700 Subject: [PATCH] drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state
Lots of register access in these functions, some of which requires the struct mutex.
These functions now hold the struct mutex across the calls to i915_save_display and i915_restore_display, and so the internal mutex calls in those functions have been removed. To ensure that no-one else was calling them (and hence violating the new required locking invarient), those functions have been made static.
gen6_enable_rps locks the struct mutex, and so i915_restore_state unlocks the mutex around calls to that function.
Signed-off-by: Keith Packard keithp@keithp.com --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_suspend.c | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index eddabf6..1c8bfb1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -997,8 +997,6 @@ extern unsigned int i915_enable_fbc;
extern int i915_suspend(struct drm_device *dev, pm_message_t state); extern int i915_resume(struct drm_device *dev); -extern void i915_save_display(struct drm_device *dev); -extern void i915_restore_display(struct drm_device *dev); extern int i915_master_create(struct drm_device *dev, struct drm_master *master); extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index e8152d2..5257cfc 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -597,7 +597,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev) return; }
-void i915_save_display(struct drm_device *dev) +static void i915_save_display(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private;
@@ -678,7 +678,6 @@ void i915_save_display(struct drm_device *dev) }
/* VGA state */ - mutex_lock(&dev->struct_mutex); dev_priv->saveVGA0 = I915_READ(VGA0); dev_priv->saveVGA1 = I915_READ(VGA1); dev_priv->saveVGA_PD = I915_READ(VGA_PD); @@ -688,10 +687,9 @@ void i915_save_display(struct drm_device *dev) dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
i915_save_vga(dev); - mutex_unlock(&dev->struct_mutex); }
-void i915_restore_display(struct drm_device *dev) +static void i915_restore_display(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private;
@@ -783,7 +781,6 @@ void i915_restore_display(struct drm_device *dev) else I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
- mutex_lock(&dev->struct_mutex); I915_WRITE(VGA0, dev_priv->saveVGA0); I915_WRITE(VGA1, dev_priv->saveVGA1); I915_WRITE(VGA_PD, dev_priv->saveVGA_PD); @@ -791,7 +788,6 @@ void i915_restore_display(struct drm_device *dev) udelay(150);
i915_restore_vga(dev); - mutex_unlock(&dev->struct_mutex); }
int i915_save_state(struct drm_device *dev) @@ -801,6 +797,8 @@ int i915_save_state(struct drm_device *dev)
pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);
+ mutex_lock(&dev->struct_mutex); + /* Hardware status page */ dev_priv->saveHWS = I915_READ(HWS_PGA);
@@ -840,6 +838,8 @@ int i915_save_state(struct drm_device *dev) for (i = 0; i < 3; i++) dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
+ mutex_unlock(&dev->struct_mutex); + return 0; }
@@ -850,6 +850,8 @@ int i915_restore_state(struct drm_device *dev)
pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
+ mutex_lock(&dev->struct_mutex); + /* Hardware status page */ I915_WRITE(HWS_PGA, dev_priv->saveHWS);
@@ -867,6 +869,7 @@ int i915_restore_state(struct drm_device *dev) I915_WRITE(IER, dev_priv->saveIER); I915_WRITE(IMR, dev_priv->saveIMR); } + mutex_unlock(&dev->struct_mutex);
intel_init_clock_gating(dev);
@@ -878,6 +881,8 @@ int i915_restore_state(struct drm_device *dev) if (IS_GEN6(dev)) gen6_enable_rps(dev_priv);
+ mutex_lock(&dev->struct_mutex); + /* Cache mode state */ I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
@@ -891,6 +896,8 @@ int i915_restore_state(struct drm_device *dev) for (i = 0; i < 3; i++) I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
+ mutex_unlock(&dev->struct_mutex); + intel_i2c_reset(dev);
return 0;
On Wed, Jun 29, 2011 at 8:44 AM, Keith Packard keithp@keithp.com wrote:
On Wed, 29 Jun 2011 06:27:53 +0100, Marcin Nowakowski marcin.nowakowski.000@gmail.com wrote:
There was an enormous amount of such warnings in rc3/rc4, but with the latest fixes the number is significantly reduced - some still remaining though:
Thanks for finding a few more. Here's a patch which fixes these on my system:
From 84a46e9ba3c077535c22a006c5da9988524a6b8b Mon Sep 17 00:00:00 2001 From: Keith Packard keithp@keithp.com Date: Wed, 29 Jun 2011 00:30:34 -0700 Subject: [PATCH] drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state
Lots of register access in these functions, some of which requires the struct mutex.
These functions now hold the struct mutex across the calls to i915_save_display and i915_restore_display, and so the internal mutex calls in those functions have been removed. To ensure that no-one else was calling them (and hence violating the new required locking invarient), those functions have been made static.
gen6_enable_rps locks the struct mutex, and so i915_restore_state unlocks the mutex around calls to that function.
Signed-off-by: Keith Packard keithp@keithp.com
All warnings now gone, thanks.
What about the *ERROR* lines I mentioned in the first email? This patch doesn't address those - are they anything serious (otherwise they probably wouldn't be marked as errors)?
Marcin
On Wed, 29 Jun 2011 19:23:06 +0100, Marcin Nowakowski marcin.nowakowski.000@gmail.com wrote:
What about the *ERROR* lines I mentioned in the first email? This patch doesn't address those - are they anything serious (otherwise they probably wouldn't be marked as errors)?
That's an error in the X driver up in user space. The only call I see is From sna; are you using that?
dri-devel@lists.freedesktop.org