aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-12-06 17:32:13 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-10 16:43:14 -0500
commit8a1874559f222efcae0c0c41b180f6e1af6b9d2e (patch)
tree8341b7653d73b4671a88b4d889dc2c255378ed7c /drivers/gpu/drm/i915/i915_drv.h
parentd62292c8f778772d1b6ec125d461c8c16fdc0417 (diff)
drm/i915: add initial Runtime PM functions
This patch adds the initial infrastructure to allow a Runtime PM implementation that sets the device to its D3 state. The patch just adds the necessary callbacks and the initial infrastructure. We still don't have any platform that actually uses this infrastructure, we still don't call get/put in all the places we need to, and we don't have any function to save/restore the state of the registers. This is not a problem since no platform uses the code added by this patch. We have a few people simultaneously working on runtime PM, so this initial code could help everybody make their plans. V2: - Move some functions to intel_pm.c - Remove useless pm_runtime_allow() call at init - Remove useless pm_runtime_mark_last_busy() call at get - Use pm_runtime_get_sync() instead of 2 calls - Add a WARN to check if we're really awake V3: - Rebase. V4: - Don't need to call pci_{save,restore}_state and pci_set_power_sate, since they're already called by the PCI layer - Remove wrong pm_runtime_enable() call at init_runtime_pm Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 780f815b6c9f..98fd1c043777 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1289,6 +1289,10 @@ struct i915_package_c8 {
1289 } regsave; 1289 } regsave;
1290}; 1290};
1291 1291
1292struct i915_runtime_pm {
1293 bool suspended;
1294};
1295
1292enum intel_pipe_crc_source { 1296enum intel_pipe_crc_source {
1293 INTEL_PIPE_CRC_SOURCE_NONE, 1297 INTEL_PIPE_CRC_SOURCE_NONE,
1294 INTEL_PIPE_CRC_SOURCE_PLANE1, 1298 INTEL_PIPE_CRC_SOURCE_PLANE1,
@@ -1519,6 +1523,8 @@ typedef struct drm_i915_private {
1519 1523
1520 struct i915_package_c8 pc8; 1524 struct i915_package_c8 pc8;
1521 1525
1526 struct i915_runtime_pm pm;
1527
1522 /* Old dri1 support infrastructure, beware the dragons ya fools entering 1528 /* Old dri1 support infrastructure, beware the dragons ya fools entering
1523 * here! */ 1529 * here! */
1524 struct i915_dri1_state dri1; 1530 struct i915_dri1_state dri1;
@@ -1843,6 +1849,7 @@ struct drm_i915_file_private {
1843#define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg) 1849#define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg)
1844#define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev)) 1850#define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev))
1845#define HAS_PC8(dev) (IS_HASWELL(dev)) /* XXX HSW:ULX */ 1851#define HAS_PC8(dev) (IS_HASWELL(dev)) /* XXX HSW:ULX */
1852#define HAS_RUNTIME_PM(dev) false
1846 1853
1847#define INTEL_PCH_DEVICE_ID_MASK 0xff00 1854#define INTEL_PCH_DEVICE_ID_MASK 0xff00
1848#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00 1855#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00