summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-02-20 18:24:34 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-03-07 19:14:22 -0300
commitd4805fe00ec85bd420e2e3b0fcf9b7fc54de4f13 (patch)
tree612b5dc01c9581adc81fc373220a3041b892502a
parent2c7170fe2dbb0d28aa6c01aa38a716bcbdf542c3 (diff)
drm/i195: add BDW runtime PM supportbdw-runtime-pm-2014-03-07
This sould be enough. v2: BDW should also run hsw_runtime_resume (Ben). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c8
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 55f0181a9657..2dcbbc01b25f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -874,8 +874,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);
@@ -910,8 +912,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;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 1debc412b689..2f7246a15456 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1997,7 +1997,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