goto out_gem_unload;
}
- if (HAS_POWER_WELL(dev))
- intel_power_domains_init(dev);
+ intel_power_domains_init(dev);
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
ret = i915_load_modeset_init(dev);
return 0;
out_power_well:
- if (HAS_POWER_WELL(dev))
- intel_power_domains_remove(dev);
+ intel_power_domains_remove(dev);
drm_vblank_cleanup(dev);
out_gem_unload:
if (dev_priv->mm.inactive_shrinker.scan_objects)
intel_gpu_ips_teardown();
- if (HAS_POWER_WELL(dev)) {
- /* The i915.ko module is still not prepared to be loaded when
- * the power well is not enabled, so just enable it in case
- * we're going to unload/reload. */
- intel_display_set_init_power(dev, true);
- intel_power_domains_remove(dev);
- }
+ /* The i915.ko module is still not prepared to be loaded when
+ * the power well is not enabled, so just enable it in case
+ * we're going to unload/reload. */
+ intel_display_set_init_power(dev, true);
+ intel_power_domains_remove(dev);
i915_teardown_sysfs(dev);
bool is_enabled;
int i;
- if (!HAS_POWER_WELL(dev))
- return true;
-
power_domains = &dev_priv->power_domains;
is_enabled = true;
struct i915_power_well *power_well;
int i;
- if (!HAS_POWER_WELL(dev))
- return;
-
power_domains = &dev_priv->power_domains;
mutex_lock(&power_domains->lock);
struct i915_power_well *power_well;
int i;
- if (!HAS_POWER_WELL(dev))
- return;
-
power_domains = &dev_priv->power_domains;
mutex_lock(&power_domains->lock);
}
EXPORT_SYMBOL_GPL(i915_release_power_well);
+static struct i915_power_well i9xx_always_on_power_well[] = {
+ {
+ .name = "always-on",
+ .always_on = 1,
+ .domains = POWER_DOMAIN_MASK,
+ },
+};
+
static struct i915_power_well hsw_power_wells[] = {
{
.name = "always-on",
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_power_domains *power_domains = &dev_priv->power_domains;
- if (!HAS_POWER_WELL(dev))
- return 0;
-
mutex_init(&power_domains->lock);
/*
set_power_wells(power_domains, bdw_power_wells);
hsw_pwr = power_domains;
} else {
- WARN_ON(1);
+ set_power_wells(power_domains, i9xx_always_on_power_well);
}
return 0;
struct i915_power_well *power_well;
int i;
- if (!HAS_POWER_WELL(dev))
- return;
-
mutex_lock(&power_domains->lock);
for_each_power_well(i, power_well, POWER_DOMAIN_MASK, power_domains) {
if (power_well->set)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- if (!HAS_POWER_WELL(dev))
- return;
-
/* For now, we need the power well to be always enabled. */
intel_display_set_init_power(dev, true);
intel_power_domains_resume(dev);