Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Shekhar Chauhan <shekhar.chauhan@intel.com>,
	Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>,
	Tejas Upadhyay <tejas.upadhyay@intel.com>,
	Wang Xin <x.wang@intel.com>,
	"Niranjana Vishwanathapura" <niranjana.vishwanathapura@intel.com>
Subject: Re: [PATCH 13/23] drm/xe: Dump CURRENT_LRCA and CSMQDEBUG registers
Date: Tue, 14 Oct 2025 10:24:45 -0700	[thread overview]
Message-ID: <20251014172445.GU5409@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20251013-xe3p-v1-13-bfb74f038215@intel.com>

On Mon, Oct 13, 2025 at 08:24:45PM -0700, Lucas De Marchi wrote:
> From: Wang Xin <x.wang@intel.com>
> 
> Add CURRENT_LRCA and CSMQDEBUG to register dump to help debugging.

It might be worth splitting this into two patches since CURRENT_LRCA is
something that's been around forever and can already be dumped
unconditionally on existing platforms, whereas CSMQDEBUG is a new Xe3p
register.

Also, I think CSMQDEBUG dumping would probably make more sense to be
included as part of the MQ patch series that Niranjana will be sending
later; dumping this register doesn't really have any value outside the
context of that other work.

A couple more comments farther down...

