mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-06 07:20:17 +01:00
i915: more version checks
This commit is contained in:
parent
02b09d271c
commit
95c02743c9
2 changed files with 10 additions and 0 deletions
|
|
@ -80,7 +80,9 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
|
|||
|
||||
i915_save_state(dev);
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||
intel_opregion_free(dev);
|
||||
#endif
|
||||
|
||||
if (state.event == PM_EVENT_SUSPEND) {
|
||||
/* Shut down the device */
|
||||
|
|
@ -101,7 +103,9 @@ static int i915_resume(struct drm_device *dev)
|
|||
|
||||
i915_restore_state(dev);
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||
intel_opregion_init(dev);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -443,15 +443,19 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
|
|||
}
|
||||
|
||||
#ifdef __linux__
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||
if (pipeb_stats & I915_LEGACY_BLC_EVENT_ENABLE)
|
||||
opregion_asle_intr(dev);
|
||||
#endif
|
||||
#endif
|
||||
I915_WRITE(PIPEBSTAT, pipeb_stats);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||
if (iir & I915_ASLE_INTERRUPT)
|
||||
opregion_asle_intr(dev);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (dev_priv->sarea_priv)
|
||||
|
|
@ -675,7 +679,9 @@ void i915_enable_interrupt (struct drm_device *dev)
|
|||
dev_priv->irq_enable_reg |= I915_USER_INTERRUPT;
|
||||
|
||||
#ifdef __linux__
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||
opregion_enable_asle(dev);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
I915_WRITE(IER, dev_priv->irq_enable_reg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue