* [PATCH] i915: remove pm_qos request on error
@ 2014-01-25 9:13 Stanislaw Gruszka
2014-01-25 11:53 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2014-01-25 9:13 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, dri-devel
Not removing pm qos request and free memory for it can cause crash,
when some other driver use pm qos. For example, this oops:
BUG: unable to handle kernel paging request at fffffffffffffff8
IP: [<ffffffff81307a6b>] plist_add+0x5b/0xd0
Call Trace:
[<ffffffff810acf25>] pm_qos_update_target+0x125/0x1e0
[<ffffffff810ad071>] pm_qos_add_request+0x91/0x100
[<ffffffffa053ec14>] e1000_open+0xe4/0x5b0 [e1000e]
was caused by earlier i915 probe failure:
[drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003004 tail 00000000 start 00003000
[drm:i915_driver_load] *ERROR* failed to init modeset
i915: probe of 0000:00:02.0 failed with error -5
Bug report:
http://bugzilla.redhat.com/show_bug.cgi?id=1057533
Reported-by: Giandomenico De Tullio <ghisha@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/gpu/drm/i915/i915_dma.c | 4 ++++
drivers/gpu/drm/i915/i915_irq.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 5c64842..e141a32 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1603,6 +1603,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
goto out_mtrrfree;
}
+ pm_qos_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY,
+ PM_QOS_DEFAULT_VALUE);
+
intel_irq_init(dev);
intel_uncore_sanitize(dev);
@@ -1679,6 +1682,7 @@ out_gem_unload:
intel_teardown_gmbus(dev);
intel_teardown_mchbar(dev);
+ pm_qos_remove_request(&dev_priv->pm_qos);
destroy_workqueue(dev_priv->wq);
out_mtrrfree:
arch_phys_wc_del(dev_priv->gtt.mtrr);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 5d1dedc..09e268a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3784,8 +3784,6 @@ void intel_irq_init(struct drm_device *dev)
setup_timer(&dev_priv->hotplug_reenable_timer, i915_reenable_hotplug_timer_func,
(unsigned long) dev_priv);
- pm_qos_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
-
if (IS_GEN2(dev)) {
dev->max_vblank_count = 0;
dev->driver->get_vblank_counter = i8xx_get_vblank_counter;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i915: remove pm_qos request on error
2014-01-25 9:13 [PATCH] i915: remove pm_qos request on error Stanislaw Gruszka
@ 2014-01-25 11:53 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-01-25 11:53 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: Daniel Vetter, intel-gfx, dri-devel
On Sat, Jan 25, 2014 at 10:13:37AM +0100, Stanislaw Gruszka wrote:
> Not removing pm qos request and free memory for it can cause crash,
> when some other driver use pm qos. For example, this oops:
>
> BUG: unable to handle kernel paging request at fffffffffffffff8
> IP: [<ffffffff81307a6b>] plist_add+0x5b/0xd0
> Call Trace:
> [<ffffffff810acf25>] pm_qos_update_target+0x125/0x1e0
> [<ffffffff810ad071>] pm_qos_add_request+0x91/0x100
> [<ffffffffa053ec14>] e1000_open+0xe4/0x5b0 [e1000e]
>
> was caused by earlier i915 probe failure:
>
> [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
> [drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003004 tail 00000000 start 00003000
> [drm:i915_driver_load] *ERROR* failed to init modeset
> i915: probe of 0000:00:02.0 failed with error -5
>
> Bug report:
> http://bugzilla.redhat.com/show_bug.cgi?id=1057533
>
> Reported-by: Giandomenico De Tullio <ghisha@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Picked up for -fixes, thanks for the patch. I've remove the movement of
the to pm_qos_add_request though. If we want to clean this is I think an
intel_irq_fini which is called both here and in the unload code is better.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-25 11:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-25 9:13 [PATCH] i915: remove pm_qos request on error Stanislaw Gruszka
2014-01-25 11:53 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox