Re: [PATCH 7/9] drm/i915/wm: Extract skl_print_plane_ddb_changes()

Jani Nikula
2026-03-19T13:38:37Z

On Thu, 19 Mar 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We have skl_print_plane_wm_changes() but the DDB counterpart is
> just inline in the main loop. Extract it into a function. We'll
> ave a second use for this soon.

*have

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> The "ddb" part is already parametrized in anticipation of the
> second user.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/skl_watermark.c | 22 +++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 6c8dab847ae2..8687026935e9 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -2601,6 +2601,21 @@ static char enast(bool enable)
> return enable ? '*' : ' ';
> }
>
> +static void
> +skl_print_plane_ddb_changes(struct intel_plane *plane,
> + const struct skl_ddb_entry *old,
> + const struct skl_ddb_entry *new,
> + const char *ddb_name)
> +{
> + struct intel_display *display = to_intel_display(plane);
> +
> + drm_dbg_kms(display->drm,
> + "[PLANE:%d:%s] %s (%4d - %4d) -> (%4d - %4d), size %4d -> %4d\n",
> + plane->base.base.id, plane->base.name, ddb_name,
> + old->start, old->end, new->start, new->end,
> + skl_ddb_entry_size(old), skl_ddb_entry_size(new));
> +}
> +
> static noinline_for_stack void
> skl_print_plane_wm_changes(struct intel_plane *plane,
> const struct skl_plane_wm *old_wm,
> @@ -2722,11 +2737,8 @@ skl_print_wm_changes(struct intel_atomic_state *state)
>
> if (skl_ddb_entry_equal(old, new))
> continue;
> - drm_dbg_kms(display->drm,
> - "[PLANE:%d:%s] ddb (%4d - %4d) -> (%4d - %4d), size %4d -> %4d\n",
> - plane->base.base.id, plane->base.name,
> - old->start, old->end, new->start, new->end,
> - skl_ddb_entry_size(old), skl_ddb_entry_size(new));
> +
> + skl_print_plane_ddb_changes(plane, old, new, "ddb");
> }
>
> for_each_intel_plane_on_crtc(display->drm, crtc, plane) {

--
Jani Nikula, Intel