From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Harish Chegondi <harish.chegondi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <james.ausmus@intel.com>,
<felix.j.degrood@intel.com>, <matthew.olson@intel.com>,
<lucas.demarchi@intel.com>
Subject: Re: [PATCH v9 6/8] drm/xe/eustall: Add EU stall sampling support for Xe2
Date: Wed, 12 Feb 2025 11:46:27 -0800 [thread overview]
Message-ID: <85zfir6j58.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <358f15b45853d412f4d6f19cb3e1e334d2549d62.1739193510.git.harish.chegondi@intel.com>
On Mon, 10 Feb 2025 05:46:47 -0800, Harish Chegondi wrote:
>
> Add EU stall sampling support for Xe2 architecture GPUs - LNL and BMG.
> EU stall data format for LNL and BMG is different from that of PVC.
>
> v9: Use GRAPHICS_VER() check instead of platform
>
> v8: Renamed struct drm_xe_eu_stall_data_xe2 to struct xe_eu_stall_data_xe2
> since it is a local structure.
>
> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_eu_stall.c | 51 ++++++++++++++++++++++++++++++--
> 1 file changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c
> index 428267010805..52f8f40ba9a6 100644
> --- a/drivers/gpu/drm/xe/xe_eu_stall.c
> +++ b/drivers/gpu/drm/xe/xe_eu_stall.c
> @@ -113,12 +113,51 @@ struct xe_eu_stall_data_pvc {
> __u64 unused[6];
> } __packed;
>
> +/**
> + * struct xe_eu_stall_data_xe2 - EU stall data format for LNL, BMG
> + * Bits Field
> + * @ip_addr: 0 to 28 IP (addr)
> + * @tdr_count: 29 to 36 Tdr count
> + * @other_count: 37 to 44 other count
> + * @control_count: 45 to 52 control count
> + * @pipestall_count: 53 to 60 pipestall count
> + * @send_count: 61 to 68 send count
> + * @dist_acc_count: 69 to 76 dist_acc count
> + * @sbid_count: 77 to 84 sbid count
> + * @sync_count: 85 to 92 sync count
> + * @inst_fetch_count: 93 to 100 inst_fetch count
> + * @active_count: 101 to 108 Active count
> + * @ex_id: 109 to 111 Exid
> + * @end_flag: 112 EndFlag (is always 1)
> + * @unused_bits: 113 to 127 unused bits
> + * @unused: remaining unused bytes
> + */
Same comment about this header as for Patch 3/8.
> +struct xe_eu_stall_data_xe2 {
> + __u64 ip_addr:29;
> + __u64 tdr_count:8;
> + __u64 other_count:8;
> + __u64 control_count:8;
> + __u64 pipestall_count:8;
> + __u64 send_count:8;
> + __u64 dist_acc_count:8;
> + __u64 sbid_count:8;
> + __u64 sync_count:8;
> + __u64 inst_fetch_count:8;
> + __u64 active_count:8;
> + __u64 ex_id:3;
> + __u64 end_flag:1;
> + __u64 unused_bits:15;
> + __u64 unused[6];
> +} __packed;
> +
> static size_t xe_eu_stall_data_record_size(struct xe_device *xe)
> {
> unsigned long record_size = 0;
>
> if (xe->info.platform == XE_PVC)
> record_size = sizeof(struct xe_eu_stall_data_pvc);
> + else if (GRAPHICS_VER(xe) >= 20)
> + record_size = sizeof(struct xe_eu_stall_data_xe2);
>
In Patch 4/8, I am suggesting adding the following here:
xe_assert(xe, is_power_of_2(record_size));
Even a BUILD_BUG_ON() might work, since we are dealing with sizeof.
> return record_size;
> }
> @@ -345,10 +384,16 @@ static bool eu_stall_data_buf_poll(struct xe_eu_stall_data_stream *stream)
>
> static void clear_dropped_eviction_line_bit(struct xe_gt *gt, u16 group, u16 instance)
> {
> + struct xe_device *xe = gt_to_xe(gt);
> u32 write_ptr_reg;
>
> - /* On PVC, the overflow bit has to be cleared by writing 1 to it. */
> - write_ptr_reg = _MASKED_BIT_ENABLE(XEHPC_EUSTALL_REPORT_OVERFLOW_DROP);
> + /* On PVC, the overflow bit has to be cleared by writing 1 to it.
> + * On other GPUs, the bit has to be cleared by writing 0 to it.
s/On other GPUs/On Xe2+/
> + */
> + if (GRAPHICS_VER(xe) >= 20)
> + write_ptr_reg = _MASKED_BIT_DISABLE(XEHPC_EUSTALL_REPORT_OVERFLOW_DROP);
> + else
> + write_ptr_reg = _MASKED_BIT_ENABLE(XEHPC_EUSTALL_REPORT_OVERFLOW_DROP);
>
> xe_gt_mcr_unicast_write(gt, XEHPC_EUSTALL_REPORT, write_ptr_reg, group, instance);
> }
> @@ -821,7 +866,7 @@ static const struct file_operations fops_eu_stall = {
>
> static inline bool has_eu_stall_sampling_support(struct xe_device *xe)
> {
> - return ((xe->info.platform == XE_PVC) ? true : false);
> + return ((xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20) ? true : false);
return xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20;
No brackets needed. I forgot but num_data_rows() also has unneeded brackets
after 'return'.
> }
>
> /**
> --
> 2.48.1
>
next prev parent reply other threads:[~2025-02-12 19:46 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 13:46 [PATCH v9 0/8] Add support for EU stall sampling Harish Chegondi
2025-02-10 13:46 ` [PATCH v9 1/8] drm/xe/topology: Add a function to find the index of the last enabled DSS in a mask Harish Chegondi
2025-02-10 17:31 ` Dixit, Ashutosh
2025-02-10 13:46 ` [PATCH v9 2/8] drm/xe/uapi: Introduce API for EU stall sampling Harish Chegondi
2025-02-10 23:07 ` Dixit, Ashutosh
2025-02-10 23:53 ` Dixit, Ashutosh
2025-02-11 19:50 ` Dixit, Ashutosh
2025-02-12 23:54 ` Harish Chegondi
2025-02-13 2:39 ` Dixit, Ashutosh
2025-02-16 1:49 ` Harish Chegondi
2025-02-16 5:49 ` Dixit, Ashutosh
2025-02-18 11:54 ` Jani Nikula
2025-02-10 13:46 ` [PATCH v9 3/8] drm/xe/eustall: Add support to init, enable and disable " Harish Chegondi
2025-02-11 17:33 ` Dixit, Ashutosh
2025-02-11 22:02 ` Harish Chegondi
2025-02-12 2:44 ` Dixit, Ashutosh
2025-02-10 13:46 ` [PATCH v9 4/8] drm/xe/eustall: Add support to read() and poll() EU stall data Harish Chegondi
2025-02-12 19:02 ` Dixit, Ashutosh
2025-02-14 7:51 ` Harish Chegondi
2025-02-14 20:34 ` Dixit, Ashutosh
2025-02-15 0:44 ` Harish Chegondi
2025-02-15 2:22 ` Dixit, Ashutosh
2025-02-18 0:35 ` Harish Chegondi
2025-02-18 4:02 ` Dixit, Ashutosh
2025-02-10 13:46 ` [PATCH v9 5/8] drm/xe/eustall: Add support to handle dropped " Harish Chegondi
2025-02-13 6:31 ` Dixit, Ashutosh
2025-02-13 21:55 ` Harish Chegondi
2025-02-13 23:45 ` Dixit, Ashutosh
2025-02-14 0:11 ` Dixit, Ashutosh
2025-02-14 2:05 ` Dixit, Ashutosh
2025-02-14 2:23 ` Dixit, Ashutosh
2025-02-10 13:46 ` [PATCH v9 6/8] drm/xe/eustall: Add EU stall sampling support for Xe2 Harish Chegondi
2025-02-12 19:46 ` Dixit, Ashutosh [this message]
2025-02-10 13:46 ` [PATCH v9 7/8] drm/xe/uapi: Add a device query to get EU stall sampling information Harish Chegondi
2025-02-12 21:13 ` Dixit, Ashutosh
2025-02-10 13:46 ` [PATCH v9 8/8] drm/xe/eustall: Add workaround 22016596838 which applies to PVC Harish Chegondi
2025-02-12 20:01 ` Dixit, Ashutosh
2025-02-10 14:32 ` ✓ CI.Patch_applied: success for Add support for EU stall sampling Patchwork
2025-02-10 14:33 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-10 14:34 ` ✓ CI.KUnit: success " Patchwork
2025-02-10 14:50 ` ✓ CI.Build: " Patchwork
2025-02-10 14:53 ` ✓ CI.Hooks: " Patchwork
2025-02-10 14:54 ` ✓ CI.checksparse: " Patchwork
2025-02-11 7:24 ` ✓ CI.Patch_applied: success for Add support for EU stall sampling (rev2) Patchwork
2025-02-11 7:24 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-11 7:25 ` ✓ CI.KUnit: success " Patchwork
2025-02-11 7:42 ` ✓ CI.Build: " Patchwork
2025-02-11 7:43 ` ✗ CI.Hooks: failure " Patchwork
2025-02-11 7:44 ` ✗ CI.checksparse: warning " Patchwork
2025-02-11 8:04 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-11 16:11 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-11 19:23 ` [PATCH v9 0/8] Add support for EU stall sampling Dixit, Ashutosh
2025-02-12 9:42 ` ✗ Xe.CI.Full: failure for " 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=85zfir6j58.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=felix.j.degrood@intel.com \
--cc=harish.chegondi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=james.ausmus@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=matthew.olson@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.