[Intel-gfx] [PATCH 1/2] drm/i915: move power domains dumped variable to drm_i915_private

Jani Nikula jani.nikula at intel.com
Fri Nov 15 10:18:39 UTC 2019


Get rid of the module specific static variable.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 10 +++-------
 drivers/gpu/drm/i915/display/intel_display_power.h |  1 +
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index ce1b64f4dd44..cbdf27705166 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -5277,13 +5277,9 @@ static void intel_power_domains_verify_state(struct drm_i915_private *i915)
 		}
 	}
 
-	if (dump_domain_info) {
-		static bool dumped;
-
-		if (!dumped) {
-			intel_power_domains_dump_info(i915);
-			dumped = true;
-		}
+	if (dump_domain_info && !power_domains->dumped) {
+		intel_power_domains_dump_info(i915);
+		power_domains->dumped = true;
 	}
 
 	mutex_unlock(&power_domains->lock);
diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
index 1da04f3e0fb3..8af46661a10b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.h
+++ b/drivers/gpu/drm/i915/display/intel_display_power.h
@@ -205,6 +205,7 @@ struct i915_power_domains {
 	 */
 	bool initializing;
 	bool display_core_suspended;
+	bool dumped;
 	int power_well_count;
 
 	intel_wakeref_t wakeref;
-- 
2.20.1



More information about the Intel-gfx mailing list