> 
> Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Wang Xin <x.wang@intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/xe/regs/xe_engine_regs.h |  5 +++
>  drivers/gpu/drm/xe/xe_guc_capture.c      | 53 +++++++++++++++++++++++++++++++-
>  2 files changed, 57 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/regs/xe_engine_regs.h b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
> index f4c3e1187a00a..7b6ec0cf78c85 100644
> --- a/drivers/gpu/drm/xe/regs/xe_engine_regs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_engine_regs.h
> @@ -141,6 +141,9 @@
>  #define   INHIBIT_SWITCH_UNTIL_PREEMPTED	REG_BIT(31)
>  #define   IDLE_DELAY				REG_GENMASK(20, 0)
>  
> +#define RING_CURRENT_LRCA(base)			XE_REG((base) + 0x240)
> +#define   CURRENT_LRCA_VALID			REG_BIT(0)
> +
>  #define RING_CONTEXT_CONTROL(base)		XE_REG((base) + 0x244, XE_REG_OPTION_MASKED)
>  #define	  CTX_CTRL_PXP_ENABLE			REG_BIT(10)
>  #define	  CTX_CTRL_OAC_CONTEXT_ENABLE		REG_BIT(8)
> @@ -153,6 +156,8 @@
>  #define   GFX_DISABLE_LEGACY_MODE		REG_BIT(3)
>  #define   GFX_MSIX_INTERRUPT_ENABLE		REG_BIT(13)
>  
> +#define RING_CSMQDEBUG(base)			XE_REG((base) + 0x2b0)
> +
>  #define RING_TIMESTAMP(base)			XE_REG((base) + 0x358)
>  
>  #define RING_TIMESTAMP_UDW(base)		XE_REG((base) + 0x358 + 4)
> diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_guc_capture.c
> index 243dad3e24185..265aa7b7614ce 100644
> --- a/drivers/gpu/drm/xe/xe_guc_capture.c
> +++ b/drivers/gpu/drm/xe/xe_guc_capture.c
> @@ -122,6 +122,7 @@ struct __guc_capture_parsed_output {
>  	{ RING_IPEHR(0),		REG_32BIT,	0,	0,	0,	"IPEHR"}, \
>  	{ RING_INSTDONE(0),		REG_32BIT,	0,	0,	0,	"RING_INSTDONE"}, \
>  	{ INDIRECT_RING_STATE(0),	REG_32BIT,	0,	0,	0,	"INDIRECT_RING_STATE"}, \
> +	{ RING_CURRENT_LRCA(0),		REG_32BIT,	0,	0,	0,	"CURRENT_LRCA"}, \
>  	{ RING_ACTHD(0),		REG_64BIT_LOW_DW, 0,	0,	0,	NULL}, \
>  	{ RING_ACTHD_UDW(0),		REG_64BIT_HI_DW, 0,	0,	0,	"ACTHD"}, \
>  	{ RING_BBADDR(0),		REG_64BIT_LOW_DW, 0,	0,	0,	NULL}, \
> @@ -149,6 +150,9 @@ struct __guc_capture_parsed_output {
>  	{ SFC_DONE(2),			0,	0,	0,	0,	"SFC_DONE[2]"}, \
>  	{ SFC_DONE(3),			0,	0,	0,	0,	"SFC_DONE[3]"}
>  
> +#define XE3P_BASE_ENGINE_INSTANCE \
> +	{ RING_CSMQDEBUG(0),		REG_32BIT,	0,	0,	0,	"CSMQDEBUG"}
> +
>  /* XE_LP Global */
>  static const struct __guc_mmio_reg_descr xe_lp_global_regs[] = {
>  	COMMON_XELP_BASE_GLOBAL,
> @@ -195,6 +199,36 @@ static const struct __guc_mmio_reg_descr xe_lp_gsc_inst_regs[] = {
>  	COMMON_BASE_ENGINE_INSTANCE,
>  };
>  
> +/* Render / Compute Per-Engine-Instance */
> +static const struct __guc_mmio_reg_descr xe3p_rc_inst_regs[] = {
> +	COMMON_BASE_ENGINE_INSTANCE,
> +	XE3P_BASE_ENGINE_INSTANCE,
> +};
> +
> +/* Media Decode/Encode Per-Engine-Instance */

I'm also wondering if we really need to dump it for the vcs/vecs/gsc
engines; although the register technically exists there, those engines
don't actually support MQ so maybe it's only worth dumping on the CCS
and BCS engines?

> +static const struct __guc_mmio_reg_descr xe3p_vd_inst_regs[] = {
> +	COMMON_BASE_ENGINE_INSTANCE,
> +	XE3P_BASE_ENGINE_INSTANCE,
> +};
> +
> +/* Video Enhancement Per-Engine-Instance */
> +static const struct __guc_mmio_reg_descr xe3p_vec_inst_regs[] = {
> +	COMMON_BASE_ENGINE_INSTANCE,
> +	XE3P_BASE_ENGINE_INSTANCE,
> +};
> +
> +/* Blitter Per-Engine-Instance */
> +static const struct __guc_mmio_reg_descr xe3p_blt_inst_regs[] = {
> +	COMMON_BASE_ENGINE_INSTANCE,
> +	XE3P_BASE_ENGINE_INSTANCE,
> +};
> +
> +/* XE3P - GSC Per-Engine-Instance */
> +static const struct __guc_mmio_reg_descr xe3p_gsc_inst_regs[] = {
> +	COMMON_BASE_ENGINE_INSTANCE,
> +	XE3P_BASE_ENGINE_INSTANCE,
> +};
> +
>  /*
>   * Empty list to prevent warnings about unknown class/instance types
>   * as not all class/instance types have entries on all platforms.
> @@ -245,6 +279,21 @@ static const struct __guc_mmio_reg_descr_group xe_hpg_lists[] = {
>  	{}
>  };
>  
> + /* List of lists for graphic product version >= 3500 */
> +static const struct __guc_mmio_reg_descr_group xe3p_lists[] = {
> +	MAKE_REGLIST(xe_lp_global_regs, PF, GLOBAL, 0),
> +	MAKE_REGLIST(xe_hpg_rc_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE),
> +	MAKE_REGLIST(xe3p_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE),
> +	MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEO),
> +	MAKE_REGLIST(xe3p_vd_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEO),
> +	MAKE_REGLIST(xe_vec_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE),
> +	MAKE_REGLIST(xe3p_vec_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE),
> +	MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_BLITTER),
> +	MAKE_REGLIST(xe3p_blt_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_BLITTER),
> +	MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_GSC_OTHER),
> +	MAKE_REGLIST(xe3p_gsc_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_GSC_OTHER),
> +	{}
> +};
>  static const char * const capture_list_type_names[] = {
>  	"Global",
>  	"Class",
> @@ -292,7 +341,9 @@ guc_capture_remove_stale_matches_from_list(struct xe_guc_state_capture *gc,
>  static const struct __guc_mmio_reg_descr_group *
>  guc_capture_get_device_reglist(struct xe_device *xe)
>  {
> -	if (GRAPHICS_VERx100(xe) >= 1255)
> +	if (GRAPHICS_VERx100(xe) >= 3500)

Since there's no IP with a version of exactly 35.00, I'd just do
"GRAPHICS_VER(xe) >= 35" to avoid any confusion.  Also in the comment a
little bit farther up, I'd replace the "graphic product version >= 3500"
with "Xe3p and beyond."


Matt

> +		return xe3p_lists;
> +	else if (GRAPHICS_VERx100(xe) >= 1255)
>  		return xe_hpg_lists;
>  	else
>  		return xe_lp_lists;
> 
> -- 
> 2.51.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

  reply	other threads:[~2025-10-14 17:24 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14  3:24 [PATCH 00/23] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-14  3:24 ` [PATCH 01/23] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-14  6:17   ` Shekhar Chauhan
2025-10-14 16:11   ` Matt Roper
2025-10-14  3:24 ` [PATCH 02/23] drm/xe/xe3p_lpm: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-14  6:22   ` Shekhar Chauhan
2025-10-14 16:14   ` Matt Roper
2025-10-14  3:24 ` [PATCH 03/23] drm/xe/xe3p_lpm: Configure MAIN_GAMCTRL_QUEUE_SELECT Lucas De Marchi
2025-10-14 16:34   ` Matt Roper
2025-10-15  2:28     ` Lucas De Marchi
2025-10-15  6:36       ` Vivekanandan, Balasubramani
2025-10-15 14:03         ` Lucas De Marchi
2025-10-16 14:20           ` Vivekanandan, Balasubramani
2025-10-15 14:59       ` Matt Roper
2025-10-14  3:24 ` [PATCH 04/23] drm/xe/xe3p_lpm: Add special check in Media GT for Main GAMCTRL Lucas De Marchi
2025-10-14 16:36   ` Matt Roper
2025-10-14  3:24 ` [PATCH 05/23] drm/xe/xe3p_lpm: Stop reading the CTC_MODE register Lucas De Marchi
2025-10-14 11:58   ` Shekhar Chauhan
2025-10-14 16:52     ` Matt Roper
2025-10-15  3:41       ` Lucas De Marchi
2025-10-15  9:19         ` Vivekanandan, Balasubramani
2025-10-15 15:04           ` Matt Roper
2025-10-14 16:40   ` Matt Roper
2025-10-14 16:53     ` Matt Roper
2025-10-14  3:24 ` [PATCH 06/23] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-14 17:04   ` Matt Roper
2025-10-14  3:24 ` [PATCH 07/23] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-15  9:56   ` Vivekanandan, Balasubramani
2025-10-14  3:24 ` [PATCH 08/23] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-15 12:24   ` Vivekanandan, Balasubramani
2025-10-14  3:24 ` [PATCH 09/23] drm/xe/xe3p: Determine service copy availability from fuse Lucas De Marchi
2025-10-15 20:14   ` Gustavo Sousa
2025-10-14  3:24 ` [PATCH 10/23] drm/xe/xe3p: Skip TD flush Lucas De Marchi
2025-10-14 19:35   ` Matt Roper
2025-10-14  3:24 ` [PATCH 11/23] drm/xe/xe3p: Enable L2 flush optimization feature Lucas De Marchi
2025-10-14 19:43   ` Matt Roper
2025-10-15  4:02     ` Lucas De Marchi
2025-10-14  3:24 ` [PATCH 12/23] drm/xe/xe3p: Flush userptr/shrinker bo cachelines manually Lucas De Marchi
2025-10-14 12:58   ` Thomas Hellström
2025-10-15 18:42     ` Lucas De Marchi
2025-10-14  3:24 ` [PATCH 13/23] drm/xe: Dump CURRENT_LRCA and CSMQDEBUG registers Lucas De Marchi
2025-10-14 17:24   ` Matt Roper [this message]
2025-10-15  4:07     ` Lucas De Marchi
2025-10-14  3:24 ` [PATCH 14/23] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-14  7:34   ` Shekhar Chauhan
2025-10-14  3:24 ` [PATCH 15/23] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-15 18:49   ` Lucas De Marchi
2025-10-14  3:24 ` [PATCH 16/23] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-14  7:45   ` Shekhar Chauhan
2025-10-14  3:24 ` [PATCH 17/23] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-14  8:04   ` Shekhar Chauhan
2025-10-14  8:12     ` Shekhar Chauhan
2025-10-14 17:33     ` Matt Roper
2025-10-15  2:47       ` Shekhar Chauhan
2025-10-14 17:36   ` Matt Roper
2025-10-14  3:24 ` [PATCH 18/23] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-14 17:46   ` Matt Roper
2025-10-14  3:24 ` [PATCH 19/23] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-14  3:24 ` [PATCH 20/23] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-14 18:07   ` Matt Roper
2025-10-15 17:07     ` Lucas De Marchi
2025-10-15 17:12       ` Matt Roper
2025-10-14  3:24 ` [PATCH 21/23] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-14  8:09   ` Shekhar Chauhan
2025-10-14  8:13     ` Shekhar Chauhan
2025-10-14 18:14     ` Matt Roper
2025-10-15  2:52       ` Shekhar Chauhan
2025-10-15 14:38         ` Lucas De Marchi
2025-10-15 15:34           ` Shekhar Chauhan
2025-10-14  3:24 ` [PATCH 22/23] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-16 14:07   ` Vivekanandan, Balasubramani
2025-10-14  3:24 ` [PATCH 23/23] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-14 19:11   ` Matt Roper
2025-10-15 23:05     ` Harish Chegondi
2025-10-14  3:45 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support Patchwork
2025-10-14  3:47 ` ✓ CI.KUnit: success " Patchwork
2025-10-14  4:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-14 12:06 ` ✓ Xe.CI.Full: " 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=20251014172445.GU5409@mdroper-desk1.amr.corp.intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=niranjana.vishwanathapura@intel.com \
    --cc=shekhar.chauhan@intel.com \
    --cc=tejas.upadhyay@intel.com \
    --cc=x.wang@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