From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 11/13] drm/i915/wm: Use per-device debugs ilk wm code
Date: Thu, 8 Feb 2024 17:17:18 +0200 [thread overview]
Message-ID: <20240208151720.7866-12-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240208151720.7866-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Switch to drm_dbg_kms() in the ilk wm code so we see which
device generated the debugs. Need to plumb i915 a bit deeper
to make that happen.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/i9xx_wm.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/i9xx_wm.c b/drivers/gpu/drm/i915/display/i9xx_wm.c
index 46877fd260d5..628e7192ebc9 100644
--- a/drivers/gpu/drm/i915/display/i9xx_wm.c
+++ b/drivers/gpu/drm/i915/display/i9xx_wm.c
@@ -2533,7 +2533,8 @@ static void ilk_compute_wm_reg_maximums(const struct drm_i915_private *dev_priv,
max->fbc = ilk_fbc_wm_reg_max(dev_priv);
}
-static bool ilk_validate_wm_level(int level,
+static bool ilk_validate_wm_level(struct drm_i915_private *i915,
+ int level,
const struct ilk_wm_maximums *max,
struct intel_wm_level *result)
{
@@ -2556,14 +2557,17 @@ static bool ilk_validate_wm_level(int level,
*/
if (level == 0 && !result->enable) {
if (result->pri_val > max->pri)
- DRM_DEBUG_KMS("Primary WM%d too large %u (max %u)\n",
- level, result->pri_val, max->pri);
+ drm_dbg_kms(&i915->drm,
+ "Primary WM%d too large %u (max %u)\n",
+ level, result->pri_val, max->pri);
if (result->spr_val > max->spr)
- DRM_DEBUG_KMS("Sprite WM%d too large %u (max %u)\n",
- level, result->spr_val, max->spr);
+ drm_dbg_kms(&i915->drm,
+ "Sprite WM%d too large %u (max %u)\n",
+ level, result->spr_val, max->spr);
if (result->cur_val > max->cur)
- DRM_DEBUG_KMS("Cursor WM%d too large %u (max %u)\n",
- level, result->cur_val, max->cur);
+ drm_dbg_kms(&i915->drm,
+ "Cursor WM%d too large %u (max %u)\n",
+ level, result->cur_val, max->cur);
result->pri_val = min_t(u32, result->pri_val, max->pri);
result->spr_val = min_t(u32, result->spr_val, max->spr);
@@ -2763,7 +2767,7 @@ static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv)
}
}
-static bool ilk_validate_pipe_wm(const struct drm_i915_private *dev_priv,
+static bool ilk_validate_pipe_wm(struct drm_i915_private *dev_priv,
struct intel_pipe_wm *pipe_wm)
{
/* LP0 watermark maximums depend on this pipe alone */
@@ -2778,7 +2782,7 @@ static bool ilk_validate_pipe_wm(const struct drm_i915_private *dev_priv,
ilk_compute_wm_maximums(dev_priv, 0, &config, INTEL_DDB_PART_1_2, &max);
/* At least LP0 must be valid */
- if (!ilk_validate_wm_level(0, &max, &pipe_wm->wm[0])) {
+ if (!ilk_validate_wm_level(dev_priv, 0, &max, &pipe_wm->wm[0])) {
drm_dbg_kms(&dev_priv->drm, "LP0 watermark invalid\n");
return false;
}
@@ -2847,7 +2851,7 @@ static int ilk_compute_pipe_wm(struct intel_atomic_state *state,
* register maximums since such watermarks are
* always invalid.
*/
- if (!ilk_validate_wm_level(level, &max, wm)) {
+ if (!ilk_validate_wm_level(dev_priv, level, &max, wm)) {
memset(wm, 0, sizeof(*wm));
break;
}
@@ -2978,7 +2982,7 @@ static void ilk_wm_merge(struct drm_i915_private *dev_priv,
if (level > last_enabled_level)
wm->enable = false;
- else if (!ilk_validate_wm_level(level, max, wm))
+ else if (!ilk_validate_wm_level(dev_priv, level, max, wm))
/* make sure all following levels get disabled */
last_enabled_level = level - 1;
--
2.43.0
next prev parent reply other threads:[~2024-02-08 15:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 15:17 [PATCH 00/13] drm/i915: drm_dbg_kms() conversions and cleanups Ville Syrjala
2024-02-08 15:17 ` [PATCH 01/13] drm/i915: Correct for_each_old_global_obj_in_state() arguments Ville Syrjala
2024-02-08 15:17 ` [PATCH 02/13] drm/i915/sdvo: Convert to per-device debugs Ville Syrjala
2024-02-08 15:17 ` [PATCH 03/13] drm/i915/sdvo: Fix up code alignment Ville Syrjala
2024-02-08 15:17 ` [PATCH 04/13] drm/i915/color: Use per-device debugs Ville Syrjala
2024-02-08 15:17 ` [PATCH 05/13] drm/i915/fb: " Ville Syrjala
2024-02-08 15:17 ` [PATCH 06/13] drm/i915/bios: Switch to kms debugs Ville Syrjala
2024-02-08 15:17 ` [PATCH 07/13] drm/i915/bios: Use per-device debugs for VBT related stuff Ville Syrjala
2024-02-08 15:17 ` [PATCH 08/13] drm/i915/hdcp: Use per-device debugs Ville Syrjala
2024-02-08 15:17 ` [PATCH 09/13] drm/i915/wm: Pass the whole i916 to intel_get_cxsr_latency() Ville Syrjala
2024-02-08 15:17 ` [PATCH 10/13] drm/i915/wm: Use per-device debugs in pre-ilk wm code Ville Syrjala
2024-02-08 15:17 ` Ville Syrjala [this message]
2024-02-08 15:17 ` [PATCH 12/13] drm/i915/dvo/ns2501: Nuke pointless casts Ville Syrjala
2024-02-08 15:17 ` [PATCH 13/13] drm/i915/dvo: Use sizeof(*variable) instead of sizeof(type) Ville Syrjala
2024-02-08 15:52 ` [PATCH 00/13] drm/i915: drm_dbg_kms() conversions and cleanups Jani Nikula
2024-02-09 12:54 ` Ville Syrjälä
2024-02-08 21:43 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-02-08 21:43 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-08 22:02 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-09 3:35 ` ✗ 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=20240208151720.7866-12-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.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