Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH] drm/i915: dump power domain info on mismatches for all devices
Date: Wed, 21 Oct 2020 18:22:10 +0300	[thread overview]
Message-ID: <20201021152210.2824-1-jani.nikula@intel.com> (raw)

It's an unlikely scenario to have refcount mismatch issues in multiple
devices at once, but a) don't let problems with one device mask the
problems with another, and b) remove the bad example of static data
usage when the data should be per-device.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 10 +++-------
 drivers/gpu/drm/i915/display/intel_display_power.h |  2 ++
 2 files changed, 5 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 689922480661..e17771ef4da5 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -5836,13 +5836,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->domain_info_dumped) {
+		intel_power_domains_dump_info(i915);
+		power_domains->domain_info_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 4aa0a09cf14f..d87980d6b92e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.h
+++ b/drivers/gpu/drm/i915/display/intel_display_power.h
@@ -222,6 +222,8 @@ struct i915_power_domains {
 	u64 async_put_domains[2];
 
 	struct i915_power_well *power_wells;
+
+	bool domain_info_dumped;
 };
 
 #define for_each_power_domain(domain, mask)				\
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2020-10-21 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 15:22 Jani Nikula [this message]
2020-10-21 16:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: dump power domain info on mismatches for all devices Patchwork
2020-10-21 19:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201021152210.2824-1-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox