All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Unconditionally initialise the interrupt workers
@ 2012-04-19 18:41 Chris Wilson
  2012-04-21 17:00 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2012-04-19 18:41 UTC (permalink / raw)
  To: intel-gfx

Rather than duplicate similar code across the IRQ installers, perform
the initialisation of the workers upfront. This will lead to simpler
teardown and quiescent code as we can assume that the workers have
been initialised.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_irq.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 53d1b6c..8b1a62f 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1993,10 +1993,6 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
 
 	atomic_set(&dev_priv->irq_received, 0);
 
-	INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
-	INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-	if (IS_GEN6(dev) || IS_IVYBRIDGE(dev))
-		INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work);
 
 	I915_WRITE(HWSTAM, 0xeffe);
 
@@ -2024,9 +2020,6 @@ static void valleyview_irq_preinstall(struct drm_device *dev)
 
 	atomic_set(&dev_priv->irq_received, 0);
 
-	INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
-	INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-
 	/* VLV magic */
 	I915_WRITE(VLV_IMR, 0);
 	I915_WRITE(RING_IMR(RENDER_RING_BASE), 0);
@@ -2295,9 +2288,6 @@ static void i915_driver_irq_preinstall(struct drm_device * dev)
 
 	atomic_set(&dev_priv->irq_received, 0);
 
-	INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
-	INIT_WORK(&dev_priv->error_work, i915_error_work_func);
-
 	if (I915_HAS_HOTPLUG(dev)) {
 		I915_WRITE(PORT_HOTPLUG_EN, 0);
 		I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT));
@@ -2468,6 +2458,10 @@ static void i915_driver_irq_uninstall(struct drm_device * dev)
 
 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);
+
 	dev->driver->get_vblank_counter = i915_get_vblank_counter;
 	dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
 	if (IS_G4X(dev) || IS_GEN5(dev) || IS_GEN6(dev) || IS_IVYBRIDGE(dev) ||
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Unconditionally initialise the interrupt workers
  2012-04-19 18:41 [PATCH] drm/i915: Unconditionally initialise the interrupt workers Chris Wilson
@ 2012-04-21 17:00 ` Daniel Vetter
  2012-04-21 17:01   ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2012-04-21 17:00 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Thu, Apr 19, 2012 at 07:41:49PM +0100, Chris Wilson wrote:
> Rather than duplicate similar code across the IRQ installers, perform
> the initialisation of the workers upfront. This will lead to simpler
> teardown and quiescent code as we can assume that the workers have
> been initialised.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Unconditionally initialise the interrupt workers
  2012-04-21 17:00 ` Daniel Vetter
@ 2012-04-21 17:01   ` Daniel Vetter
  2012-04-21 17:07     ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2012-04-21 17:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sat, Apr 21, 2012 at 07:00:24PM +0200, Daniel Vetter wrote:
> On Thu, Apr 19, 2012 at 07:41:49PM +0100, Chris Wilson wrote:
> > Rather than duplicate similar code across the IRQ installers, perform
> > the initialisation of the workers upfront. This will lead to simpler
> > teardown and quiescent code as we can assume that the workers have
> > been initialised.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Queued for -next, thanks for the patch.
Actually, it doesn't compile. Dropped.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Unconditionally initialise the interrupt workers
  2012-04-21 17:01   ` Daniel Vetter
@ 2012-04-21 17:07     ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2012-04-21 17:07 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Sat, 21 Apr 2012 19:01:11 +0200, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Sat, Apr 21, 2012 at 07:00:24PM +0200, Daniel Vetter wrote:
> > On Thu, Apr 19, 2012 at 07:41:49PM +0100, Chris Wilson wrote:
> > > Rather than duplicate similar code across the IRQ installers, perform
> > > the initialisation of the workers upfront. This will lead to simpler
> > > teardown and quiescent code as we can assume that the workers have
> > > been initialised.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Queued for -next, thanks for the patch.
> Actually, it doesn't compile. Dropped.

Rebasing fun. I'll pick it up again if I ever get a tested-by on the
i8xx irq patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-21 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 18:41 [PATCH] drm/i915: Unconditionally initialise the interrupt workers Chris Wilson
2012-04-21 17:00 ` Daniel Vetter
2012-04-21 17:01   ` Daniel Vetter
2012-04-21 17:07     ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.