[Intel-gfx] [PATCH 06/19] drm/i915: remove power_well->always_on flag
Imre Deak
imre.deak at intel.com
Mon Feb 17 23:02:07 CET 2014
An always-on power well can be already recognized by the lack of
is_enabled handler, so just depend on that. Suggested by Daniel.
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 -
drivers/gpu/drm/i915/intel_pm.c | 5 +----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8c8635e..eaa9210 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1039,7 +1039,6 @@ struct i915_power_well_ops {
/* Power well structure for haswell */
struct i915_power_well {
const char *name;
- bool always_on;
/* power well enable/disable usage count */
int count;
unsigned long domains;
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 7866426..faaa4ec 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5200,7 +5200,7 @@ bool intel_display_power_enabled(struct drm_i915_private *dev_priv,
mutex_lock(&power_domains->lock);
for_each_power_well_rev(i, power_well, BIT(domain), power_domains) {
- if (power_well->always_on)
+ if (!power_well->ops->is_enabled)
continue;
if (!power_well->ops->is_enabled(dev_priv, power_well)) {
@@ -5429,7 +5429,6 @@ static const struct i915_power_well_ops i9xx_always_on_power_well_ops = { };
static struct i915_power_well i9xx_always_on_power_well[] = {
{
.name = "always-on",
- .always_on = 1,
.domains = POWER_DOMAIN_MASK,
.ops = &i9xx_always_on_power_well_ops,
},
@@ -5445,7 +5444,6 @@ static const struct i915_power_well_ops hsw_power_well_ops = {
static struct i915_power_well hsw_power_wells[] = {
{
.name = "always-on",
- .always_on = 1,
.domains = HSW_ALWAYS_ON_POWER_DOMAINS,
.ops = &i9xx_always_on_power_well_ops,
},
@@ -5459,7 +5457,6 @@ static struct i915_power_well hsw_power_wells[] = {
static struct i915_power_well bdw_power_wells[] = {
{
.name = "always-on",
- .always_on = 1,
.domains = BDW_ALWAYS_ON_POWER_DOMAINS,
.ops = &i9xx_always_on_power_well_ops,
},
--
1.8.4
More information about the Intel-gfx
mailing list