Commit d283ee56 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Include the PLL name in the debug messages

Make the log easier to parse by including the name of the PLL
in the debug prints regarding said PLL.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240123093137.9133-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ba407525
...@@ -4475,25 +4475,25 @@ verify_single_dpll_state(struct drm_i915_private *i915, ...@@ -4475,25 +4475,25 @@ verify_single_dpll_state(struct drm_i915_private *i915,
u8 pipe_mask; u8 pipe_mask;
bool active; bool active;
drm_dbg_kms(&i915->drm, "%s\n", pll->info->name);
active = intel_dpll_get_hw_state(i915, pll, &dpll_hw_state); active = intel_dpll_get_hw_state(i915, pll, &dpll_hw_state);
if (!(pll->info->flags & INTEL_DPLL_ALWAYS_ON)) { if (!(pll->info->flags & INTEL_DPLL_ALWAYS_ON)) {
I915_STATE_WARN(i915, !pll->on && pll->active_mask, I915_STATE_WARN(i915, !pll->on && pll->active_mask,
"pll in active use but not on in sw tracking\n"); "%s: pll in active use but not on in sw tracking\n",
pll->info->name);
I915_STATE_WARN(i915, pll->on && !pll->active_mask, I915_STATE_WARN(i915, pll->on && !pll->active_mask,
"pll is on but not used by any active pipe\n"); "%s: pll is on but not used by any active pipe\n",
pll->info->name);
I915_STATE_WARN(i915, pll->on != active, I915_STATE_WARN(i915, pll->on != active,
"pll on state mismatch (expected %i, found %i)\n", "%s: pll on state mismatch (expected %i, found %i)\n",
pll->on, active); pll->info->name, pll->on, active);
} }
if (!crtc) { if (!crtc) {
I915_STATE_WARN(i915, I915_STATE_WARN(i915,
pll->active_mask & ~pll->state.pipe_mask, pll->active_mask & ~pll->state.pipe_mask,
"more active pll users than references: 0x%x vs 0x%x\n", "%s: more active pll users than references: 0x%x vs 0x%x\n",
pll->active_mask, pll->state.pipe_mask); pll->info->name, pll->active_mask, pll->state.pipe_mask);
return; return;
} }
...@@ -4502,21 +4502,22 @@ verify_single_dpll_state(struct drm_i915_private *i915, ...@@ -4502,21 +4502,22 @@ verify_single_dpll_state(struct drm_i915_private *i915,
if (new_crtc_state->hw.active) if (new_crtc_state->hw.active)
I915_STATE_WARN(i915, !(pll->active_mask & pipe_mask), I915_STATE_WARN(i915, !(pll->active_mask & pipe_mask),
"pll active mismatch (expected pipe %c in active mask 0x%x)\n", "%s: pll active mismatch (expected pipe %c in active mask 0x%x)\n",
pipe_name(crtc->pipe), pll->active_mask); pll->info->name, pipe_name(crtc->pipe), pll->active_mask);
else else
I915_STATE_WARN(i915, pll->active_mask & pipe_mask, I915_STATE_WARN(i915, pll->active_mask & pipe_mask,
"pll active mismatch (didn't expect pipe %c in active mask 0x%x)\n", "%s: pll active mismatch (didn't expect pipe %c in active mask 0x%x)\n",
pipe_name(crtc->pipe), pll->active_mask); pll->info->name, pipe_name(crtc->pipe), pll->active_mask);
I915_STATE_WARN(i915, !(pll->state.pipe_mask & pipe_mask), I915_STATE_WARN(i915, !(pll->state.pipe_mask & pipe_mask),
"pll enabled crtcs mismatch (expected 0x%x in 0x%x)\n", "%s: pll enabled crtcs mismatch (expected 0x%x in 0x%x)\n",
pipe_mask, pll->state.pipe_mask); pll->info->name, pipe_mask, pll->state.pipe_mask);
I915_STATE_WARN(i915, I915_STATE_WARN(i915,
pll->on && memcmp(&pll->state.hw_state, &dpll_hw_state, pll->on && memcmp(&pll->state.hw_state, &dpll_hw_state,
sizeof(dpll_hw_state)), sizeof(dpll_hw_state)),
"pll hw state mismatch\n"); "%s: pll hw state mismatch\n",
pll->info->name);
} }
void intel_shared_dpll_state_verify(struct intel_atomic_state *state, void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
...@@ -4538,11 +4539,11 @@ void intel_shared_dpll_state_verify(struct intel_atomic_state *state, ...@@ -4538,11 +4539,11 @@ void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
struct intel_shared_dpll *pll = old_crtc_state->shared_dpll; struct intel_shared_dpll *pll = old_crtc_state->shared_dpll;
I915_STATE_WARN(i915, pll->active_mask & pipe_mask, I915_STATE_WARN(i915, pll->active_mask & pipe_mask,
"pll active mismatch (didn't expect pipe %c in active mask (0x%x))\n", "%s: pll active mismatch (didn't expect pipe %c in active mask (0x%x))\n",
pipe_name(crtc->pipe), pll->active_mask); pll->info->name, pipe_name(crtc->pipe), pll->active_mask);
I915_STATE_WARN(i915, pll->state.pipe_mask & pipe_mask, I915_STATE_WARN(i915, pll->state.pipe_mask & pipe_mask,
"pll enabled crtcs mismatch (found pipe %c in enabled mask (0x%x))\n", "%s: pll enabled crtcs mismatch (found pipe %c in enabled mask (0x%x))\n",
pipe_name(crtc->pipe), pll->state.pipe_mask); pll->info->name, pipe_name(crtc->pipe), pll->state.pipe_mask);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment