Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@kernel.org>
Subject: [Intel-gfx] [PATCH 5/5] drm/i915: Include RPS threshold in error state
Date: Thu, 25 May 2023 09:11:33 +0100	[thread overview]
Message-ID: <20230525081133.215292-6-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20230525081133.215292-1-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Now that we allow them to be modified, lets include them in the error
state so it is visible when they have been modified in GPU hang triage.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 5 +++++
 drivers/gpu/drm/i915/i915_gpu_error.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index ec368e700235..f9733c159b9b 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -740,6 +740,8 @@ static void err_print_gt_global_nonguc(struct drm_i915_error_state_buf *m,
 	err_printf(m, "GT awake: %s\n", str_yes_no(gt->awake));
 	err_printf(m, "CS timestamp frequency: %u Hz, %d ns\n",
 		   gt->clock_frequency, gt->clock_period_ns);
+	err_printf(m, "RPS thresholds up/down: %u/%u %%\n",
+		   gt->rps.up_threshold, gt->rps.down_threshold);
 	err_printf(m, "EIR: 0x%08x\n", gt->eir);
 	err_printf(m, "PGTBL_ER: 0x%08x\n", gt->pgtbl_er);
 
@@ -2025,6 +2027,9 @@ intel_gt_coredump_alloc(struct intel_gt *gt, gfp_t gfp, u32 dump_flags)
 	gc->_gt = gt;
 	gc->awake = intel_gt_pm_is_awake(gt);
 
+	gc->rps.up_threshold = gt->rps.power.up_threshold;
+	gc->rps.down_threshold = gt->rps.power.down_threshold;
+
 	gt_record_display_regs(gc);
 	gt_record_global_nonguc_regs(gc);
 
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.h b/drivers/gpu/drm/i915/i915_gpu_error.h
index a78c061ce26f..6d2996ad2abb 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.h
+++ b/drivers/gpu/drm/i915/i915_gpu_error.h
@@ -140,6 +140,11 @@ struct intel_gt_coredump {
 	bool awake;
 	bool simulated;
 
+	struct {
+		u8 up_threshold;
+		u8 down_threshold;
+	} rps;
+
 	struct intel_gt_info info;
 
 	/* Generic register state */
-- 
2.39.2


  parent reply	other threads:[~2023-05-25  8:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  8:11 [Intel-gfx] [PATCH v3 0/5] Expose RPS thresholds in sysfs Tvrtko Ursulin
2023-05-25  8:11 ` [Intel-gfx] [PATCH 1/5] drm/i915: Move setting of rps thresholds to init Tvrtko Ursulin
2023-05-25  8:11 ` [Intel-gfx] [PATCH 2/5] drm/i915: Record default rps threshold values Tvrtko Ursulin
2023-05-25  8:11 ` [Intel-gfx] [PATCH 3/5] drm/i915: Add helpers for managing rps thresholds Tvrtko Ursulin
2023-05-25  8:11 ` [Intel-gfx] [PATCH 4/5] drm/i915: Expose RPS thresholds in sysfs Tvrtko Ursulin
2023-05-25  8:11 ` Tvrtko Ursulin [this message]
2023-05-25  8:56 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Expose RPS thresholds in sysfs (rev3) Patchwork
2023-05-25  8:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-25 18:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-26  1:39 ` [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=20230525081133.215292-6-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rodrigo.vivi@kernel.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