2

On 20-01-2026 19:08, Raag Jadav wrote:
On Mon, Jan 19, 2026 at 08:01:38PM +0530, Karthik Poosa wrote:
Remove the unnecessary VRAM channel entry introduced in
xe_hwmon_channel. Without this, adding any new hwmon channel
causes an extra VRAM channel to appear. This remained unnoticed
earlier because VRAM was the final xe hwmon channel.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Fixes: 49a498338417 ("drm/xe/hwmon: Expose individual VRAM channel temperature")
---
 drivers/gpu/drm/xe/xe_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index baf277955b33..f614f1308dec 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -48,7 +48,7 @@ enum xe_hwmon_channel {
 	CHANNEL_MCTRL,
 	CHANNEL_PCIE,
 	CHANNEL_VRAM_N,
-	CHANNEL_VRAM_N_MAX = CHANNEL_VRAM_N + MAX_VRAM_CHANNELS,
+	CHANNEL_VRAM_N_MAX = CHANNEL_VRAM_N + MAX_VRAM_CHANNELS - 1,
Can you also check in_range() logic and investigate how channel id greater
than CHANNEL_VRAM_N_MAX (for example 23) is delt with?

Raag
Hi Raag,

We are not seeing new channels with in_range() + CHANNEL_VRAM_N_MAX as
1. hwmon_info[] has defined only CHANNEL_VRAM_N_MAX channels,
2. CHANNEL_VRAM_N_MAX is the max channel supported in xe_hwmon.c
Checked in_range implementation also, you are right, using MAX_VRAM_CHANNELS with in_range() is correct, as it requires a start value and length.
Using CHANNEL_VRAM_N_MAX instead would pass offset which also includes extra offsets from CHANNEL_CARD to CHANNEL_PCIe.

I will use MAX_VRAM_CHANNELS with in_range in the next revision.

 	CHANNEL_MAX,
 };
 
-- 
2.25.1