Commit efcad917 authored by Imre Deak's avatar Imre Deak Committed by Daniel Vetter

drm/i915: move power domain macros to intel_pm.c

These macros are used only locally, so move them to the .c file.

No functional change.

v2:
- add init power domain to always-on power wells in the following
  - separate - patch (Paulo)
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 93a25a9e
...@@ -121,8 +121,6 @@ enum intel_display_power_domain { ...@@ -121,8 +121,6 @@ enum intel_display_power_domain {
POWER_DOMAIN_NUM, POWER_DOMAIN_NUM,
}; };
#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)
#define POWER_DOMAIN_PIPE(pipe) ((pipe) + POWER_DOMAIN_PIPE_A) #define POWER_DOMAIN_PIPE(pipe) ((pipe) + POWER_DOMAIN_PIPE_A)
#define POWER_DOMAIN_PIPE_PANEL_FITTER(pipe) \ #define POWER_DOMAIN_PIPE_PANEL_FITTER(pipe) \
((pipe) + POWER_DOMAIN_PIPE_A_PANEL_FITTER) ((pipe) + POWER_DOMAIN_PIPE_A_PANEL_FITTER)
...@@ -130,14 +128,6 @@ enum intel_display_power_domain { ...@@ -130,14 +128,6 @@ enum intel_display_power_domain {
((tran) == TRANSCODER_EDP ? POWER_DOMAIN_TRANSCODER_EDP : \ ((tran) == TRANSCODER_EDP ? POWER_DOMAIN_TRANSCODER_EDP : \
(tran) + POWER_DOMAIN_TRANSCODER_A) (tran) + POWER_DOMAIN_TRANSCODER_A)
#define HSW_ALWAYS_ON_POWER_DOMAINS ( \
BIT(POWER_DOMAIN_PIPE_A) | \
BIT(POWER_DOMAIN_TRANSCODER_EDP))
#define BDW_ALWAYS_ON_POWER_DOMAINS ( \
BIT(POWER_DOMAIN_PIPE_A) | \
BIT(POWER_DOMAIN_TRANSCODER_EDP) | \
BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER))
enum hpd_pin { enum hpd_pin {
HPD_NONE = 0, HPD_NONE = 0,
HPD_PORT_A = HPD_NONE, /* PORT_A is internal */ HPD_PORT_A = HPD_NONE, /* PORT_A is internal */
......
...@@ -5445,6 +5445,22 @@ void i915_release_power_well(void) ...@@ -5445,6 +5445,22 @@ void i915_release_power_well(void)
} }
EXPORT_SYMBOL_GPL(i915_release_power_well); EXPORT_SYMBOL_GPL(i915_release_power_well);
#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)
#define HSW_ALWAYS_ON_POWER_DOMAINS ( \
BIT(POWER_DOMAIN_PIPE_A) | \
BIT(POWER_DOMAIN_TRANSCODER_EDP))
#define HSW_DISPLAY_POWER_DOMAINS ( \
(POWER_DOMAIN_MASK & ~HSW_ALWAYS_ON_POWER_DOMAINS) | \
BIT(POWER_DOMAIN_INIT))
#define BDW_ALWAYS_ON_POWER_DOMAINS ( \
HSW_ALWAYS_ON_POWER_DOMAINS | \
BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER))
#define BDW_DISPLAY_POWER_DOMAINS ( \
(POWER_DOMAIN_MASK & ~BDW_ALWAYS_ON_POWER_DOMAINS) | \
BIT(POWER_DOMAIN_INIT))
static struct i915_power_well i9xx_always_on_power_well[] = { static struct i915_power_well i9xx_always_on_power_well[] = {
{ {
.name = "always-on", .name = "always-on",
...@@ -5461,7 +5477,7 @@ static struct i915_power_well hsw_power_wells[] = { ...@@ -5461,7 +5477,7 @@ static struct i915_power_well hsw_power_wells[] = {
}, },
{ {
.name = "display", .name = "display",
.domains = POWER_DOMAIN_MASK & ~HSW_ALWAYS_ON_POWER_DOMAINS, .domains = HSW_DISPLAY_POWER_DOMAINS,
.is_enabled = hsw_power_well_enabled, .is_enabled = hsw_power_well_enabled,
.set = hsw_set_power_well, .set = hsw_set_power_well,
}, },
...@@ -5475,7 +5491,7 @@ static struct i915_power_well bdw_power_wells[] = { ...@@ -5475,7 +5491,7 @@ static struct i915_power_well bdw_power_wells[] = {
}, },
{ {
.name = "display", .name = "display",
.domains = POWER_DOMAIN_MASK & ~BDW_ALWAYS_ON_POWER_DOMAINS, .domains = BDW_DISPLAY_POWER_DOMAINS,
.is_enabled = hsw_power_well_enabled, .is_enabled = hsw_power_well_enabled,
.set = hsw_set_power_well, .set = hsw_set_power_well,
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment