2
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
MAX_VRAM_CHANNELS
with in_range() is correct, as it requires
a start value and length.CHANNEL_VRAM_N_MAX instead would pass offset which
also includes extra offsets from CHANNEL_CARD to CHANNEL_PCIe.CHANNEL_MAX, }; -- 2.25.1