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 v9 10/14] drm/xe/hwmon: Add platform-aware VRAM thermal channel support
Date: Sat, 10 Oct 2026 11:09:40 +0530	[thread overview]
Message-ID: <f8b0ca11-e52c-4f31-9faa-5237b04a1b65@intel.com> (raw)
In-Reply-To: <sashiko-outbox-165514@kernel.org>


On 09-10-2026 17:48, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] hwmon: DRM driver implements hwmon directly instead of as auxiliary device
> --
>
> commit 55ff84e7912b9e195885552d6a750a68cc2c19d9
> Author: Karthik Poosa <karthik.poosa@intel.com>
>
> drm/xe/hwmon: Add platform-aware VRAM thermal channel support
>
> On CRI, this derives the number of available VRAM temperature channels from
> the CRI_MSU_VRAM_ENABLE register. It increases the maximum supported VRAM
> channel count to 80 and uses the derived count to control VRAM sensor
> enumeration, channel access, and VRAM label allocation.
>
>> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
>> index bafa175f84578..9d83d9d2286ed 100644
>> --- a/drivers/gpu/drm/xe/xe_hwmon.c
>> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> [ ... ]
>> @@ -1683,7 +1809,9 @@ int xe_hwmon_register(struct xe_device *xe)
>>   	hwmon->xe = xe;
>>   	xe->hwmon = hwmon;
>>   
>> -	xe_hwmon_get_preregistration_info(hwmon);
>> +	ret = xe_hwmon_get_preregistration_info(hwmon);
>> +	if (ret)
>> +		goto err_null_hwmon;
>>   
>>   	drm_dbg(&xe->drm, "Register xe hwmon interface\n");
>>   
>> @@ -1693,10 +1821,14 @@ int xe_hwmon_register(struct xe_device *xe)
>>   								hwmon_groups);
> [Severity: Low]
> The hwmon subsystem guidelines state that if a chip's main functionality
> is not hardware monitoring (such as a DRM controller), its hardware
> monitoring functionality should be implemented as an auxiliary device
> driver residing in drivers/hwmon/.
>
> Does registering the hardware monitoring device directly from within the
> drivers/gpu/drm/ subsystem bypass these structural layering rules?
The hwmon documentation expresses a preference for separating monitoring 
functionality from devices whose primary purpose is not hardware 
monitoring. However, direct hwmon registration from DRM drivers is 
already common practice in the kernel (e.g. amdgpu, nouveau, xe), so the 
proposed approach would be consistent with existing GPU driver 
implementations."

>
>>   	if (IS_ERR(hwmon->hwmon_dev)) {
>>   		drm_err(&xe->drm, "Failed to register xe hwmon (%pe)\n", hwmon->hwmon_dev);
>> -		xe->hwmon = NULL;
>> -		return PTR_ERR(hwmon->hwmon_dev);
>> +		ret = PTR_ERR(hwmon->hwmon_dev);
>> +		goto err_null_hwmon;
>>   	}
>>   
>>   	return 0;
>> +
>> +err_null_hwmon:
>> +	xe->hwmon = NULL;
>> +	return ret;
>>   }
>>   MODULE_IMPORT_NS("INTEL_PMT_TELEMETRY");

  reply	other threads:[~2026-10-10  5:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 12:03 [PATCH v9 00/14] drm/xe/hwmon: Update hwmon thermal mailbox Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 01/14] drm/xe/hwmon: Handle pcode read failures of xe_hwmon_pcode_rmw_power_limit Karthik Poosa
2026-10-09 12:14   ` sashiko-bot
2026-10-10  5:14     ` Poosa, Karthik
2026-10-12 11:09       ` Poosa, Karthik
2026-10-09 12:03 ` [PATCH v9 02/14] drm/xe/hwmon: Decode mailbox temperature as sign-magnitude Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 03/14] drm/xe/hwmon: Fix memory controller thermal data handling Karthik Poosa
2026-10-09 12:15   ` sashiko-bot
2026-10-09 12:03 ` [PATCH v9 04/14] drm/xe/hwmon: Add helpers to validate thermal sensor readings Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 05/14] drm/xe/hwmon: Handle unavailable memory controller sensors Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 06/14] drm/xe/hwmon: Detect unavailable PCIe thermal sensors Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 07/14] drm/xe/hwmon: Consolidate temperature sensor availability checks Karthik Poosa
2026-10-09 12:16   ` sashiko-bot
2026-10-10  5:19     ` Poosa, Karthik
2026-10-12 13:10       ` Poosa, Karthik
2026-10-09 12:03 ` [PATCH v9 08/14] drm/xe/hwmon: Cache temperature availability to reduce probe time Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 09/14] drm/xe/hwmon: use CRI-specific package and VRAM temperature registers Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 10/14] drm/xe/hwmon: Add platform-aware VRAM thermal channel support Karthik Poosa
2026-10-09 12:18   ` sashiko-bot
2026-10-10  5:39     ` Poosa, Karthik [this message]
2026-10-09 12:03 ` [PATCH v9 11/14] drm/xe/hwmon: Decode CRI temperature registers as IEEE-754 Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 12/14] drm/xe/hwmon: Update memory controller temperature offset for CRI Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 13/14] drm/xe/hwmon: add PCIe temperature support " Karthik Poosa
2026-10-09 12:03 ` [PATCH v9 14/14] drm/xe/hwmon: Simplify temperature channels config Karthik Poosa
2026-10-09 12:17 ` ✓ CI.KUnit: success for drm/xe/hwmon: Update hwmon thermal mailbox (rev6) Patchwork
2026-10-09 13:42 ` ✓ 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=f8b0ca11-e52c-4f31-9faa-5237b04a1b65@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