* [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency
@ 2025-05-14 8:07 Soham Purkait
2025-05-14 8:07 ` [PATCH 1/4] Utility function and macro for telemetry reading Soham Purkait
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Soham Purkait @ 2025-05-14 8:07 UTC (permalink / raw)
To: intel-xe, anshuman.gupta, badal.nilawar, karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
The changes in the first patch is taken from
https://patchwork.freedesktop.org/series/148926/
Thay are added only for compilation and does not require review.
This patch exposes G8, G10 and ModS residency counter value through
debugfs.
Soham Purkait (4):
[DO NOT REVIEW]: Utility function and macro for telemetry reading
drm/xe/xe_debugfs: Exposure of G8 residency counter through debugfs
drm/xe/xe_debugfs: Exposure of G10 residency counter through debugfs.
drm/xe/xe_debugfs: Exposure of Mods residency counter through debugfs.
drivers/gpu/drm/xe/regs/xe_pmt.h | 5 ++
drivers/gpu/drm/xe/xe_debugfs.c | 103 +++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_debugfs.h | 4 ++
drivers/gpu/drm/xe/xe_vsec.c | 2 +-
drivers/gpu/drm/xe/xe_vsec.h | 5 ++
5 files changed, 118 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] Utility function and macro for telemetry reading
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
@ 2025-05-14 8:07 ` Soham Purkait
2025-05-14 9:27 ` Jani Nikula
2025-05-14 8:07 ` [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter Soham Purkait
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Soham Purkait @ 2025-05-14 8:07 UTC (permalink / raw)
To: intel-xe, anshuman.gupta, badal.nilawar, karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
The changes in this patch is taken from
https://patchwork.freedesktop.org/series/148926/
Thay are added only for compilation and does not
require review.
---
drivers/gpu/drm/xe/regs/xe_pmt.h | 5 +++++
drivers/gpu/drm/xe/xe_vsec.c | 2 +-
drivers/gpu/drm/xe/xe_vsec.h | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/regs/xe_pmt.h b/drivers/gpu/drm/xe/regs/xe_pmt.h
index f45abcd96ba8..b1d4504e4adc 100644
--- a/drivers/gpu/drm/xe/regs/xe_pmt.h
+++ b/drivers/gpu/drm/xe/regs/xe_pmt.h
@@ -10,6 +10,11 @@
#define BMG_PMT_BASE_OFFSET 0xDB000
#define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE_OFFSET)
+#define PUNIT_TELEMETRY_GUID XE_REG(BMG_DISCOVERY_OFFSET + 0x4)
+#define BMG_ENERGY_STATUS_PMT_OFFSET (0x30)
+#define ENERGY_PKG REG_GENMASK64(31, 0)
+#define ENERGY_CARD REG_GENMASK64(63, 32)
+
#define BMG_TELEMETRY_BASE_OFFSET 0xE0000
#define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE_OFFSET)
diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
index b378848d3b7b..a46e9580b1f4 100644
--- a/drivers/gpu/drm/xe/xe_vsec.c
+++ b/drivers/gpu/drm/xe/xe_vsec.c
@@ -149,7 +149,7 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset)
return 0;
}
-static int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
+int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
u32 count)
{
struct xe_device *xe = pdev_to_xe_device(pdev);
diff --git a/drivers/gpu/drm/xe/xe_vsec.h b/drivers/gpu/drm/xe/xe_vsec.h
index 5777c53faec2..6184b875e4b1 100644
--- a/drivers/gpu/drm/xe/xe_vsec.h
+++ b/drivers/gpu/drm/xe/xe_vsec.h
@@ -4,8 +4,13 @@
#ifndef _XE_VSEC_H_
#define _XE_VSEC_H_
+#include "linux/types.h"
+#include "linux/pci.h"
+
struct xe_device;
void xe_vsec_init(struct xe_device *xe);
+int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
+ u32 count);
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
2025-05-14 8:07 ` [PATCH 1/4] Utility function and macro for telemetry reading Soham Purkait
@ 2025-05-14 8:07 ` Soham Purkait
2025-05-14 8:44 ` Gupta, Anshuman
2025-05-14 11:07 ` Riana Tauro
2025-05-14 8:07 ` [PATCH 3/4] drm/xe/xe_debugfs: Exposure of G10 " Soham Purkait
` (3 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Soham Purkait @ 2025-05-14 8:07 UTC (permalink / raw)
To: intel-xe, anshuman.gupta, badal.nilawar, karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
Add a debugfs node named g8_residency in order to obtain the G8
residency counter value.
Signed-off-by: Soham Purkait <soham.purkait@intel.com>
---
drivers/gpu/drm/xe/xe_debugfs.c | 37 +++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_debugfs.h | 2 ++
2 files changed, 39 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index d0503959a8ed..f9ab6a03af29 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -11,16 +11,19 @@
#include <drm/drm_debugfs.h>
+#include "regs/xe_pmt.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_force_wake.h"
#include "xe_gt_debugfs.h"
#include "xe_gt_printk.h"
#include "xe_guc_ads.h"
+#include "xe_mmio.h"
#include "xe_pm.h"
#include "xe_pxp_debugfs.h"
#include "xe_sriov.h"
#include "xe_step.h"
+#include "xe_vsec.h"
#ifdef CONFIG_DRM_XE_DEBUG
#include "xe_bo_evict.h"
@@ -185,12 +188,43 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
return size;
}
+static ssize_t g8_residency_show(struct file *f, char __user *ubuf,
+ size_t size, loff_t *pos)
+{
+ u64 reg_val;
+ char buf[32];
+ int len = 0;
+ int ret = 0;
+ struct xe_device *xe;
+ struct xe_mmio *mmio;
+
+ xe = file_inode(f)->i_private;
+ mmio = xe_root_tile_mmio(xe);
+ ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
+ xe_mmio_read32(mmio, PUNIT_TELEMETRY_GUID),
+ ®_val,
+ BMG_G8_RESIDENCY_OFFSET,
+ sizeof(reg_val));
+
+ drm_warn(&xe->drm, "G8 Residency read from mbx 0x%016llx, ret %d\n",
+ reg_val, ret);
+
+ len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
+
+ return simple_read_from_buffer(ubuf, size, pos, buf, len);
+}
+
static const struct file_operations wedged_mode_fops = {
.owner = THIS_MODULE,
.read = wedged_mode_show,
.write = wedged_mode_set,
};
+static const struct file_operations g8_residency_fops = {
+ .owner = THIS_MODULE,
+ .read = g8_residency_show,
+};
+
void xe_debugfs_register(struct xe_device *xe)
{
struct ttm_device *bdev = &xe->ttm;
@@ -211,6 +245,9 @@ void xe_debugfs_register(struct xe_device *xe)
debugfs_create_file("wedged_mode", 0600, root, xe,
&wedged_mode_fops);
+ debugfs_create_file("g8_residency", 0444, root, xe,
+ &g8_residency_fops);
+
for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) {
man = ttm_manager_type(bdev, mem_type);
diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
index 17f4c2f1b5e4..86868a3cd379 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.h
+++ b/drivers/gpu/drm/xe/xe_debugfs.h
@@ -8,6 +8,8 @@
struct xe_device;
+#define BMG_G8_RESIDENCY_OFFSET (0x540)
+
#ifdef CONFIG_DEBUG_FS
void xe_debugfs_register(struct xe_device *xe);
#else
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] drm/xe/xe_debugfs: Exposure of G10 residency counter
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
2025-05-14 8:07 ` [PATCH 1/4] Utility function and macro for telemetry reading Soham Purkait
2025-05-14 8:07 ` [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter Soham Purkait
@ 2025-05-14 8:07 ` Soham Purkait
2025-05-14 8:07 ` [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods " Soham Purkait
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Soham Purkait @ 2025-05-14 8:07 UTC (permalink / raw)
To: intel-xe, anshuman.gupta, badal.nilawar, karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
Add a debugfs node named g10_residency in order to obtain the G10
residency counter value.
Signed-off-by: Soham Purkait <soham.purkait@intel.com>
---
drivers/gpu/drm/xe/xe_debugfs.c | 32 ++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_debugfs.h | 1 +
2 files changed, 33 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index f9ab6a03af29..66eab5528b92 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -214,6 +214,30 @@ static ssize_t g8_residency_show(struct file *f, char __user *ubuf,
return simple_read_from_buffer(ubuf, size, pos, buf, len);
}
+static ssize_t g10_residency_show(struct file *f, char __user *ubuf,
+ size_t size, loff_t *pos)
+{
+ u64 reg_val;
+ char buf[32];
+ int len = 0;
+ int ret = 0;
+ struct xe_device *xe;
+ struct xe_mmio *mmio;
+
+ xe = file_inode(f)->i_private;
+ mmio = xe_root_tile_mmio(xe);
+ ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
+ xe_mmio_read32(mmio, PUNIT_TELEMETRY_GUID), ®_val, BMG_G10_RESIDENCY_OFFSET,
+ sizeof(reg_val));
+
+ drm_warn(&xe->drm, "G10 Residency read from mbx 0x%016llx, ret %d\n",
+ reg_val, ret);
+
+ len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
+
+ return simple_read_from_buffer(ubuf, size, pos, buf, len);
+}
+
static const struct file_operations wedged_mode_fops = {
.owner = THIS_MODULE,
.read = wedged_mode_show,
@@ -225,6 +249,11 @@ static const struct file_operations g8_residency_fops = {
.read = g8_residency_show,
};
+static const struct file_operations g10_residency_fops = {
+ .owner = THIS_MODULE,
+ .read = g10_residency_show,
+};
+
void xe_debugfs_register(struct xe_device *xe)
{
struct ttm_device *bdev = &xe->ttm;
@@ -248,6 +277,9 @@ void xe_debugfs_register(struct xe_device *xe)
debugfs_create_file("g8_residency", 0444, root, xe,
&g8_residency_fops);
+ debugfs_create_file("g10_residency", 0444, root, xe,
+ &g10_residency_fops);
+
for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) {
man = ttm_manager_type(bdev, mem_type);
diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
index 86868a3cd379..27fbb8d46471 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.h
+++ b/drivers/gpu/drm/xe/xe_debugfs.h
@@ -9,6 +9,7 @@
struct xe_device;
#define BMG_G8_RESIDENCY_OFFSET (0x540)
+#define BMG_G10_RESIDENCY_OFFSET (0x548)
#ifdef CONFIG_DEBUG_FS
void xe_debugfs_register(struct xe_device *xe);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods residency counter
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
` (2 preceding siblings ...)
2025-05-14 8:07 ` [PATCH 3/4] drm/xe/xe_debugfs: Exposure of G10 " Soham Purkait
@ 2025-05-14 8:07 ` Soham Purkait
2025-05-14 11:10 ` Riana Tauro
2025-05-14 21:16 ` ✗ CI.Patch_applied: failure for Add debugfs to expose G8, G10 and ModS residency Patchwork
2025-05-27 0:53 ` Patchwork
5 siblings, 1 reply; 14+ messages in thread
From: Soham Purkait @ 2025-05-14 8:07 UTC (permalink / raw)
To: intel-xe, anshuman.gupta, badal.nilawar, karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
Add a debugfs node named mods_residency in order to obtain the ModS
residency counter value.
Signed-off-by: Soham Purkait <soham.purkait@intel.com>
---
drivers/gpu/drm/xe/xe_debugfs.c | 34 +++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_debugfs.h | 1 +
2 files changed, 35 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index 66eab5528b92..240cb73800ae 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -238,6 +238,32 @@ static ssize_t g10_residency_show(struct file *f, char __user *ubuf,
return simple_read_from_buffer(ubuf, size, pos, buf, len);
}
+static ssize_t mods_residency_show(struct file *f, char __user *ubuf,
+ size_t size, loff_t *pos)
+{
+ u64 reg_val;
+ char buf[32];
+ int len = 0;
+ int ret = 0;
+ struct xe_device *xe;
+ struct xe_mmio *mmio;
+
+ xe = file_inode(f)->i_private;
+ mmio = xe_root_tile_mmio(xe);
+ ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
+ xe_mmio_read32(mmio, PUNIT_TELEMETRY_GUID),
+ ®_val,
+ BMG_MODS_RESIDENCY_OFFSET,
+ sizeof(reg_val));
+
+ drm_warn(&xe->drm, "ModS Residency read from mbx 0x%016llx, ret %d\n",
+ reg_val, ret);
+
+ len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
+
+ return simple_read_from_buffer(ubuf, size, pos, buf, len);
+}
+
static const struct file_operations wedged_mode_fops = {
.owner = THIS_MODULE,
.read = wedged_mode_show,
@@ -254,6 +280,11 @@ static const struct file_operations g10_residency_fops = {
.read = g10_residency_show,
};
+static const struct file_operations mods_residency_fops = {
+ .owner = THIS_MODULE,
+ .read = mods_residency_show,
+};
+
void xe_debugfs_register(struct xe_device *xe)
{
struct ttm_device *bdev = &xe->ttm;
@@ -279,6 +310,9 @@ void xe_debugfs_register(struct xe_device *xe)
debugfs_create_file("g10_residency", 0444, root, xe,
&g10_residency_fops);
+
+ debugfs_create_file("mods_residency", 0444, root, xe,
+ &mods_residency_fops);
for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) {
man = ttm_manager_type(bdev, mem_type);
diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
index 27fbb8d46471..55ef13662fec 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.h
+++ b/drivers/gpu/drm/xe/xe_debugfs.h
@@ -10,6 +10,7 @@ struct xe_device;
#define BMG_G8_RESIDENCY_OFFSET (0x540)
#define BMG_G10_RESIDENCY_OFFSET (0x548)
+#define BMG_MODS_RESIDENCY_OFFSET (0x4D0)
#ifdef CONFIG_DEBUG_FS
void xe_debugfs_register(struct xe_device *xe);
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* RE: [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
2025-05-14 8:07 ` [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter Soham Purkait
@ 2025-05-14 8:44 ` Gupta, Anshuman
2025-05-14 16:27 ` Rodrigo Vivi
2025-05-14 11:07 ` Riana Tauro
1 sibling, 1 reply; 14+ messages in thread
From: Gupta, Anshuman @ 2025-05-14 8:44 UTC (permalink / raw)
To: Purkait, Soham, intel-xe@lists.freedesktop.org, Nilawar, Badal,
Poosa, Karthik, Vivi, Rodrigo
Cc: De Marchi, Lucas, Dixit, Ashutosh, Tauro, Riana
> -----Original Message-----
> From: Purkait, Soham <soham.purkait@intel.com>
> Sent: Wednesday, May 14, 2025 1:37 PM
> To: intel-xe@lists.freedesktop.org; Gupta, Anshuman
> <anshuman.gupta@intel.com>; Nilawar, Badal <badal.nilawar@intel.com>;
> Poosa, Karthik <karthik.poosa@intel.com>
> Cc: De Marchi, Lucas <lucas.demarchi@intel.com>; Purkait, Soham
> <soham.purkait@intel.com>; Dixit, Ashutosh <ashutosh.dixit@intel.com>;
> Tauro, Riana <riana.tauro@intel.com>
> Subject: [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
>
> Add a debugfs node named g8_residency in order to obtain the G8 residency
> counter value.
IMO better to expose all such residencies under a debugfs called dgfx_pkgc_residencies
CC @Vivi, Rodrigo for naming suggestion.
Context: This is similar to cpu PC8~PC10 residencies. i.e /sys/kernel/debug/pmc_core/package_cstate_show
Thanks,
Anshuman.
>
> Signed-off-by: Soham Purkait <soham.purkait@intel.com>
> ---
> drivers/gpu/drm/xe/xe_debugfs.c | 37
> +++++++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_debugfs.h | 2 ++
> 2 files changed, 39 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c
> b/drivers/gpu/drm/xe/xe_debugfs.c index d0503959a8ed..f9ab6a03af29
> 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -11,16 +11,19 @@
>
> #include <drm/drm_debugfs.h>
>
> +#include "regs/xe_pmt.h"
> #include "xe_bo.h"
> #include "xe_device.h"
> #include "xe_force_wake.h"
> #include "xe_gt_debugfs.h"
> #include "xe_gt_printk.h"
> #include "xe_guc_ads.h"
> +#include "xe_mmio.h"
> #include "xe_pm.h"
> #include "xe_pxp_debugfs.h"
> #include "xe_sriov.h"
> #include "xe_step.h"
> +#include "xe_vsec.h"
>
> #ifdef CONFIG_DRM_XE_DEBUG
> #include "xe_bo_evict.h"
> @@ -185,12 +188,43 @@ static ssize_t wedged_mode_set(struct file *f,
> const char __user *ubuf,
> return size;
> }
>
> +static ssize_t g8_residency_show(struct file *f, char __user *ubuf,
> + size_t size, loff_t *pos)
> +{
> + u64 reg_val;
> + char buf[32];
> + int len = 0;
> + int ret = 0;
> + struct xe_device *xe;
> + struct xe_mmio *mmio;
> +
> + xe = file_inode(f)->i_private;
> + mmio = xe_root_tile_mmio(xe);
> + ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
> + xe_mmio_read32(mmio,
> PUNIT_TELEMETRY_GUID),
> + ®_val,
> + BMG_G8_RESIDENCY_OFFSET,
> + sizeof(reg_val));
> +
> + drm_warn(&xe->drm, "G8 Residency read from mbx 0x%016llx, ret
> %d\n",
> + reg_val, ret);
> +
> + len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
> +
> + return simple_read_from_buffer(ubuf, size, pos, buf, len); }
> +
> static const struct file_operations wedged_mode_fops = {
> .owner = THIS_MODULE,
> .read = wedged_mode_show,
> .write = wedged_mode_set,
> };
>
> +static const struct file_operations g8_residency_fops = {
> + .owner = THIS_MODULE,
> + .read = g8_residency_show,
> +};
> +
> void xe_debugfs_register(struct xe_device *xe) {
> struct ttm_device *bdev = &xe->ttm;
> @@ -211,6 +245,9 @@ void xe_debugfs_register(struct xe_device *xe)
> debugfs_create_file("wedged_mode", 0600, root, xe,
> &wedged_mode_fops);
>
> + debugfs_create_file("g8_residency", 0444, root, xe,
> + &g8_residency_fops);
> +
> for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1;
> ++mem_type) {
> man = ttm_manager_type(bdev, mem_type);
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.h
> b/drivers/gpu/drm/xe/xe_debugfs.h index 17f4c2f1b5e4..86868a3cd379
> 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.h
> +++ b/drivers/gpu/drm/xe/xe_debugfs.h
> @@ -8,6 +8,8 @@
>
> struct xe_device;
>
> +#define BMG_G8_RESIDENCY_OFFSET (0x540)
> +
> #ifdef CONFIG_DEBUG_FS
> void xe_debugfs_register(struct xe_device *xe); #else
> --
> 2.34.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Utility function and macro for telemetry reading
2025-05-14 8:07 ` [PATCH 1/4] Utility function and macro for telemetry reading Soham Purkait
@ 2025-05-14 9:27 ` Jani Nikula
2025-05-14 17:06 ` Poosa, Karthik
0 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2025-05-14 9:27 UTC (permalink / raw)
To: Soham Purkait, intel-xe, anshuman.gupta, badal.nilawar,
karthik.poosa
Cc: lucas.demarchi, soham.purkait, ashutosh.dixit, riana.tauro
On Wed, 14 May 2025, Soham Purkait <soham.purkait@intel.com> wrote:
> The changes in this patch is taken from
> https://patchwork.freedesktop.org/series/148926/
> Thay are added only for compilation and does not
> require review.
> ---
> drivers/gpu/drm/xe/regs/xe_pmt.h | 5 +++++
> drivers/gpu/drm/xe/xe_vsec.c | 2 +-
> drivers/gpu/drm/xe/xe_vsec.h | 5 +++++
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/regs/xe_pmt.h b/drivers/gpu/drm/xe/regs/xe_pmt.h
> index f45abcd96ba8..b1d4504e4adc 100644
> --- a/drivers/gpu/drm/xe/regs/xe_pmt.h
> +++ b/drivers/gpu/drm/xe/regs/xe_pmt.h
> @@ -10,6 +10,11 @@
> #define BMG_PMT_BASE_OFFSET 0xDB000
> #define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE_OFFSET)
>
> +#define PUNIT_TELEMETRY_GUID XE_REG(BMG_DISCOVERY_OFFSET + 0x4)
> +#define BMG_ENERGY_STATUS_PMT_OFFSET (0x30)
> +#define ENERGY_PKG REG_GENMASK64(31, 0)
> +#define ENERGY_CARD REG_GENMASK64(63, 32)
> +
> #define BMG_TELEMETRY_BASE_OFFSET 0xE0000
> #define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE_OFFSET)
>
> diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
> index b378848d3b7b..a46e9580b1f4 100644
> --- a/drivers/gpu/drm/xe/xe_vsec.c
> +++ b/drivers/gpu/drm/xe/xe_vsec.c
> @@ -149,7 +149,7 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset)
> return 0;
> }
>
> -static int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
> u32 count)
> {
> struct xe_device *xe = pdev_to_xe_device(pdev);
> diff --git a/drivers/gpu/drm/xe/xe_vsec.h b/drivers/gpu/drm/xe/xe_vsec.h
> index 5777c53faec2..6184b875e4b1 100644
> --- a/drivers/gpu/drm/xe/xe_vsec.h
> +++ b/drivers/gpu/drm/xe/xe_vsec.h
> @@ -4,8 +4,13 @@
> #ifndef _XE_VSEC_H_
> #define _XE_VSEC_H_
>
> +#include "linux/types.h"
> +#include "linux/pci.h"
> +
Please address the reviews [1].
BR,
Jani.
[1] https://lore.kernel.org/r/87ikmcvfzd.fsf@intel.com
> struct xe_device;
>
> void xe_vsec_init(struct xe_device *xe);
> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
> + u32 count);
>
> #endif
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
2025-05-14 8:07 ` [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter Soham Purkait
2025-05-14 8:44 ` Gupta, Anshuman
@ 2025-05-14 11:07 ` Riana Tauro
1 sibling, 0 replies; 14+ messages in thread
From: Riana Tauro @ 2025-05-14 11:07 UTC (permalink / raw)
To: Soham Purkait, intel-xe, anshuman.gupta, badal.nilawar,
karthik.poosa
Cc: lucas.demarchi, ashutosh.dixit
Hi Soham
On 5/14/2025 1:37 PM, Soham Purkait wrote:
> Add a debugfs node named g8_residency in order to obtain the G8
> residency counter value.
If this can be read by PMT, why a debugfs again?
>
> Signed-off-by: Soham Purkait <soham.purkait@intel.com>
> ---
> drivers/gpu/drm/xe/xe_debugfs.c | 37 +++++++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_debugfs.h | 2 ++
> 2 files changed, 39 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index d0503959a8ed..f9ab6a03af29 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -11,16 +11,19 @@
>
> #include <drm/drm_debugfs.h>
>
> +#include "regs/xe_pmt.h"
> #include "xe_bo.h"
> #include "xe_device.h"
> #include "xe_force_wake.h"
> #include "xe_gt_debugfs.h"
> #include "xe_gt_printk.h"
> #include "xe_guc_ads.h"
> +#include "xe_mmio.h"
> #include "xe_pm.h"
> #include "xe_pxp_debugfs.h"
> #include "xe_sriov.h"
> #include "xe_step.h"
> +#include "xe_vsec.h"
>
> #ifdef CONFIG_DRM_XE_DEBUG
> #include "xe_bo_evict.h"
> @@ -185,12 +188,43 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
> return size;
> }
> > +static ssize_t g8_residency_show(struct file *f, char __user *ubuf,
> + size_t size, loff_t *pos)
> +{
> + u64 reg_val;
> + char buf[32];
> + int len = 0;
> + int ret = 0;
> + struct xe_device *xe;
> + struct xe_mmio *mmio;
> +
> + xe = file_inode(f)->i_private;
runtime_get/put missing
> + mmio = xe_root_tile_mmio(xe);
> + ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
> + xe_mmio_read32(mmio, PUNIT_TELEMETRY_GUID),
> + ®_val,
> + BMG_G8_RESIDENCY_OFFSET,
> + sizeof(reg_val));
error needs to be handled?
> +
> + drm_warn(&xe->drm, "G8 Residency read from mbx 0x%016llx, ret %d\n",
> + reg_val, ret);
warn gets flagged in CI. Remove this
> +
> + len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
> +
> + return simple_read_from_buffer(ubuf, size, pos, buf, len);
> +}
> +
> static const struct file_operations wedged_mode_fops = {
> .owner = THIS_MODULE,
> .read = wedged_mode_show,
> .write = wedged_mode_set,
> };
>
> +static const struct file_operations g8_residency_fops = {
> + .owner = THIS_MODULE,
> + .read = g8_residency_show,
> +};
> +
> void xe_debugfs_register(struct xe_device *xe)
> {
> struct ttm_device *bdev = &xe->ttm;
> @@ -211,6 +245,9 @@ void xe_debugfs_register(struct xe_device *xe)
> debugfs_create_file("wedged_mode", 0600, root, xe,
> &wedged_mode_fops);
>
> + debugfs_create_file("g8_residency", 0444, root, xe,
> + &g8_residency_fops);
Since there are multiple residency files they can be under one folder
maybe (/sys/kernel/debug/gtidle/) similar to the sysfs
> +
> for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) {
> man = ttm_manager_type(bdev, mem_type);
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
> index 17f4c2f1b5e4..86868a3cd379 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.h
> +++ b/drivers/gpu/drm/xe/xe_debugfs.h
> @@ -8,6 +8,8 @@
>
> struct xe_device;
>
> +#define BMG_G8_RESIDENCY_OFFSET (0x540)
These should be in same file as register
Thanks
Riana> +
> #ifdef CONFIG_DEBUG_FS
> void xe_debugfs_register(struct xe_device *xe);
> #else
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods residency counter
2025-05-14 8:07 ` [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods " Soham Purkait
@ 2025-05-14 11:10 ` Riana Tauro
0 siblings, 0 replies; 14+ messages in thread
From: Riana Tauro @ 2025-05-14 11:10 UTC (permalink / raw)
To: Soham Purkait, intel-xe, anshuman.gupta, badal.nilawar,
karthik.poosa
Cc: lucas.demarchi, ashutosh.dixit
Hi Soham
On 5/14/2025 1:37 PM, Soham Purkait wrote:
> Add a debugfs node named mods_residency in order to obtain the ModS
> residency counter value.
>
> Signed-off-by: Soham Purkait <soham.purkait@intel.com>
> ---
> drivers/gpu/drm/xe/xe_debugfs.c | 34 +++++++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_debugfs.h | 1 +
> 2 files changed, 35 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index 66eab5528b92..240cb73800ae 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -238,6 +238,32 @@ static ssize_t g10_residency_show(struct file *f, char __user *ubuf,
> return simple_read_from_buffer(ubuf, size, pos, buf, len);
> }
>
> +static ssize_t mods_residency_show(struct file *f, char __user *ubuf,
> + size_t size, loff_t *pos)
> +{
> + u64 reg_val;
> + char buf[32];
> + int len = 0;
> + int ret = 0;
> + struct xe_device *xe;
> + struct xe_mmio *mmio;
> +
> + xe = file_inode(f)->i_private;
> + mmio = xe_root_tile_mmio(xe);
> + ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
> + xe_mmio_read32(mmio, PUNIT_TELEMETRY_GUID),
> + ®_val,
> + BMG_MODS_RESIDENCY_OFFSET,
> + sizeof(reg_val));
> +
You can have a helper function since all three entries have similar code
with offset as parameter. the patches can also be squashed
Thanks
Riana
> + drm_warn(&xe->drm, "ModS Residency read from mbx 0x%016llx, ret %d\n",
> + reg_val, ret);
> +
> + len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
> +
> + return simple_read_from_buffer(ubuf, size, pos, buf, len);
> +}
> +
> static const struct file_operations wedged_mode_fops = {
> .owner = THIS_MODULE,
> .read = wedged_mode_show,
> @@ -254,6 +280,11 @@ static const struct file_operations g10_residency_fops = {
> .read = g10_residency_show,
> };
>
> +static const struct file_operations mods_residency_fops = {
> + .owner = THIS_MODULE,
> + .read = mods_residency_show,
> +};
> +
> void xe_debugfs_register(struct xe_device *xe)
> {
> struct ttm_device *bdev = &xe->ttm;
> @@ -279,6 +310,9 @@ void xe_debugfs_register(struct xe_device *xe)
>
> debugfs_create_file("g10_residency", 0444, root, xe,
> &g10_residency_fops);
> +
> + debugfs_create_file("mods_residency", 0444, root, xe,
> + &mods_residency_fops);
>
> for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) {
> man = ttm_manager_type(bdev, mem_type);
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
> index 27fbb8d46471..55ef13662fec 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.h
> +++ b/drivers/gpu/drm/xe/xe_debugfs.h
> @@ -10,6 +10,7 @@ struct xe_device;
>
> #define BMG_G8_RESIDENCY_OFFSET (0x540)
> #define BMG_G10_RESIDENCY_OFFSET (0x548)
> +#define BMG_MODS_RESIDENCY_OFFSET (0x4D0)
>
> #ifdef CONFIG_DEBUG_FS
> void xe_debugfs_register(struct xe_device *xe);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
2025-05-14 8:44 ` Gupta, Anshuman
@ 2025-05-14 16:27 ` Rodrigo Vivi
0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Vivi @ 2025-05-14 16:27 UTC (permalink / raw)
To: Gupta, Anshuman
Cc: Purkait, Soham, intel-xe@lists.freedesktop.org, Nilawar, Badal,
Poosa, Karthik, De Marchi, Lucas, Dixit, Ashutosh, Tauro, Riana
On Wed, May 14, 2025 at 04:44:14AM -0400, Gupta, Anshuman wrote:
>
>
> > -----Original Message-----
> > From: Purkait, Soham <soham.purkait@intel.com>
> > Sent: Wednesday, May 14, 2025 1:37 PM
> > To: intel-xe@lists.freedesktop.org; Gupta, Anshuman
> > <anshuman.gupta@intel.com>; Nilawar, Badal <badal.nilawar@intel.com>;
> > Poosa, Karthik <karthik.poosa@intel.com>
> > Cc: De Marchi, Lucas <lucas.demarchi@intel.com>; Purkait, Soham
> > <soham.purkait@intel.com>; Dixit, Ashutosh <ashutosh.dixit@intel.com>;
> > Tauro, Riana <riana.tauro@intel.com>
> > Subject: [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter
> >
> > Add a debugfs node named g8_residency in order to obtain the G8 residency
> > counter value.
> IMO better to expose all such residencies under a debugfs called dgfx_pkgc_residencies
> CC @Vivi, Rodrigo for naming suggestion.
> Context: This is similar to cpu PC8~PC10 residencies. i.e /sys/kernel/debug/pmc_core/package_cstate_show
I'm with Anshuman here. I'm bad with naming though.
Perhaps dgfx_package_cstate_show ?
And format something like this as well:
$ sudo cat /sys/kernel/debug/pmc_core/package_cstate_show
Package C2 : 3250051350
Package C3 : 19056503
Package C6 : 929010443
Package C7 : 0
Package C8 : 2718
Package C9 : 0
Package C10 : 0
But of course, just adding the ones that are relevant to us.
And dgfx_pkgc_residencies also works for me... no preference to either one
>
> Thanks,
> Anshuman.
> >
> > Signed-off-by: Soham Purkait <soham.purkait@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_debugfs.c | 37
> > +++++++++++++++++++++++++++++++++
> > drivers/gpu/drm/xe/xe_debugfs.h | 2 ++
> > 2 files changed, 39 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_debugfs.c
> > b/drivers/gpu/drm/xe/xe_debugfs.c index d0503959a8ed..f9ab6a03af29
> > 100644
> > --- a/drivers/gpu/drm/xe/xe_debugfs.c
> > +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> > @@ -11,16 +11,19 @@
> >
> > #include <drm/drm_debugfs.h>
> >
> > +#include "regs/xe_pmt.h"
> > #include "xe_bo.h"
> > #include "xe_device.h"
> > #include "xe_force_wake.h"
> > #include "xe_gt_debugfs.h"
> > #include "xe_gt_printk.h"
> > #include "xe_guc_ads.h"
> > +#include "xe_mmio.h"
> > #include "xe_pm.h"
> > #include "xe_pxp_debugfs.h"
> > #include "xe_sriov.h"
> > #include "xe_step.h"
> > +#include "xe_vsec.h"
> >
> > #ifdef CONFIG_DRM_XE_DEBUG
> > #include "xe_bo_evict.h"
> > @@ -185,12 +188,43 @@ static ssize_t wedged_mode_set(struct file *f,
> > const char __user *ubuf,
> > return size;
> > }
> >
> > +static ssize_t g8_residency_show(struct file *f, char __user *ubuf,
> > + size_t size, loff_t *pos)
> > +{
> > + u64 reg_val;
> > + char buf[32];
> > + int len = 0;
> > + int ret = 0;
> > + struct xe_device *xe;
> > + struct xe_mmio *mmio;
> > +
> > + xe = file_inode(f)->i_private;
> > + mmio = xe_root_tile_mmio(xe);
> > + ret = xe_pmt_telem_read(to_pci_dev(xe->drm.dev),
> > + xe_mmio_read32(mmio,
> > PUNIT_TELEMETRY_GUID),
> > + ®_val,
> > + BMG_G8_RESIDENCY_OFFSET,
> > + sizeof(reg_val));
> > +
> > + drm_warn(&xe->drm, "G8 Residency read from mbx 0x%016llx, ret
> > %d\n",
> > + reg_val, ret);
> > +
> > + len = scnprintf(buf, sizeof(buf), "%llu\n", reg_val);
> > +
> > + return simple_read_from_buffer(ubuf, size, pos, buf, len); }
> > +
> > static const struct file_operations wedged_mode_fops = {
> > .owner = THIS_MODULE,
> > .read = wedged_mode_show,
> > .write = wedged_mode_set,
> > };
> >
> > +static const struct file_operations g8_residency_fops = {
> > + .owner = THIS_MODULE,
> > + .read = g8_residency_show,
> > +};
> > +
> > void xe_debugfs_register(struct xe_device *xe) {
> > struct ttm_device *bdev = &xe->ttm;
> > @@ -211,6 +245,9 @@ void xe_debugfs_register(struct xe_device *xe)
> > debugfs_create_file("wedged_mode", 0600, root, xe,
> > &wedged_mode_fops);
> >
> > + debugfs_create_file("g8_residency", 0444, root, xe,
> > + &g8_residency_fops);
> > +
> > for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1;
> > ++mem_type) {
> > man = ttm_manager_type(bdev, mem_type);
> >
> > diff --git a/drivers/gpu/drm/xe/xe_debugfs.h
> > b/drivers/gpu/drm/xe/xe_debugfs.h index 17f4c2f1b5e4..86868a3cd379
> > 100644
> > --- a/drivers/gpu/drm/xe/xe_debugfs.h
> > +++ b/drivers/gpu/drm/xe/xe_debugfs.h
> > @@ -8,6 +8,8 @@
> >
> > struct xe_device;
> >
> > +#define BMG_G8_RESIDENCY_OFFSET (0x540)
> > +
> > #ifdef CONFIG_DEBUG_FS
> > void xe_debugfs_register(struct xe_device *xe); #else
> > --
> > 2.34.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Utility function and macro for telemetry reading
2025-05-14 9:27 ` Jani Nikula
@ 2025-05-14 17:06 ` Poosa, Karthik
2025-05-14 17:18 ` Jani Nikula
0 siblings, 1 reply; 14+ messages in thread
From: Poosa, Karthik @ 2025-05-14 17:06 UTC (permalink / raw)
To: Jani Nikula, Soham Purkait, intel-xe, anshuman.gupta,
badal.nilawar
Cc: lucas.demarchi, ashutosh.dixit, riana.tauro
On 14-05-2025 14:57, Jani Nikula wrote:
> On Wed, 14 May 2025, Soham Purkait <soham.purkait@intel.com> wrote:
>> The changes in this patch is taken from
>> https://patchwork.freedesktop.org/series/148926/
>> Thay are added only for compilation and does not
>> require review.
>> ---
>> drivers/gpu/drm/xe/regs/xe_pmt.h | 5 +++++
>> drivers/gpu/drm/xe/xe_vsec.c | 2 +-
>> drivers/gpu/drm/xe/xe_vsec.h | 5 +++++
>> 3 files changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/regs/xe_pmt.h b/drivers/gpu/drm/xe/regs/xe_pmt.h
>> index f45abcd96ba8..b1d4504e4adc 100644
>> --- a/drivers/gpu/drm/xe/regs/xe_pmt.h
>> +++ b/drivers/gpu/drm/xe/regs/xe_pmt.h
>> @@ -10,6 +10,11 @@
>> #define BMG_PMT_BASE_OFFSET 0xDB000
>> #define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE_OFFSET)
>>
>> +#define PUNIT_TELEMETRY_GUID XE_REG(BMG_DISCOVERY_OFFSET + 0x4)
>> +#define BMG_ENERGY_STATUS_PMT_OFFSET (0x30)
>> +#define ENERGY_PKG REG_GENMASK64(31, 0)
>> +#define ENERGY_CARD REG_GENMASK64(63, 32)
>> +
>> #define BMG_TELEMETRY_BASE_OFFSET 0xE0000
>> #define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE_OFFSET)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
>> index b378848d3b7b..a46e9580b1f4 100644
>> --- a/drivers/gpu/drm/xe/xe_vsec.c
>> +++ b/drivers/gpu/drm/xe/xe_vsec.c
>> @@ -149,7 +149,7 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset)
>> return 0;
>> }
>>
>> -static int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>> u32 count)
>> {
>> struct xe_device *xe = pdev_to_xe_device(pdev);
>> diff --git a/drivers/gpu/drm/xe/xe_vsec.h b/drivers/gpu/drm/xe/xe_vsec.h
>> index 5777c53faec2..6184b875e4b1 100644
>> --- a/drivers/gpu/drm/xe/xe_vsec.h
>> +++ b/drivers/gpu/drm/xe/xe_vsec.h
>> @@ -4,8 +4,13 @@
>> #ifndef _XE_VSEC_H_
>> #define _XE_VSEC_H_
>>
>> +#include "linux/types.h"
>> +#include "linux/pci.h"
>> +
> Please address the reviews [1].
>
> BR,
> Jani.
These are addressed here Jani,
https://patchwork.freedesktop.org/patch/653146/?series=148926&rev=2
>
>
> [1] https://lore.kernel.org/r/87ikmcvfzd.fsf@intel.com
>
>
>
>> struct xe_device;
>>
>> void xe_vsec_init(struct xe_device *xe);
>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>> + u32 count);
>>
>> #endif
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Utility function and macro for telemetry reading
2025-05-14 17:06 ` Poosa, Karthik
@ 2025-05-14 17:18 ` Jani Nikula
0 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2025-05-14 17:18 UTC (permalink / raw)
To: Poosa, Karthik, Soham Purkait, intel-xe, anshuman.gupta,
badal.nilawar
Cc: lucas.demarchi, ashutosh.dixit, riana.tauro
On Wed, 14 May 2025, "Poosa, Karthik" <karthik.poosa@intel.com> wrote:
> On 14-05-2025 14:57, Jani Nikula wrote:
>> On Wed, 14 May 2025, Soham Purkait <soham.purkait@intel.com> wrote:
>>> The changes in this patch is taken from
>>> https://patchwork.freedesktop.org/series/148926/
>>> Thay are added only for compilation and does not
>>> require review.
>>> ---
>>> drivers/gpu/drm/xe/regs/xe_pmt.h | 5 +++++
>>> drivers/gpu/drm/xe/xe_vsec.c | 2 +-
>>> drivers/gpu/drm/xe/xe_vsec.h | 5 +++++
>>> 3 files changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/regs/xe_pmt.h b/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> index f45abcd96ba8..b1d4504e4adc 100644
>>> --- a/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> +++ b/drivers/gpu/drm/xe/regs/xe_pmt.h
>>> @@ -10,6 +10,11 @@
>>> #define BMG_PMT_BASE_OFFSET 0xDB000
>>> #define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE_OFFSET)
>>>
>>> +#define PUNIT_TELEMETRY_GUID XE_REG(BMG_DISCOVERY_OFFSET + 0x4)
>>> +#define BMG_ENERGY_STATUS_PMT_OFFSET (0x30)
>>> +#define ENERGY_PKG REG_GENMASK64(31, 0)
>>> +#define ENERGY_CARD REG_GENMASK64(63, 32)
>>> +
>>> #define BMG_TELEMETRY_BASE_OFFSET 0xE0000
>>> #define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE_OFFSET)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
>>> index b378848d3b7b..a46e9580b1f4 100644
>>> --- a/drivers/gpu/drm/xe/xe_vsec.c
>>> +++ b/drivers/gpu/drm/xe/xe_vsec.c
>>> @@ -149,7 +149,7 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset)
>>> return 0;
>>> }
>>>
>>> -static int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> u32 count)
>>> {
>>> struct xe_device *xe = pdev_to_xe_device(pdev);
>>> diff --git a/drivers/gpu/drm/xe/xe_vsec.h b/drivers/gpu/drm/xe/xe_vsec.h
>>> index 5777c53faec2..6184b875e4b1 100644
>>> --- a/drivers/gpu/drm/xe/xe_vsec.h
>>> +++ b/drivers/gpu/drm/xe/xe_vsec.h
>>> @@ -4,8 +4,13 @@
>>> #ifndef _XE_VSEC_H_
>>> #define _XE_VSEC_H_
>>>
>>> +#include "linux/types.h"
>>> +#include "linux/pci.h"
>>> +
>> Please address the reviews [1].
>>
>> BR,
>> Jani.
>
> These are addressed here Jani,
>
> https://patchwork.freedesktop.org/patch/653146/?series=148926&rev=2
Please sort this out between you and Soham. This is clearly conflicting
stuff, sent *after* the above.
BR,
Jani.
>>
>>
>> [1] https://lore.kernel.org/r/87ikmcvfzd.fsf@intel.com
>>
>>
>>
>>> struct xe_device;
>>>
>>> void xe_vsec_init(struct xe_device *xe);
>>> +int xe_pmt_telem_read(struct pci_dev *pdev, u32 guid, u64 *data, loff_t user_offset,
>>> + u32 count);
>>>
>>> #endif
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 14+ messages in thread
* ✗ CI.Patch_applied: failure for Add debugfs to expose G8, G10 and ModS residency
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
` (3 preceding siblings ...)
2025-05-14 8:07 ` [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods " Soham Purkait
@ 2025-05-14 21:16 ` Patchwork
2025-05-27 0:53 ` Patchwork
5 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2025-05-14 21:16 UTC (permalink / raw)
To: Soham Purkait; +Cc: intel-xe
== Series Details ==
Series: Add debugfs to expose G8, G10 and ModS residency
URL : https://patchwork.freedesktop.org/series/149001/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 3d6670fab64c drm-tip: 2025y-05m-14d-19h-28m-21s UTC integration manifest
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_debugfs.c:185
error: drivers/gpu/drm/xe/xe_debugfs.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: Utility function and macro for telemetry reading
Applying: drm/xe/xe_debugfs: Exposure of G8 residency counter
Patch failed at 0002 drm/xe/xe_debugfs: Exposure of G8 residency counter
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 14+ messages in thread
* ✗ CI.Patch_applied: failure for Add debugfs to expose G8, G10 and ModS residency
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
` (4 preceding siblings ...)
2025-05-14 21:16 ` ✗ CI.Patch_applied: failure for Add debugfs to expose G8, G10 and ModS residency Patchwork
@ 2025-05-27 0:53 ` Patchwork
5 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2025-05-27 0:53 UTC (permalink / raw)
To: Soham Purkait; +Cc: intel-xe
== Series Details ==
Series: Add debugfs to expose G8, G10 and ModS residency
URL : https://patchwork.freedesktop.org/series/149001/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 3e019cc3eaff drm-tip: 2025y-05m-26d-14h-49m-23s UTC integration manifest
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_debugfs.c:185
error: drivers/gpu/drm/xe/xe_debugfs.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: Utility function and macro for telemetry reading
Applying: drm/xe/xe_debugfs: Exposure of G8 residency counter
Patch failed at 0002 drm/xe/xe_debugfs: Exposure of G8 residency counter
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-05-27 0:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 8:07 [PATCH 0/4] Add debugfs to expose G8, G10 and ModS residency Soham Purkait
2025-05-14 8:07 ` [PATCH 1/4] Utility function and macro for telemetry reading Soham Purkait
2025-05-14 9:27 ` Jani Nikula
2025-05-14 17:06 ` Poosa, Karthik
2025-05-14 17:18 ` Jani Nikula
2025-05-14 8:07 ` [PATCH 2/4] drm/xe/xe_debugfs: Exposure of G8 residency counter Soham Purkait
2025-05-14 8:44 ` Gupta, Anshuman
2025-05-14 16:27 ` Rodrigo Vivi
2025-05-14 11:07 ` Riana Tauro
2025-05-14 8:07 ` [PATCH 3/4] drm/xe/xe_debugfs: Exposure of G10 " Soham Purkait
2025-05-14 8:07 ` [PATCH 4/4] drm/xe/xe_debugfs: Exposure of Mods " Soham Purkait
2025-05-14 11:10 ` Riana Tauro
2025-05-14 21:16 ` ✗ CI.Patch_applied: failure for Add debugfs to expose G8, G10 and ModS residency Patchwork
2025-05-27 0:53 ` Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox