From: sashiko-bot@kernel.org
To: "Zhan Wei" <zhanwei919@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [RFC PATCH] drm/xe/hwmon: report a single fan for DG2 instead of two
Date: Wed, 27 May 2026 12:17:19 +0000 [thread overview]
Message-ID: <20260527121720.5B6161F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260527115311.13398-1-zhanwei919@gmail.com>
> xe_hwmon_pcode_read_fan_control() currently hardcodes *uval = 2 when
> queried with FSC_READ_NUM_FANS on DG2. This causes fan2_input to be
> exposed via sysfs, but on the tested Arc A750 LE (DG2 G10, PCI ID
> 0x56a1) fan2_input reads 0 RPM permanently while fan1_input correctly
> reports ~800 RPM with both physical fan physically spinning.
>
> The RPM is calculated delta-based from a tach pulse counter:
>
> rotations = (reg_val - fi->reg_val_prev) / 2;
>
> so a constant-zero RPM means the register at offset 0x138170
> (BMG_FAN_2_SPEED) simply does not accumulate pulses on DG2 silicon.
> The i915 driver does not expose fan2 on DG2 at all -- it only maps
> PCU_PWM_FAN_SPEED (0x138140, identical to BMG_FAN_1_SPEED), consistent
> with the observation that only one fan tach register is wired on DG2.
>
> Report a single fan for DG2 to keep the phantom fan2_input out of
> sysfs. Battlemage paths are unchanged.
>
> Tested on Arc A750 LE (DG2 G10): with this patch applied, fan2_input
> no longer appears in /sys/class/hwmon/hwmonX/ and `sensors xe-pci-0300`
> shows fan1 only.
>
> Fixes: 28f79ac609de ("drm/xe/hwmon: expose fan speed")
> Signed-off-by: Zhan Wei <zhanwei919@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260527115311.13398-1-zhanwei919@gmail.com?part=1
next prev parent reply other threads:[~2026-05-27 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 11:53 [RFC PATCH] drm/xe/hwmon: report a single fan for DG2 instead of two Zhan Wei
2026-05-27 12:17 ` sashiko-bot [this message]
2026-05-27 13:53 ` Raag Jadav
2026-05-27 15:18 ` 占wei
2026-05-28 16:49 ` Raag Jadav
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=20260527121720.5B6161F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhanwei919@gmail.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