Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, ville.syrjala@linux.intel.com
Subject: Re: [PATCH v2 09/11] drm/i915/bw: consolidate the debug info of bw/dgv/psf data
Date: Tue, 12 May 2026 14:49:08 +0300	[thread overview]
Message-ID: <ccf20fd4bdfdadfc1b8f7497126362c980232595@intel.com> (raw)
In-Reply-To: <20260511122816.1235478-10-vinod.govindapillai@intel.com>

On Mon, 11 May 2026, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> Consolidate all the detaills about the bw, gqv and psf gv into
> a common function and present it in an organised format
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bw.c | 40 +++++++++++++++++--------
>  1 file changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
> index 858da1710a61..0bda13a3e31b 100644
> --- a/drivers/gpu/drm/i915/display/intel_bw.c
> +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> @@ -483,6 +483,28 @@ static const struct intel_sa_info xe3lpd_3002_sa_info = {
>  	.derating = 10,
>  };
>  
> +static void debug_print_bw_info(struct intel_display *display)
> +{
> +	int num_groups = ARRAY_SIZE(display->bw.max);
> +	int i;
> +
> +	for (i = 0; i < num_groups; i++) {
> +		struct intel_bw_info *bi = &display->bw.max[i];
> +		int j;
> +
> +		drm_dbg_kms(display->drm, "BW%d: num_planes=%d num_qgv_points:%d\n",
> +			    i, bi->num_planes, bi->num_qgv_points);
> +
> +		for (j = 0; j < bi->num_qgv_points; j++)
> +			drm_dbg_kms(display->drm, "\tQGV %d: deratedbw=%u peakbw=%u\n",

Please use a drm_printer, and drm_printf_indent().

> +				    j,  bi->deratedbw[j], bi->peakbw[j]);
> +
> +		for (j = 0; j < bi->num_psf_gv_points; j++)
> +			drm_dbg_kms(display->drm, "\tPSF GV %d bw=%u\n",
> +				    j, bi->psf_bw[j]);
> +	}
> +}
> +
>  static bool is_tile_y_factored(struct intel_display *display)
>  {
>  	/* TGL supports Y-tile for LPDDR4/5, but not for DDR4 */
> @@ -544,12 +566,11 @@ static int icl_get_bw_info(struct intel_display *display,
>  
>  			bi->deratedbw[j] = min(maxdebw,
>  					       bw * (100 - sa->derating) / 100);
> -
> -			drm_dbg_kms(display->drm,
> -				    "BW%d / QGV %d: num_planes=%d deratedbw=%u\n",
> -				    i, j, bi->num_planes, bi->deratedbw[j]);
>  		}
>  	}
> +
> +	debug_print_bw_info(display);
> +
>  	/*
>  	 * In case if SAGV is disabled in BIOS, we always get 1
>  	 * SAGV point, but we can't send PCode commands to restrict it
> @@ -650,24 +671,17 @@ static int tgl_get_bw_info(struct intel_display *display,
>  			bi->peakbw[j] = DIV_ROUND_CLOSEST(sp->dclk *
>  							  num_channels *
>  							  qi.channel_width, 8);
> -
> -			drm_dbg_kms(display->drm,
> -				    "BW%d / QGV %d: num_planes=%d deratedbw=%u peakbw: %u\n",
> -				    i, j, bi->num_planes, bi->deratedbw[j],
> -				    bi->peakbw[j]);
>  		}
>  
>  		for (j = 0; j < qi.num_psf_points; j++) {
>  			const struct intel_psf_gv_point *sp = &qi.psf_points[j];
>  
>  			bi->psf_bw[j] = adl_calc_psf_bw(sp->clk);
> -
> -			drm_dbg_kms(display->drm,
> -				    "BW%d / PSF GV %d: num_planes=%d bw=%u\n",
> -				    i, j, bi->num_planes, bi->psf_bw[j]);
>  		}
>  	}
>  
> +	debug_print_bw_info(display);
> +
>  	/*
>  	 * In case if SAGV is disabled in BIOS, we always get 1
>  	 * SAGV point, but we can't send PCode commands to restrict it

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-05-12 11:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 12:28 [PATCH v2 00/11] drm/i915/display: reduce the pm demand peak bw based on display data rate Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 01/11] drm/i915/wm: clear the plane ddb_y entries on plane disable Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 02/11] drm/i915/pm_demand: introduce HAS_PMDEMAND macro Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 03/11] drm/i915/display: sagv pre/post plane calls to check pmdemand support Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 04/11] drm/i915/bw: Extract icl_init_qgv_info() Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 05/11] drm/i915/bw: sort the qgv points based on the dclk Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 06/11] drm/i915/bw: update the routine to get max dclk from qgv points Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 07/11] drm/i915/bw: update the routine to find the peakbw in MTL Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 08/11] drm/i915/bw: update the tile-y dependency based on the display version Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 09/11] drm/i915/bw: consolidate the debug info of bw/dgv/psf data Vinod Govindapillai
2026-05-12 11:49   ` Jani Nikula [this message]
2026-05-11 12:28 ` [PATCH v2 10/11] drm/i915/bw: extract update_sagv_status() Vinod Govindapillai
2026-05-11 12:28 ` [PATCH v2 11/11] drm/i915/bw: insert a sw bw info entry to cater low data rate usecases Vinod Govindapillai
2026-05-12 11:51   ` Jani Nikula
2026-05-12 12:02     ` Govindapillai, Vinod
2026-05-11 18:27 ` ✗ i915.CI.BAT: failure for drm/i915/display: reduce the pm demand peak bw based on display data rate 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=ccf20fd4bdfdadfc1b8f7497126362c980232595@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    --cc=vinod.govindapillai@intel.com \
    /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