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

drm/i915: Add debugs for mbus joining and dbuf ratio programming

Add some debugs so that we can actually observe what is
actually happening during the mbus/dbuf programming steps.
We can just shove them into fairly low level functions as
none of them are called during any critical sections/etc.
Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240402155016.13733-10-ville.syrjala@linux.intel.com
parent a2e83f27
...@@ -3647,6 +3647,9 @@ void intel_dbuf_mdclk_cdclk_ratio_update(struct drm_i915_private *i915, u8 ratio ...@@ -3647,6 +3647,9 @@ void intel_dbuf_mdclk_cdclk_ratio_update(struct drm_i915_private *i915, u8 ratio
if (joined_mbus) if (joined_mbus)
ratio *= 2; ratio *= 2;
drm_dbg_kms(&i915->drm, "Updating dbuf ratio to %d (mbus joined: %s)\n",
ratio, str_yes_no(joined_mbus));
for_each_dbuf_slice(i915, slice) for_each_dbuf_slice(i915, slice)
intel_de_rmw(i915, DBUF_CTL_S(slice), intel_de_rmw(i915, DBUF_CTL_S(slice),
DBUF_MIN_TRACKER_STATE_SERVICE_MASK, DBUF_MIN_TRACKER_STATE_SERVICE_MASK,
...@@ -3680,10 +3683,16 @@ static void intel_dbuf_mdclk_min_tracker_update(struct intel_atomic_state *state ...@@ -3680,10 +3683,16 @@ static void intel_dbuf_mdclk_min_tracker_update(struct intel_atomic_state *state
static void intel_dbuf_mbus_join_update(struct intel_atomic_state *state) static void intel_dbuf_mbus_join_update(struct intel_atomic_state *state)
{ {
struct drm_i915_private *i915 = to_i915(state->base.dev); struct drm_i915_private *i915 = to_i915(state->base.dev);
const struct intel_dbuf_state *old_dbuf_state =
intel_atomic_get_old_dbuf_state(state);
const struct intel_dbuf_state *new_dbuf_state = const struct intel_dbuf_state *new_dbuf_state =
intel_atomic_get_new_dbuf_state(state); intel_atomic_get_new_dbuf_state(state);
u32 mbus_ctl; u32 mbus_ctl;
drm_dbg_kms(&i915->drm, "Changing mbus joined: %s -> %s\n",
str_yes_no(old_dbuf_state->joined_mbus),
str_yes_no(new_dbuf_state->joined_mbus));
/* /*
* TODO: Implement vblank synchronized MBUS joining changes. * TODO: Implement vblank synchronized MBUS joining changes.
* Must be properly coordinated with dbuf reprogramming. * Must be properly coordinated with dbuf reprogramming.
......
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