Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v7 4/4] drm/xe/hwmon: Expose individual VRAM channel temperature
Date: Mon, 19 Jan 2026 20:00:56 +0530	[thread overview]
Message-ID: <232d8896-2ea3-4754-a100-b18cec70c57a@intel.com> (raw)
In-Reply-To: <578876ef-3d8c-4eff-8853-32d00b81eafc@intel.com>

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


On 15-01-2026 14:57, Poosa, Karthik wrote:
>
>
> On 14-01-2026 13:00, Raag Jadav wrote:
>> On Tue, Jan 13, 2026 at 03:28:51PM +0530, Poosa, Karthik wrote:
>>> On 13-01-2026 13:51, Raag Jadav wrote:
>>>> On Tue, Jan 13, 2026 at 02:05:21AM +0530, Karthik Poosa wrote:
>>>>> Expose individual VRAM temperature attributes.
>>>>> Update Xe hwmon documentation for this entry.
>>>> ...
>>>>
>>>>> @@ -255,6 +264,8 @@ static struct xe_reg xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg
>>>>>    				return BMG_PACKAGE_TEMPERATURE;
>>>>>    			else if (channel == CHANNEL_VRAM)
>>>>>    				return BMG_VRAM_TEMPERATURE;
>>>>> +			else if (in_range(channel, CHANNEL_VRAM_N, CHANNEL_VRAM_N_MAX))
>>>> I think this should be
>>>>
>>>> 	if (in_range(channel, CHANNEL_VRAM_N, MAX_VRAM_CHANNELS))
>>>>
>>>> or did I miss something?
>>> I’ve ran IGT hwmon test and lm-sensors and didn't see any discrepancies
>>> there, all available channels are seen.
>> Sure, but shouldn't we fix the buggy logic?
>>
>> Raag
> I shall address this. We didn’t observe any issue during verification 
> because there are no new channels beyond VRAM_N.
> I’ll raise a patch for this.

Actually CHANNEL_VRAM_N_MAX needs correction,

Raised https://patchwork.freedesktop.org/series/160302/ for this

>>>>> +				return BMG_VRAM_TEMPERATURE_N(channel - CHANNEL_VRAM_N);
>>>>>    		} else if (xe->info.platform == XE_DG2) {
>>>>>    			if (channel == CHANNEL_PKG)
>>>>>    				return PCU_CR_PACKAGE_TEMPERATURE;
>>>> ...
>>>>
>>>>> @@ -1353,6 +1415,8 @@ static int xe_hwmon_read_label(struct device *dev,
>>>>>    			       enum hwmon_sensor_types type,
>>>>>    			       u32 attr, int channel, const char **str)
>>>>>    {
>>>>> +	struct xe_hwmon *hwmon = dev_get_drvdata(dev);
>>>>> +
>>>>>    	switch (type) {
>>>>>    	case hwmon_temp:
>>>>>    		if (channel == CHANNEL_PKG)
>>>>> @@ -1363,6 +1427,8 @@ static int xe_hwmon_read_label(struct device *dev,
>>>>>    			*str = "mctrl";
>>>>>    		else if (channel == CHANNEL_PCIE)
>>>>>    			*str = "pcie";
>>>>> +		else if (in_range(channel, CHANNEL_VRAM_N, CHANNEL_VRAM_N_MAX))
>>>> Ditto.
>>>>
>>>> Raag
>>>>
>>>>> +			*str = hwmon->temp.vram_label[channel - CHANNEL_VRAM_N];
>>>>>    		return 0;
>>>>>    	case hwmon_power:
>>>>>    	case hwmon_energy:
>>>>> -- 
>>>>> 2.25.1
>>>>>

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

  reply	other threads:[~2026-01-19 14:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 20:35 [PATCH v7 0/4] drm/xe/hwmon: Expose new temperature attributes Karthik Poosa
2026-01-12 20:35 ` [PATCH v7 1/4] drm/xe/hwmon: Expose temperature limits Karthik Poosa
2026-01-12 20:35 ` [PATCH v7 2/4] drm/xe/hwmon: Expose memory controller temperature Karthik Poosa
2026-01-12 20:35 ` [PATCH v7 3/4] drm/xe/hwmon: Expose GPU PCIe temperature Karthik Poosa
2026-01-12 20:35 ` [PATCH v7 4/4] drm/xe/hwmon: Expose individual VRAM channel temperature Karthik Poosa
2026-01-13  8:21   ` Raag Jadav
2026-01-13  9:58     ` Poosa, Karthik
2026-01-14  7:30       ` Raag Jadav
2026-01-15  9:27         ` Poosa, Karthik
2026-01-19 14:30           ` Poosa, Karthik [this message]
2026-01-12 20:36 ` ✓ CI.KUnit: success for drm/xe/hwmon: Expose new temperature attributes (rev9) Patchwork
2026-01-12 21:12 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-13  4:01 ` ✗ Xe.CI.Full: failure " 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=232d8896-2ea3-4754-a100-b18cec70c57a@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@intel.com \
    --cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox