public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	jani.nikula@intel.com, ville.syrjala@intel.com,
	jani.saarinen@intel.com
Subject: Re: [PATCH 8/8] drm/i915/debugfs: add dbuf alloc status as part of i915_ddb_info
Date: Thu, 7 Nov 2024 00:46:59 +0200	[thread overview]
Message-ID: <Zyvx49k6xg6vA83T@intel.com> (raw)
In-Reply-To: <20241105071600.235338-9-vinod.govindapillai@intel.com>

On Tue, Nov 05, 2024 at 09:16:00AM +0200, Vinod Govindapillai wrote:
> >From xe3 onwards, there is a provision to define and
> use min ddb and interim ddb allocations for async flip
> use case. Add the dbuf allocation status as part of
> i915_ddb_info as well to show if min or interim ddb
> is being used.
> 
> Bspec: 72053
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
>  .../drm/i915/display/intel_display_debugfs.c  | 23 ++++++++++++++++---
>  .../i915/display/skl_universal_plane_regs.h   |  1 +
>  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 11aff485d8fa..bce4a1ab05c0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -39,6 +39,7 @@
>  #include "intel_pps.h"
>  #include "intel_psr.h"
>  #include "intel_psr_regs.h"
> +#include "skl_universal_plane_regs.h"
>  #include "intel_vdsc.h"
>  #include "intel_wm.h"
>  
> @@ -688,9 +689,24 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)
>  	return 0;
>  }
>  
> +static u32 dbuf_alloc_status(struct intel_display *display,
> +			     enum pipe pipe, enum plane_id plane_id)
> +{
> +	u32 val = 0;
> +
> +	if (DISPLAY_VER(display) >= 30) {
> +		u32 reg = intel_de_read(display,
> +					PLANE_MIN_BUF_CFG(pipe, plane_id));
> +		val = REG_FIELD_GET(PLANE_DBUF_ALLOC_STATUS_MASK, reg);
> +	}
> +
> +	return val;
> +}
> +
>  static int i915_ddb_info(struct seq_file *m, void *unused)
>  {
>  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
> +	struct intel_display *display = &dev_priv->display;
>  	struct skl_ddb_entry *entry;
>  	struct intel_crtc *crtc;
>  
> @@ -699,7 +715,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
>  
>  	drm_modeset_lock_all(&dev_priv->drm);
>  
> -	seq_printf(m, "%-15s%8s%8s%8s\n", "", "Start", "End", "Size");
> +	seq_printf(m, "%-15s%8s%8s%8s%16s\n", "", "Start", "End", "Size", "Alloc Status");

This guy is meant ot just print the software state. The hardware might
not even be awake here. So this doesn't belong here. It would be better
to add it to the intel_watermark tool instead.

>  
>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
>  		struct intel_crtc_state *crtc_state =
> @@ -711,9 +727,10 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
>  
>  		for_each_plane_id_on_crtc(crtc, plane_id) {
>  			entry = &crtc_state->wm.skl.plane_ddb[plane_id];
> -			seq_printf(m, "  Plane%-8d%8u%8u%8u\n", plane_id + 1,
> +			seq_printf(m, "  Plane%-8d%8u%8u%8u%8u\n", plane_id + 1,
>  				   entry->start, entry->end,
> -				   skl_ddb_entry_size(entry));
> +				   skl_ddb_entry_size(entry),
> +				   dbuf_alloc_status(display, pipe, plane_id));
>  		}
>  
>  		entry = &crtc_state->wm.skl.plane_ddb[PLANE_CURSOR];
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
> index 65a5482fae60..53550356430d 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
> @@ -390,6 +390,7 @@
>  
>  #define PLANE_AUTO_MIN_DBUF_EN			REG_BIT(31)
>  #define PLANE_MIN_DDB_BLOCKS_MASK		REG_GENMASK(27, 16)
> +#define PLANE_DBUF_ALLOC_STATUS_MASK		REG_GENMASK(15, 14)

Do these bits actually mean something?

>  #define PLANE_INTERIM_DDB_BLOCKS_MASK		REG_GENMASK(11, 0)
>  
>  /* tgl+ */
> -- 
> 2.34.1

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2024-11-06 22:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  7:15 [PATCH 0/8] use hw support for min/interim ddb allocation for async flip Vinod Govindapillai
2024-11-05  7:15 ` [PATCH 1/8] drm/i915/display: update intel_enabled_dbuf_slices_mask to use intel_display Vinod Govindapillai
2024-11-05  8:52   ` Jani Nikula
2024-11-05  9:07     ` Govindapillai, Vinod
2024-11-05  7:15 ` [PATCH 2/8] drm/i9i5/display: use intel_display in intel_de_read calls of skl_watermark.c Vinod Govindapillai
2024-11-05  8:58   ` Jani Nikula
2024-11-05  9:03   ` Jani Nikula
2024-11-05  7:15 ` [PATCH 3/8] drm/i915/display: update use_minimal_wm0_only to use intel_display Vinod Govindapillai
2024-11-05  9:08   ` Jani Nikula
2024-11-06 14:06     ` Ville Syrjälä
2024-11-06 15:49       ` Govindapillai, Vinod
2024-11-05  7:15 ` [PATCH 4/8] drm/i915/display: update use_min_ddb " Vinod Govindapillai
2024-11-05  7:15 ` [PATCH 5/8] drm/i915/display: update skl_plane_wm_equals " Vinod Govindapillai
2024-11-05  9:09   ` Jani Nikula
2024-11-05  7:15 ` [PATCH 6/8] drm/i915/display: update to plane_wm register access function Vinod Govindapillai
2024-11-05  7:15 ` [PATCH 7/8] drm/i915/xe3: Use hw support for min/interim ddb allocations for async flip Vinod Govindapillai
2024-11-06 22:45   ` Ville Syrjälä
2024-11-20 22:26     ` Govindapillai, Vinod
2024-11-05  7:16 ` [PATCH 8/8] drm/i915/debugfs: add dbuf alloc status as part of i915_ddb_info Vinod Govindapillai
2024-11-06 22:46   ` Ville Syrjälä [this message]
2024-11-20 22:30     ` Govindapillai, Vinod
2024-11-05  8:17 ` ✗ Fi.CI.CHECKPATCH: warning for use hw support for min/interim ddb allocation for async flip Patchwork
2024-11-05  8:17 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-11-05  9:11 ` ✗ Fi.CI.BAT: 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=Zyvx49k6xg6vA83T@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jani.saarinen@intel.com \
    --cc=ville.syrjala@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