diff -uNrp linux-2.6.37-orig//drivers/gpu/drm/i915/i915_drv.h linux-2.6.37-changes//drivers/gpu/drm/i915/i915_drv.h --- linux-2.6.37-orig//drivers/gpu/drm/i915/i915_drv.h 2011-01-04 19:50:19.000000000 -0500 +++ linux-2.6.37-changes//drivers/gpu/drm/i915/i915_drv.h 2011-01-06 02:36:02.428999999 -0500 @@ -35,6 +35,7 @@ #include "intel_ringbuffer.h" #include #include +#include #include /* General customization: @@ -674,6 +675,7 @@ typedef struct drm_i915_private { int lvds_downclock; struct work_struct idle_work; struct timer_list idle_timer; + struct pm_qos_request_list pm_qos; bool busy; u16 orig_clock; int child_dev_num; diff -uNrp linux-2.6.37-orig//drivers/gpu/drm/i915/i915_irq.c linux-2.6.37-changes//drivers/gpu/drm/i915/i915_irq.c --- linux-2.6.37-orig//drivers/gpu/drm/i915/i915_irq.c 2011-01-04 19:50:19.000000000 -0500 +++ linux-2.6.37-changes//drivers/gpu/drm/i915/i915_irq.c 2011-01-06 02:42:38.713000011 -0500 @@ -1216,10 +1216,20 @@ int i915_enable_vblank(struct drm_device else if (INTEL_INFO(dev)->gen >= 4) i915_enable_pipestat(dev_priv, pipe, PIPE_START_VBLANK_INTERRUPT_ENABLE); - else + else { i915_enable_pipestat(dev_priv, pipe, PIPE_VBLANK_INTERRUPT_ENABLE); + } spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags); + + if (( IS_I945G(dev) || IS_I945GM(dev)) && !dev_priv->pm_qos.pm_qos_class) + /* Install a handle to prevent C-state starvation of the GPU + * 945 platforms have an issue with vsync interrupts not + * reaching cpu during deep c-state sleep (>C1) + */ + pm_qos_add_request(&dev_priv->pm_qos, + PM_QOS_CPU_DMA_LATENCY, + 15); //>=20 won't work return 0; } @@ -1231,6 +1241,9 @@ void i915_disable_vblank(struct drm_devi drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; unsigned long irqflags; + if ((IS_I945G(dev) || IS_I945GM(dev)) && dev_priv->pm_qos.pm_qos_class) + pm_qos_remove_request(&dev_priv->pm_qos); + spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); if (HAS_PCH_SPLIT(dev)) ironlake_disable_display_irq(dev_priv, (pipe == 0) ?