From: sashiko-bot@kernel.org
To: "Karthik Poosa" <karthik.poosa@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control
Date: Tue, 24 Nov 2026 05:53:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-230564@kernel.org> (raw)
In-Reply-To: <20261124054811.798763-8-karthik.poosa@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/xe/hwmon: kernel-doc claims pwm writes fail when pwmN_enable
is 0
--
commit e3f1b146650ba8a68f8904ed7422e9ec4d05d22c
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Add kernel-doc for fan control
This commit adds a kernel-doc comment describing Xe hwmon fan control,
its firmware stock and driver user tables, and the exposed sysfs files.
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 77c4d1b0ecaef..b9e2e76d73c33 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -139,6 +139,58 @@ struct xe_hwmon_energy_info {
> long accum_energy;
> };
>
> +/**
> + * DOC: Xe fan control
[ ... ]
> + * Writes to ``pwmN``, ``pwmN_auto_pointM_temp`` and ``pwmN_auto_pointM_pwm``
> + * are accepted only while ``pwmN_enable`` is 1; otherwise they fail with
> + * -EINVAL. Firmware stores duty cycle in percent, so PWM values read back
> + * rounded to the nearest percent step. PWM values below the minimum duty cycle
> + * reported by firmware for that fan are raised to it, except a curve point PWM
> + * of 0, which is kept for the end marker.
[Severity: Low]
Does the driver actually reject writes to pwmN, pwmN_auto_pointM_temp
and pwmN_auto_pointM_pwm when pwmN_enable is 0?
Writing 0 (XE_FAN_PWM_FULL_SPEED) to pwmN_enable calls
xe_hwmon_set_user_fan_pwm(..., U8_MAX, true), which sets
fi->is_full_speed = true while keeping fi->pwm_enable_mode set to
XE_FAN_PWM_MANUAL_USER_TABLE. Because the write guards in
xe_hwmon_set_user_fan_pwm(), xe_hwmon_pwm_auto_point_temp_store() and
xe_hwmon_pwm_auto_point_pwm_store() only check fi->pwm_enable_mode !=
XE_FAN_PWM_MANUAL_USER_TABLE and do not check fi->is_full_speed, writes
to these attributes succeed when pwmN_enable is 0 instead of failing
with -EINVAL.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124054811.798763-1-karthik.poosa@intel.com?part=7
next prev parent reply other threads:[~2026-11-24 5:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 01/10] drm/xe/hwmon: Initialize fan-control backend and table cache Karthik Poosa
2026-11-27 21:31 ` Purkait, Soham
2026-11-24 5:48 ` [PATCH v4 02/10] drm/xe/hwmon: Expose fanN_max Karthik Poosa
2026-11-25 18:26 ` Rodrigo Vivi
2026-11-24 5:48 ` [PATCH v4 03/10] drm/xe/pcode: Add ordered write batch helper Karthik Poosa
2026-11-25 18:29 ` Rodrigo Vivi
2026-11-26 13:48 ` Poosa, Karthik
2026-11-24 5:48 ` [PATCH v4 04/10] drm/xe/hwmon: Expose pwm[1-3] Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 05/10] drm/xe/hwmon: Expose pwm[1-3]_enable Karthik Poosa
2026-11-24 6:01 ` sashiko-bot
2026-11-25 13:26 ` Poosa, Karthik
2026-11-24 5:48 ` [PATCH v4 06/10] drm/xe/hwmon: Enable fan curve control support Karthik Poosa
2026-11-24 6:02 ` sashiko-bot
2026-11-26 17:05 ` Poosa, Karthik
2026-11-24 5:48 ` [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control Karthik Poosa
2026-11-24 5:53 ` sashiko-bot [this message]
2026-11-26 12:33 ` Poosa, Karthik
2026-11-24 5:48 ` [PATCH v4 08/10] drm/xe/hwmon: Preserve fan user table across suspend resume Karthik Poosa
2026-11-24 6:07 ` sashiko-bot
2026-11-26 13:35 ` Poosa, Karthik
2026-11-24 5:48 ` [PATCH v4 09/10] drm/xe/hwmon: Update fan info after late binding Karthik Poosa
2026-11-24 6:11 ` sashiko-bot
2026-11-24 5:48 ` [PATCH v4 10/10] drm/xe/hwmon: Enable fan support for CRI Karthik Poosa
2026-11-25 18:30 ` Rodrigo Vivi
2026-11-24 5:56 ` ✗ CI.KUnit: failure for drm/xe/hwmon: Add fan control support 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=sashiko-outbox-230564@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.