[Intel-gfx] [PATCH 05/24] drm/i915: reuse Ivybridge interrupts code for Haswell

Jesse Barnes jbarnes at virtuousgeek.org
Tue May 1 01:55:13 CEST 2012


On Thu, 26 Apr 2012 15:21:00 -0300
Eugeni Dodonov <eugeni.dodonov at intel.com> wrote:

> v2: prevent possible conflicts with VLV.
> 
> v3: simplify IRQ handling for Gen5+ onwards.
> 
> v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_irq.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 0211263..bc8b80c 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2006,7 +2006,7 @@ static 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))
> +	if (IS_GEN6(dev) || IS_IVYBRIDGE(dev) || IS_HASWELL(dev))
>  		INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work);
>  
>  	I915_WRITE(HWSTAM, 0xeffe);
> @@ -2627,8 +2627,7 @@ void intel_irq_init(struct drm_device *dev)
>  {
>  	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) ||
> -	    IS_VALLEYVIEW(dev)) {
> +	if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5) {
>  		dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
>  		dev->driver->get_vblank_counter = gm45_get_vblank_counter;
>  	}
> @@ -2646,7 +2645,7 @@ void intel_irq_init(struct drm_device *dev)
>  		dev->driver->irq_uninstall = valleyview_irq_uninstall;
>  		dev->driver->enable_vblank = valleyview_enable_vblank;
>  		dev->driver->disable_vblank = valleyview_disable_vblank;
> -	} else if (IS_IVYBRIDGE(dev)) {
> +	} else if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) {
>  		/* Share pre & uninstall handlers with ILK/SNB */
>  		dev->driver->irq_handler = ivybridge_irq_handler;
>  		dev->driver->irq_preinstall = ironlake_irq_preinstall;

Needs to be rebased on top of Chris's recent cleanups.  Should make
things a little nicer.

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list