diff mbox

drm/i915: initialize gen6 rps work queue for Ironlake+

Message ID 20110518092107.36dfeecd@jbarnes-desktop
State New, archived
Headers show

Commit Message

Jesse Barnes May 18, 2011, 4:21 p.m. UTC
Looks like I didn't merge Ben's RPS work queue stuff correctly with the
new IRQ split code (diff was sparse enough that git didn't complain).
This should prevent null derefs on ILK+ due to the missing work queue.

Signed-off-by:  Jesse Barnes <jbarnes@virtuousgeek.org>

Comments

Ian Romanick May 18, 2011, 4:37 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/18/2011 06:21 PM, Jesse Barnes wrote:
> Looks like I didn't merge Ben's RPS work queue stuff correctly with the
> new IRQ split code (diff was sparse enough that git didn't complain).
> This should prevent null derefs on ILK+ due to the missing work queue.

Is this actually needed on Ironlake (i.e., gen5)?

> Signed-off-by:  Jesse Barnes <jbarnes@virtuousgeek.org>
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 349a03e..9112bf5 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1736,6 +1736,7 @@ void ironlake_irq_preinstall(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);
>  
>  	I915_WRITE(HWSTAM, 0xeffe);
>  
> @@ -1887,7 +1888,6 @@ void i915_driver_irq_preinstall(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);
>  
>  	if (I915_HAS_HOTPLUG(dev)) {
>  		I915_WRITE(PORT_HOTPLUG_EN, 0);

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3T9dwACgkQX1gOwKyEAw/wRACeLPeHTmjvu0ObCV3iJsZMXNud
gwUAn3vuXo6J59viQrw5aMn6r8of68pL
=zjHv
-----END PGP SIGNATURE-----
Jesse Barnes May 18, 2011, 5:22 p.m. UTC | #2
On Wed, 18 May 2011 18:37:48 +0200
Ian Romanick <idr@freedesktop.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 05/18/2011 06:21 PM, Jesse Barnes wrote:
> > Looks like I didn't merge Ben's RPS work queue stuff correctly with the
> > new IRQ split code (diff was sparse enough that git didn't complain).
> > This should prevent null derefs on ILK+ due to the missing work queue.
> 
> Is this actually needed on Ironlake (i.e., gen5)?
> 
> > Signed-off-by:  Jesse Barnes <jbarnes@virtuousgeek.org>

The work queue is only used on gen6, but gen6 and ilk share an irq
handler.  I could make the work queue init conditional on gen6 though,
if that's what you're thinking.
Keith Packard May 18, 2011, 8:42 p.m. UTC | #3
On Wed, 18 May 2011 10:22:27 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

> The work queue is only used on gen6, but gen6 and ilk share an irq
> handler.  I could make the work queue init conditional on gen6 though,
> if that's what you're thinking.

Probably a good idea, mostly as documentation for which chips it is used
on?
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 349a03e..9112bf5 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1736,6 +1736,7 @@  void ironlake_irq_preinstall(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);
 
 	I915_WRITE(HWSTAM, 0xeffe);
 
@@ -1887,7 +1888,6 @@  void i915_driver_irq_preinstall(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);
 
 	if (I915_HAS_HOTPLUG(dev)) {
 		I915_WRITE(PORT_HOTPLUG_EN, 0);