diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-31 12:57:42 (GMT) |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-06-01 08:00:47 (GMT) |
commit | 98fd81cd64674545a30a4f95388f086a626d37d2 (patch) | |
tree | 24307a4cbc9ab6763d4383e3802df4143f89fac5 | |
parent | d2ba8470ccfc90e0966c802632f8bb552f11143a (diff) | |
download | linux-fsl-qoriq-98fd81cd64674545a30a4f95388f086a626d37d2.tar.xz |
drm/i915: initialize the parity work only once
This fixes an (albeit really hard to hit) race resulting in an oops:
- The parity work get scheduled.
- We re-init the irq state and call INIT_WORK again.
- The workqueue code tries to run the work item and stumbles over a
work item that should be on it's runlist.
Also initiliaze the work item unconditionally like all the others,
it's simpler.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 53356f4..6553dcc 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1723,10 +1723,6 @@ static void ironlake_irq_preinstall(struct drm_device *dev) atomic_set(&dev_priv->irq_received, 0); - - if (IS_IVYBRIDGE(dev)) - INIT_WORK(&dev_priv->parity_error_work, ivybridge_parity_work); - I915_WRITE(HWSTAM, 0xeffe); /* XXX hotplug from PCH */ @@ -2647,6 +2643,7 @@ void intel_irq_init(struct drm_device *dev) INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func); INIT_WORK(&dev_priv->error_work, i915_error_work_func); INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work); + INIT_WORK(&dev_priv->parity_error_work, ivybridge_parity_work); dev->driver->get_vblank_counter = i915_get_vblank_counter; dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ |