Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v5 10/13] drm/xe/hwmon: use CRI-specific package and VRAM temperature registers
Date: Thu, 24 Sep 2026 19:11:55 +0530	[thread overview]
Message-ID: <5da9fbd6-ae49-47e0-af17-3463e9a906c7@intel.com> (raw)
In-Reply-To: <20260924112755.7399E1F00893@smtp.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2469 bytes --]


On 24-09-2026 16:57, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] drm/xe/hwmon: incorrect BMG register used for CRI per-VRAM channel temperatures
> --
>
> commit 8d77f2708804f58e62723e17d986cd5eb1877de7
> Author: Karthik Poosa<karthik.poosa@intel.com>
>
> drm/xe/hwmon: use CRI-specific package and VRAM temperature registers
>
> This commit updates the hardware monitoring register accesses to use
> Crescent Island (CRI) specific MMIO offsets for package and VRAM
> temperatures, as they differ from Battlemage offsets.
>
>> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
>> index 1b587bd9487e1..e1cff5700e7f9 100644
>> --- a/drivers/gpu/drm/xe/xe_hwmon.c
>> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
>> @@ -293,7 +293,15 @@ static struct xe_reg xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg
>>   
>>   	switch (hwmon_reg) {
>>   	case REG_TEMP:
>> -		if (xe->info.platform == XE_BATTLEMAGE || xe->info.platform == XE_CRESCENTISLAND) {
>> +		if (xe->info.platform == XE_CRESCENTISLAND) {
>> +			if (channel == CHANNEL_PKG)
>> +				return CRI_PACKAGE_TEMPERATURE;
>> +			else if (channel == CHANNEL_VRAM)
>> +				return CRI_VRAM_TEMPERATURE;
>> +			else if (in_range(channel, CHANNEL_VRAM_N, hwmon->temp.vram_count) &&
>> +				 xe_hwmon_vram_channel_enabled(hwmon, channel - CHANNEL_VRAM_N))
>> +				return BMG_VRAM_TEMPERATURE_N(channel - CHANNEL_VRAM_N);
> [Severity: Medium]
> Does Crescent Island actually use the Battlemage register offset for
> per-channel VRAM temperatures?
>
> If a monitoring daemon reads a sysfs temperature attribute corresponding
> to a specific VRAM channel (e.g., temp3_input mapping to CHANNEL_VRAM_N)
> on a Crescent Island device, xe_hwmon_get_reg() will return the
> BMG_VRAM_TEMPERATURE_N macro in the XE_CRESCENTISLAND branch.
>
> The commit message explicitly notes that Crescent Island uses different MMIO
> offsets for package and VRAM temperatures. While the aggregate CHANNEL_PKG
> and CHANNEL_VRAM cases were updated to use the new CRI_ macros, the
> CHANNEL_VRAM_N fallback still uses the BMG_VRAM_TEMPERATURE_N macro.
>
> Will this cause hardware monitoring tools to read incorrect temperature data
> for individual VRAM channels on Crescent Island since it accesses the
> Battlemage MMIO offset?
>
>
CRI VRAM individual temperature offset is different, I shall at 
CRI_VRAM_TEMPERATURE_N for it.

[-- Attachment #2: Type: text/html, Size: 3249 bytes --]

  reply	other threads:[~2026-09-24 13:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 11:11 [PATCH v5 00/13] drm/xe/hwmon: Update hwmon thermal mailbox Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 01/13] drm/xe/hwmon: Handle pcode read failures of xe_hwmon_pcode_rmw_power_limit Karthik Poosa
2026-09-24 11:23   ` sashiko-bot
2026-09-24 14:26     ` Poosa, Karthik
2026-09-24 11:11 ` [PATCH v5 02/13] drm/xe/hwmon: Decode mailbox temperature as sign-magnitude Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 03/13] drm/xe/hwmon: Fix memory controller thermal data handling Karthik Poosa
2026-09-24 11:24   ` sashiko-bot
2026-09-24 11:11 ` [PATCH v5 04/13] drm/xe/hwmon: Add helpers to validate thermal sensor readings Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 05/13] drm/xe/hwmon: Handle unavailable memory controller sensors Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 06/13] drm/xe/hwmon: Detect unavailable PCIe thermal sensors Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 07/13] drm/xe/hwmon: Consolidate temperature sensor availability checks Karthik Poosa
2026-09-24 11:24   ` sashiko-bot
2026-09-24 13:16     ` Poosa, Karthik
2026-09-24 11:11 ` [PATCH v5 08/13] drm/xe/hwmon: Cache temperature availability to reduce probe time Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 09/13] drm/xe/hwmon: Add platform-aware VRAM thermal channel support Karthik Poosa
2026-09-24 11:24   ` sashiko-bot
2026-09-24 13:40     ` Poosa, Karthik
2026-09-24 11:11 ` [PATCH v5 10/13] drm/xe/hwmon: use CRI-specific package and VRAM temperature registers Karthik Poosa
2026-09-24 11:27   ` sashiko-bot
2026-09-24 13:41     ` Poosa, Karthik [this message]
2026-09-24 11:11 ` [PATCH v5 11/13] drm/xe/hwmon: Decode CRI temperature registers as IEEE-754 Karthik Poosa
2026-09-24 11:27   ` sashiko-bot
2026-09-24 11:11 ` [PATCH v5 12/13] drm/xe/hwmon: Update memory controller temperature offset for CRI Karthik Poosa
2026-09-24 11:11 ` [PATCH v5 13/13] drm/xe/hwmon: Update PCIE temperature sensor " Karthik Poosa
2026-09-24 11:40 ` ✓ CI.KUnit: success for drm/xe/hwmon: Update hwmon thermal mailbox (rev2) Patchwork
2026-09-24 12:56 ` ✓ Xe.CI.BAT: " 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=5da9fbd6-ae49-47e0-af17-3463e9a906c7@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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