lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  7 Jul 2014 16:58:15 -0700
From:	Greg Kroah-Hartman <>
Cc:	Greg Kroah-Hartman <>,, Chris Wilson <>,
	Imre Deak <>,
	Damien Lespiau <>,
	Daniel Vetter <>,
	Jani Nikula <>
Subject: [PATCH 3.14 85/94] drm/i915: fix display power sw state reporting

3.14-stable review patch.  If anyone has any objections, please let me know.


From: Imre Deak <>

commit b8c000d9bf23e7c1155ef421f595d1cbc25262da upstream.

Atm, we refcount both power domains and power wells and
intel_display_power_enabled_sw() returns the power domain refcount. What
the callers are really interested in though is the sw state of the
underlying power wells. Due to this we will report incorrectly that a
given power domain is off if its power wells were enabled via another
power domain, for example POWER_DOMAIN_INIT which enables all power

As a fix return instead the state based on the refcount of all power
wells included in the passed in power domain.

Reported-by: Chris Wilson <>
Signed-off-by: Imre Deak <>
Reviewed-by: Damien Lespiau <>
Signed-off-by: Daniel Vetter <>
Acked-by: Jani Nikula <>
Signed-off-by: Greg Kroah-Hartman <>

 drivers/gpu/drm/i915/intel_pm.c |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5138,10 +5138,25 @@ bool intel_display_power_enabled_sw(stru
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_power_domains *power_domains;
+	struct i915_power_well *power_well;
+	bool is_enabled;
+	int i;
+	if (dev_priv->pm.suspended)
+		return false;
 	power_domains = &dev_priv->power_domains;
+	is_enabled = true;
+	for_each_power_well_rev(i, power_well, BIT(domain), power_domains) {
+		if (power_well->always_on)
+			continue;
-	return power_domains->domain_use_count[domain];
+		if (!power_well->count) {
+			is_enabled = false;
+			break;
+		}
+	}
+	return is_enabled;
 bool intel_display_power_enabled(struct drm_device *dev,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists