All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+
@ 2011-05-18 16:21 Jesse Barnes
  2011-05-18 16:37 ` Ian Romanick
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Barnes @ 2011-05-18 16:21 UTC (permalink / raw)
  To: intel-gfx

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>

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);

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

* Re: [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+
  2011-05-18 16:21 [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+ Jesse Barnes
@ 2011-05-18 16:37 ` Ian Romanick
  2011-05-18 17:22   ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Romanick @ 2011-05-18 16:37 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

-----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-----

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

* Re: [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+
  2011-05-18 16:37 ` Ian Romanick
@ 2011-05-18 17:22   ` Jesse Barnes
  2011-05-18 20:42     ` Keith Packard
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Barnes @ 2011-05-18 17:22 UTC (permalink / raw)
  To: Ian Romanick; +Cc: intel-gfx

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.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+
  2011-05-18 17:22   ` Jesse Barnes
@ 2011-05-18 20:42     ` Keith Packard
  2011-05-18 20:51       ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Packard @ 2011-05-18 20:42 UTC (permalink / raw)
  To: Jesse Barnes, Ian Romanick; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]

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?

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+
  2011-05-18 20:42     ` Keith Packard
@ 2011-05-18 20:51       ` Jesse Barnes
  0 siblings, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2011-05-18 20:51 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx

On Wed, 18 May 2011 13:42:54 -0700
Keith Packard <keithp@keithp.com> wrote:

> 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?

Here you go.

Jesse

>From e0f3a48a7ef22cc8dc5c3c0a05756f7bce46d68c Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Wed, 18 May 2011 13:49:41 -0700
Subject: [PATCH] drm/i915: initialize gen6 rps work queue on Sandy Bridge and Ivy Bridge

It's not used on Ironlake, but is used on later generations, so make
sure it exists before we try to use it in the interrupt handlers.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_irq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 349a03e..b79619a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1736,6 +1736,8 @@ 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);
+	if (IS_GEN6(dev) || IS_IVYBRIDGE(dev))
+		INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work);
 
 	I915_WRITE(HWSTAM, 0xeffe);
 
@@ -1887,7 +1889,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);
-- 
1.7.4.1

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

end of thread, other threads:[~2011-05-18 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 16:21 [PATCH] drm/i915: initialize gen6 rps work queue for Ironlake+ Jesse Barnes
2011-05-18 16:37 ` Ian Romanick
2011-05-18 17:22   ` Jesse Barnes
2011-05-18 20:42     ` Keith Packard
2011-05-18 20:51       ` Jesse Barnes

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.