]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: add BDW runtime PM support
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 7 Mar 2014 23:12:37 +0000 (20:12 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 1 Apr 2014 21:32:14 +0000 (23:32 +0200)
This sould be enough.

v2: BDW should also run hsw_runtime_resume (Ben).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h

index 4b6c99dfe6781b8e29e72c3eaf26eccbb9baff33..a01faea0401c02061f2b9d6adf01ded45de32db5 100644 (file)
@@ -875,8 +875,10 @@ static int intel_runtime_suspend(struct device *device)
 
        if (IS_GEN6(dev))
                snb_runtime_suspend(dev_priv);
-       else if (IS_HASWELL(dev))
+       else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
                hsw_runtime_suspend(dev_priv);
+       else
+               WARN_ON(1);
 
        i915_gem_release_all_mmaps(dev_priv);
 
@@ -911,8 +913,10 @@ static int intel_runtime_resume(struct device *device)
 
        if (IS_GEN6(dev))
                snb_runtime_resume(dev_priv);
-       else if (IS_HASWELL(dev))
+       else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
                hsw_runtime_resume(dev_priv);
+       else
+               WARN_ON(1);
 
        DRM_DEBUG_KMS("Device resumed\n");
        return 0;
index 9be0cd8c998e10bb7c03467a0b20317631466f85..508bc86b08a1b10c8235ffb1b6aaa4230a859e03 100644 (file)
@@ -1865,7 +1865,8 @@ struct drm_i915_cmd_table {
 #define HAS_DDI(dev)           (INTEL_INFO(dev)->has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev)    (INTEL_INFO(dev)->has_fpga_dbg)
 #define HAS_PSR(dev)           (IS_HASWELL(dev) || IS_BROADWELL(dev))
-#define HAS_RUNTIME_PM(dev)    (IS_GEN6(dev) || IS_HASWELL(dev))
+#define HAS_RUNTIME_PM(dev)    (IS_GEN6(dev) || IS_HASWELL(dev) || \
+                                IS_BROADWELL(dev))
 
 #define INTEL_PCH_DEVICE_ID_MASK               0xff00
 #define INTEL_PCH_IBX_DEVICE_ID_TYPE           0x3b00