drm/i915: add initial Runtime PM functions
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_dma.c
index a5d010c86368fe96269cb7e3d07d5b41dee8c99f..b49571df555f4fedf3e9ed17ded763527d8f938e 100644 (file)
@@ -42,6 +42,8 @@
 #include <linux/vga_switcheroo.h>
 #include <linux/slab.h>
 #include <acpi/video.h>
+#include <linux/pm.h>
+#include <linux/pm_runtime.h>
 
 #define LP_RING(d) (&((struct drm_i915_private *)(d))->ring[RCS])
 
@@ -1663,6 +1665,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
        if (IS_GEN5(dev))
                intel_gpu_ips_init(dev_priv);
 
+       intel_init_runtime_pm(dev_priv);
+
        return 0;
 
 out_power_well:
@@ -1708,6 +1712,8 @@ int i915_driver_unload(struct drm_device *dev)
                return ret;
        }
 
+       intel_fini_runtime_pm(dev_priv);
+
        intel_gpu_ips_teardown();
 
        /* The i915.ko module is still not prepared to be loaded when
This page took 0.024113 seconds and 5 git commands to generate.