* [PATCH v4 01/10] drm/xe/hwmon: Initialize fan-control backend and table cache
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 02/10] drm/xe/hwmon: Expose fanN_max Karthik Poosa
` (9 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Initialize Xe hwmon fan-control support by detecting enabled fans,
reading stock fan control points and min PWM.
FSC_READ_NUM_FANS returns a bitmask of enabled fans, so use it as a mask
when exposing fanN_input.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Avoid user table initialization during probe. (Badal)
- Move unused code to appropriate patches.
- Use xe helpers for dmesg logs.
v3:
- Rebase.
- Refine a few debug log messages and comments.
- Update xe_hwmon_read_fan_control_info() to return on any stock table
read failures.
- Avoid returning when num_fans is 0 in
xe_hwmon_get_preregistration_info(), ensuring thermal mailbox
initialization is not skipped.
- Remove XE_PCODE_FAN_CONTROL_TIMEOUT_MS which is unnecessary as default
timeout itself is now 10ms.
- Use xe_pcode_read() instead of xe_pcode_read_timeout().
- Rename fan_control_point_count to point_count in struct fan_table.
- Resolve kernel-doc warnings.
- Add valid check for stock table fan point count.
- Use the fan-enable bitmap reported by FSC_READ_NUM_FANS when enumerating
fans. This avoids assuming contiguous fan indices and allows masks with
gaps to be represented correctly in the hwmon interface.
v4:
- Clamp unsupported fan masks and oversized stock tables instead of
failing initialization. (Soham)
- On stock table read failure, mark that fan's table empty and continue
with the remaining fans; fan_input stays visible. (Soham)
- Clear fan enable mask and min PWM on pcode read failure. (Soham)
- Fix FCP_INDEX() type safety and clean up macro usage. (Soham)
- Use xe_hwmon_pcode_read_fan_control() for fan mailbox reads. (Soham)
- Fix kernel-doc for fan_table_type and nested fan_table members.
- Skip min PWM read for fans without a stock table.
- Make xe_hwmon_get_fan_enable_mask() return void.
drivers/gpu/drm/xe/xe_hwmon.c | 177 +++++++++++++++++++++++++++---
drivers/gpu/drm/xe/xe_pcode_api.h | 5 +
2 files changed, 166 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 42c2f9129da5..2ee4f89e7bf7 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -22,6 +22,7 @@
#include "xe_pcode_api.h"
#include "xe_sriov.h"
#include "xe_pm.h"
+#include "xe_printk.h"
#include "xe_vsec.h"
#include "regs/xe_pmt.h"
@@ -139,13 +140,53 @@ struct xe_hwmon_energy_info {
};
/**
- * struct xe_hwmon_fan_info - to cache previous fan reading
+ * enum fan_table_type - fan table types tracked per fan
+ */
+enum fan_table_type {
+ /** @STOCK_FAN_TABLE: firmware-provided fan table */
+ STOCK_FAN_TABLE,
+ /** @USER_FAN_TABLE: user fan table written through sysfs */
+ USER_FAN_TABLE,
+ /** @FAN_TABLE_MAX: number of fan tables tracked per fan */
+ FAN_TABLE_MAX,
+};
+
+/* Check if a fan is enabled based on the fan_enable_mask got from FSC_READ_NUM_FANS. */
+#define IS_FAN_ENABLED(hwmon, fan) ((hwmon)->fan_enable_mask & BIT(fan))
+
+/* Maximum number of fan control points supported by each fan. */
+#define MAX_FAN_CONTROL_POINTS 10
+
+/* Fan control point index: bit31 selects fan table type; bits30:0 control point index. */
+#define FCP_INDEX(table_type, point_num) (((u32)(table_type) << 31) | \
+ ((u32)(point_num) & GENMASK(30, 0)))
+
+/**
+ * struct xe_hwmon_fan_info - cached fan telemetry and control state
+ *
+ * Each fan keeps the latest tachometer sampling state along with two fan
+ * tables: the stock table discovered from firmware and the user table managed
+ * by hwmon sysfs writes.
*/
struct xe_hwmon_fan_info {
/** @reg_val_prev: previous fan reg val */
u32 reg_val_prev;
/** @time_prev: previous timestamp */
u64 time_prev;
+ /** @fan_table: fan control tables */
+ struct fan_table {
+ /** @fan_table.point_count: number of fan control points */
+ u8 point_count;
+ /** @fan_table.fcp: array of fan control points */
+ struct fan_control_point {
+ /** @fan_table.fcp.temp: temperature in degree celsius */
+ u8 temp;
+ /** @fan_table.fcp.speed: fan speed in percentage */
+ u8 speed;
+ } fcp[MAX_FAN_CONTROL_POINTS];
+ } fan_table[FAN_TABLE_MAX];
+ /** @min_pwm: minimum fan PWM */
+ u32 min_pwm;
};
/**
@@ -194,6 +235,8 @@ struct xe_hwmon {
int scl_shift_time;
/** @ei: Energy info for energyN_input */
struct xe_hwmon_energy_info ei[CHANNEL_MAX];
+ /** @fan_enable_mask: bitmask of available fans */
+ u32 fan_enable_mask;
/** @fi: Fan info for fanN_input */
struct xe_hwmon_fan_info fi[FAN_MAX];
/** @read_power_limit_from_pcode: pcode accepted power limits write for the channel */
@@ -1076,17 +1119,117 @@ static int xe_hwmon_pcode_write_i1(const struct xe_hwmon *hwmon, u32 uval)
(uval & POWER_SETUP_I1_DATA_MASK));
}
-static int xe_hwmon_pcode_read_fan_control(const struct xe_hwmon *hwmon, u32 subcmd, u32 *uval)
+static int xe_hwmon_pcode_read_fan_control(const struct xe_hwmon *hwmon, u32 subcmd, u8 fan_num,
+ u32 *uval)
{
struct xe_tile *root_tile = xe_device_get_root_tile(hwmon->xe);
+ return xe_pcode_read(root_tile, PCODE_MBOX(FAN_SPEED_CONTROL, subcmd, fan_num),
+ uval, NULL);
+}
+
+static void xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
+{
+ int ret;
+
/* Platforms that don't return correct value */
- if (hwmon->xe->info.platform == XE_DG2 && subcmd == FSC_READ_NUM_FANS) {
- *uval = 2;
- return 0;
+ if (hwmon->xe->info.platform == XE_DG2) {
+ hwmon->fan_enable_mask = GENMASK(1, 0);
+ return;
+ }
+
+ ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_NUM_FANS, 0,
+ &hwmon->fan_enable_mask);
+ if (ret) {
+ hwmon->fan_enable_mask = 0;
+ xe_warn(hwmon->xe, "failed to read number of fans, ret=%d\n", ret);
+ return;
}
- return xe_pcode_read(root_tile, PCODE_MBOX(FAN_SPEED_CONTROL, subcmd, 0), uval, NULL);
+ /* Check if fan mask exceeds FAN_MAX and log a warning if it does */
+ if (hwmon->fan_enable_mask & ~GENMASK(FAN_MAX - 1, 0)) {
+ xe_warn(hwmon->xe, "Fan enable mask exceeds %d supported fans, clamping\n",
+ FAN_MAX);
+ hwmon->fan_enable_mask &= GENMASK(FAN_MAX - 1, 0);
+ }
+
+ xe_info(hwmon->xe, "Number of fans detected: %u\n", hweight32(hwmon->fan_enable_mask));
+}
+
+static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
+{
+ int point;
+ int fan;
+ int ret;
+ int err = 0;
+
+ /* Stock table failures leave fan_input visible; tach readout doesn't need it. */
+ for (fan = 0; fan < FAN_MAX; fan++) {
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ u32 stock_fcp_count = 0;
+
+ if (!IS_FAN_ENABLED(hwmon, fan))
+ continue;
+
+ ret = xe_hwmon_pcode_read_fan_control(hwmon,
+ FSC_READ_STOCK_FAN_CONTROL_POINTS,
+ fan, &stock_fcp_count);
+ if (ret || !stock_fcp_count) {
+ xe_warn(hwmon->xe,
+ "fan %d stock table unavailable, ret=%d, point count=%u\n",
+ fan, ret, ret ? 0 : stock_fcp_count);
+ err = ret ?: -ENODATA;
+ continue;
+ }
+
+ if (stock_fcp_count > MAX_FAN_CONTROL_POINTS) {
+ xe_warn(hwmon->xe,
+ "fan %d stock table point count %u exceeds maximum %u, clamping\n",
+ fan, stock_fcp_count, MAX_FAN_CONTROL_POINTS);
+ stock_fcp_count = MAX_FAN_CONTROL_POINTS;
+ }
+
+ fi->fan_table[STOCK_FAN_TABLE].point_count = stock_fcp_count;
+ xe_dbg(hwmon->xe, "fan %d stock table point count is %u\n", fan,
+ fi->fan_table[STOCK_FAN_TABLE].point_count);
+
+ /* Cache the stock fan table for later use. */
+ for (point = 0; point < fi->fan_table[STOCK_FAN_TABLE].point_count;
+ point++) {
+ u32 fcp = FCP_INDEX(STOCK_FAN_TABLE, point);
+
+ ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_FAN_TABLE, fan, &fcp);
+ if (ret) {
+ xe_warn(hwmon->xe, "failed to read fan %d stock point %d, ret=%d\n",
+ fan, point, ret);
+ fi->fan_table[STOCK_FAN_TABLE].point_count = 0;
+ err = ret;
+ break;
+ }
+
+ fi->fan_table[STOCK_FAN_TABLE].fcp[point].temp =
+ REG_FIELD_GET(FAN_CONTROL_POINT_TEMP_MASK, fcp);
+ fi->fan_table[STOCK_FAN_TABLE].fcp[point].speed =
+ REG_FIELD_GET(FAN_CONTROL_POINT_SPEED_MASK, fcp);
+ xe_dbg(hwmon->xe, "fan %d stock point %d: temp %u C, speed %u %%\n",
+ fan, point, fi->fan_table[STOCK_FAN_TABLE].fcp[point].temp,
+ fi->fan_table[STOCK_FAN_TABLE].fcp[point].speed);
+ }
+
+ if (!fi->fan_table[STOCK_FAN_TABLE].point_count)
+ continue;
+
+ /* Read minimum fan PWM */
+ ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_FAN_MIN_PWM, fan,
+ &fi->min_pwm);
+ if (ret) {
+ fi->min_pwm = 0;
+ xe_warn(hwmon->xe, "fan %d min pwm unavailable, ret=%d\n", fan, ret);
+ } else {
+ xe_dbg(hwmon->xe, "fan %d min PWM %u\n", fan, fi->min_pwm);
+ }
+ }
+ return err;
}
static int xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, int channel,
@@ -1616,17 +1759,12 @@ xe_hwmon_energy_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
static umode_t
xe_hwmon_fan_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
{
- u32 uval = 0;
-
if (!hwmon->xe->info.has_fan_control)
return 0;
switch (attr) {
case hwmon_fan_input:
- if (xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_NUM_FANS, &uval))
- return 0;
-
- return channel < uval ? 0444 : 0;
+ return IS_FAN_ENABLED(hwmon, channel) ? 0444 : 0;
default:
return 0;
}
@@ -1859,11 +1997,18 @@ xe_hwmon_get_preregistration_info(struct xe_hwmon *hwmon)
if (xe_hwmon_is_visible(hwmon, hwmon_energy, hwmon_energy_input, channel))
xe_hwmon_energy_get(hwmon, channel, &energy);
- /* Initialize 'struct xe_hwmon_fan_info' with initial fan register reading. */
- for (channel = 0; channel < FAN_MAX; channel++)
- if (xe_hwmon_is_visible(hwmon, hwmon_fan, hwmon_fan_input, channel))
- xe_hwmon_fan_input_read(hwmon, channel, &fan_speed);
+ if (hwmon->xe->info.has_fan_control) {
+ xe_hwmon_get_fan_enable_mask(hwmon);
+
+ /* Initialize 'struct xe_hwmon_fan_info' with initial fan register reading. */
+ for (channel = 0; channel < FAN_MAX; channel++)
+ if (IS_FAN_ENABLED(hwmon, channel))
+ xe_hwmon_fan_input_read(hwmon, channel, &fan_speed);
+ /* Fan control tables initialization */
+ if (xe_hwmon_read_fan_control_info(hwmon))
+ xe_warn(hwmon->xe, "Fan control tables are not available\n");
+ }
return xe_hwmon_init_temp_info(hwmon);
}
diff --git a/drivers/gpu/drm/xe/xe_pcode_api.h b/drivers/gpu/drm/xe/xe_pcode_api.h
index 00c4fc7d0124..0349b24a8259 100644
--- a/drivers/gpu/drm/xe/xe_pcode_api.h
+++ b/drivers/gpu/drm/xe/xe_pcode_api.h
@@ -83,6 +83,11 @@
#define FAN_SPEED_CONTROL 0x7D
#define FSC_READ_NUM_FANS 0x4
+#define FSC_READ_STOCK_FAN_CONTROL_POINTS 0x5
+#define FSC_READ_FAN_TABLE 0x7
+#define FAN_CONTROL_POINT_TEMP_MASK REG_GENMASK(7, 0)
+#define FAN_CONTROL_POINT_SPEED_MASK REG_GENMASK(15, 8)
+#define FSC_READ_FAN_MIN_PWM 0x8
#define PCODE_SCRATCH(x) XE_REG(0x138320 + ((x) * 4))
/* PCODE_SCRATCH0 */
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 02/10] drm/xe/hwmon: Expose fanN_max
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-24 5:48 ` Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 03/10] drm/xe/pcode: Add ordered write batch helper Karthik Poosa
` (8 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Expose fan maximum RPM via fanN_max.
The value is derived from the firmware-reported maximum fan RPS and
converted to RPM in the fan hwmon read path.
Update Xe hwmon ABI documentation for fanN_max.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2: Use xe helper for dmesg logs.
v3:
- Fix indentation of the max_rps struct member. (Soham)
- Enable fanN_max only when fanN is supported.
v4:
- Read max RPS independent of stock table availability.
- Clear max RPS on pcode read failure.
.../ABI/testing/sysfs-driver-intel-xe-hwmon | 8 +++++++
drivers/gpu/drm/xe/xe_hwmon.c | 21 +++++++++++++++++--
drivers/gpu/drm/xe/xe_pcode_api.h | 1 +
3 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
index 0da739d9a816..1d42ea0639f7 100644
--- a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
+++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
@@ -266,6 +266,14 @@ Description: RO. Fan 3 speed in RPM.
Only supported for particular Intel Xe graphics platforms.
+What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/fan[1-3]_max
+Date: November 2026
+KernelVersion: 7.5
+Contact: intel-xe@lists.freedesktop.org
+Description: RO. Maximum fan speed in RPM for each fan channel.
+
+ Only supported for particular Intel Xe graphics platforms.
+
What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_cap
Date: May 2025
KernelVersion: 6.15
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 2ee4f89e7bf7..d06f9dc8a463 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -185,6 +185,8 @@ struct xe_hwmon_fan_info {
u8 speed;
} fcp[MAX_FAN_CONTROL_POINTS];
} fan_table[FAN_TABLE_MAX];
+ /** @max_rps: maximum fan RPS */
+ u32 max_rps;
/** @min_pwm: minimum fan PWM */
u32 min_pwm;
};
@@ -913,7 +915,8 @@ static const struct hwmon_channel_info * const hwmon_info[] = {
HWMON_CHANNEL_INFO(curr, HWMON_C_LABEL, HWMON_C_CRIT | HWMON_C_LABEL),
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL),
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL),
- HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT, HWMON_F_INPUT, HWMON_F_INPUT),
+ HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_MAX, HWMON_F_INPUT | HWMON_F_MAX,
+ HWMON_F_INPUT | HWMON_F_MAX),
NULL
};
@@ -1163,7 +1166,7 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
int ret;
int err = 0;
- /* Stock table failures leave fan_input visible; tach readout doesn't need it. */
+ /* Stock table failures leave fan_input and fan_max visible; they don't need it. */
for (fan = 0; fan < FAN_MAX; fan++) {
struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
u32 stock_fcp_count = 0;
@@ -1171,6 +1174,15 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
if (!IS_FAN_ENABLED(hwmon, fan))
continue;
+ ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_MAX_FAN_RPS, fan,
+ &fi->max_rps);
+ if (ret) {
+ fi->max_rps = 0;
+ xe_warn(hwmon->xe, "failed to read fan %d max RPS, ret=%d\n", fan, ret);
+ } else {
+ xe_dbg(hwmon->xe, "fan %d max RPS %u\n", fan, fi->max_rps);
+ }
+
ret = xe_hwmon_pcode_read_fan_control(hwmon,
FSC_READ_STOCK_FAN_CONTROL_POINTS,
fan, &stock_fcp_count);
@@ -1765,6 +1777,8 @@ xe_hwmon_fan_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
switch (attr) {
case hwmon_fan_input:
return IS_FAN_ENABLED(hwmon, channel) ? 0444 : 0;
+ case hwmon_fan_max:
+ return IS_FAN_ENABLED(hwmon, channel) && hwmon->fi[channel].max_rps ? 0444 : 0;
default:
return 0;
}
@@ -1815,6 +1829,9 @@ xe_hwmon_fan_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
switch (attr) {
case hwmon_fan_input:
return xe_hwmon_fan_input_read(hwmon, channel, val);
+ case hwmon_fan_max:
+ *val = mul_u32_u32(hwmon->fi[channel].max_rps, 60);
+ return 0;
default:
return -EOPNOTSUPP;
}
diff --git a/drivers/gpu/drm/xe/xe_pcode_api.h b/drivers/gpu/drm/xe/xe_pcode_api.h
index 0349b24a8259..b8132db0e399 100644
--- a/drivers/gpu/drm/xe/xe_pcode_api.h
+++ b/drivers/gpu/drm/xe/xe_pcode_api.h
@@ -82,6 +82,7 @@
#define PCODE_MBOX_DOMAIN_HBM 0x2
#define FAN_SPEED_CONTROL 0x7D
+#define FSC_READ_MAX_FAN_RPS 0x3
#define FSC_READ_NUM_FANS 0x4
#define FSC_READ_STOCK_FAN_CONTROL_POINTS 0x5
#define FSC_READ_FAN_TABLE 0x7
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 03/10] drm/xe/pcode: Add ordered write batch helper
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-24 5:48 ` [PATCH v4 02/10] drm/xe/hwmon: Expose fanN_max Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 04/10] drm/xe/hwmon: Expose pwm[1-3] Karthik Poosa
` (7 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Add a pcode helper that issues an ordered sequence of mailbox writes
while holding the pcode lock, so no other mailbox command can be
interleaved.
This will be used to write fan tables atomically with respect to other
pcode users.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Document partial-failure semantics and lock hold time in kernel-doc.
- Reword commit message.
- Return -EINVAL for an empty batch. (Soham)
- Log the failing batch index, mailbox, data and error. (Soham)
- Add kernel-doc for struct xe_pcode_write.
drivers/gpu/drm/xe/xe_pcode.c | 39 +++++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_pcode.h | 12 +++++++++++
2 files changed, 51 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index 266deecbb100..ab796218e737 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -124,6 +124,45 @@ int xe_pcode_write_timeout(struct xe_tile *tile, u32 mbox, u32 data, int timeout
return err;
}
+/**
+ * xe_pcode_write_batch - issue pcode writes in order under the mailbox lock
+ * @tile: tile
+ * @writes: mailbox/data pairs to write
+ * @count: number of entries in @writes
+ *
+ * Holds the pcode lock across all writes so no other mailbox command can be
+ * interleaved; the lock may be held for up to @count * PCODE_DEFAULT_TIMEOUT_MS.
+ * Stops at the first failure; earlier writes are not reverted.
+ *
+ * Return: 0 on success, negative error code otherwise.
+ */
+int xe_pcode_write_batch(struct xe_tile *tile, const struct xe_pcode_write *writes,
+ unsigned int count)
+{
+ unsigned int i;
+ int err = 0;
+
+ if (!count)
+ return -EINVAL;
+
+ mutex_lock(&tile->pcode.lock);
+ for (i = 0; i < count; i++) {
+ u32 data = writes[i].data;
+
+ err = pcode_mailbox_rw(tile, writes[i].mbox, &data, NULL, PCODE_DEFAULT_TIMEOUT_MS,
+ false, false);
+ if (err) {
+ xe_err(tile_to_xe(tile),
+ "pcode batch write %u/%u failed: mbox 0x%08x data 0x%08x, ret %pe\n",
+ i + 1, count, writes[i].mbox, writes[i].data, ERR_PTR(err));
+ break;
+ }
+ }
+ mutex_unlock(&tile->pcode.lock);
+
+ return err;
+}
+
int xe_pcode_write64_timeout(struct xe_tile *tile, u32 mbox, u32 data0, u32 data1, int timeout)
{
int err;
diff --git a/drivers/gpu/drm/xe/xe_pcode.h b/drivers/gpu/drm/xe/xe_pcode.h
index 7e43792b0037..c601a12baba6 100644
--- a/drivers/gpu/drm/xe/xe_pcode.h
+++ b/drivers/gpu/drm/xe/xe_pcode.h
@@ -18,6 +18,16 @@ struct xe_pcode_version {
u32 engg;
};
+/**
+ * struct xe_pcode_write - single pcode mailbox write
+ * @mbox: mailbox command
+ * @data: value written to PCODE_DATA0
+ */
+struct xe_pcode_write {
+ u32 mbox;
+ u32 data;
+};
+
#define PCODE_DEFAULT_TIMEOUT_MS 10
int xe_pcode_init_early(struct xe_tile *tile);
@@ -28,6 +38,8 @@ int xe_pcode_init_min_freq_table(struct xe_tile *tile, u32 min_gt_freq,
int xe_pcode_read(struct xe_tile *tile, u32 mbox, u32 *val0, u32 *val1);
int xe_pcode_write_timeout(struct xe_tile *tile, u32 mbox, u32 val,
int timeout_ms);
+int xe_pcode_write_batch(struct xe_tile *tile, const struct xe_pcode_write *writes,
+ unsigned int count);
int xe_pcode_write64_timeout(struct xe_tile *tile, u32 mbox, u32 data0,
u32 data1, int timeout);
int xe_get_pcode_version(struct xe_device *xe, struct xe_pcode_version *version);
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 04/10] drm/xe/hwmon: Expose pwm[1-3]
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (2 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 03/10] drm/xe/pcode: Add ordered write batch helper Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 5:48 ` [PATCH v4 05/10] drm/xe/hwmon: Expose pwm[1-3]_enable Karthik Poosa
` (6 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Expose pwm[1-3] fan duty attributes through hwmon.
This enables reading and writing user PWM values (0..255) for each
available fan channel. It can be used for manual control of fan speed,
irrespective of fan curve. Switching back to the stock fan curve is
added in a later patch.
Update Xe hwmon ABI documentation for pwm[1-3].
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Use xe helpers for dmesg logs.
- Avoid using hwmon->num_fans to get fan count in
xe_hwmon_pwm_is_visible().
v3:
- Set PWM directly through the user table; avoid initializing it from the
stock table. (Soham)
- Move the unused xe_hwmon_activate_user_fan_table() to the subsequent
patch.
- Fail pwmN reads when no value has been written, rather than activating
the user table from the stock table.
- Define MIN_FAN_CONTROL_POINTS as 2.
- Use MIN_FAN_CONTROL_POINTS for PWM configuration. (Soham)
- Use batched writes for configuring fan control points when setting pwmN.
- Add and rephrase couple debug logs.
- Update the hwmon documentation.
v4:
- Use tab indentation in ABI doc and MIN_FAN_CONTROL_POINTS. (Soham)
- Drop unused linux/delay.h include. (Soham)
- Clamp min PWM to 100% since fan table speed is in percent. (Soham)
- Log both the requested pwm and the applied percentage. (Soham)
- Fail the pwm write if pcode reports a user point count other than
MIN_FAN_CONTROL_POINTS after the write. (Soham)
- Drop redundant channel range checks in pwm read/write. (Soham)
- Fix misleading comments and debug log alignment. (Soham)
- Note that the 0..255 to percent round trip is lossy. (Soham)
- Update ABI Date and KernelVersion to November 2026 and 7.5.
- Document that pwm values below the fan minimum are raised to it.
- Return -ENODATA and log at debug level when pwm has not been set.
- Invalidate the cached user table when the pwm write or verify fails.
- Clear point count on pcode read failure.
- Drop unneeded parentheses in MIN_FAN_CONTROL_POINTS and FIXED_PWM_TEMP.
- Document pcode user table write ordering.
.../ABI/testing/sysfs-driver-intel-xe-hwmon | 10 ++
drivers/gpu/drm/xe/xe_hwmon.c | 165 ++++++++++++++++++
drivers/gpu/drm/xe/xe_pcode_api.h | 3 +
3 files changed, 178 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
index 1d42ea0639f7..31348d65c89d 100644
--- a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
+++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
@@ -321,3 +321,13 @@ Description: RW. Package burst power limit interval (Tau in PL2/Tau) in
milliseconds over which sustained power is averaged.
Only supported for particular Intel Xe graphics platforms.
+
+What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/pwm[1-3]
+Date: November 2026
+KernelVersion: 7.5
+Contact: intel-xe@lists.freedesktop.org
+Description: RW. Target fan PWM duty value in the range 0..255, where 255
+ is 100% fan speed. Values below the fan's minimum PWM are
+ raised to that minimum.
+
+ Only supported for particular Intel Xe graphics platforms.
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index d06f9dc8a463..e892a6517334 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -157,6 +157,9 @@ enum fan_table_type {
/* Maximum number of fan control points supported by each fan. */
#define MAX_FAN_CONTROL_POINTS 10
+/* Minimum number of points required for a user fan table. */
+#define MIN_FAN_CONTROL_POINTS 2
+
/* Fan control point index: bit31 selects fan table type; bits30:0 control point index. */
#define FCP_INDEX(table_type, point_num) (((u32)(table_type) << 31) | \
((u32)(point_num) & GENMASK(30, 0)))
@@ -917,6 +920,7 @@ static const struct hwmon_channel_info * const hwmon_info[] = {
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL),
HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_MAX, HWMON_F_INPUT | HWMON_F_MAX,
HWMON_F_INPUT | HWMON_F_MAX),
+ HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT, HWMON_PWM_INPUT, HWMON_PWM_INPUT),
NULL
};
@@ -1159,6 +1163,91 @@ static void xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
xe_info(hwmon->xe, "Number of fans detected: %u\n", hweight32(hwmon->fan_enable_mask));
}
+static int xe_hwmon_get_fan_point_count(struct xe_hwmon *hwmon, u8 fan, u32 *point_count,
+ enum fan_table_type table_type)
+{
+ int ret;
+
+ ret = xe_hwmon_pcode_read_fan_control(hwmon,
+ (table_type == USER_FAN_TABLE) ?
+ FSC_READ_USER_FAN_CONTROL_POINTS :
+ FSC_READ_STOCK_FAN_CONTROL_POINTS,
+ fan, point_count);
+ if (ret) {
+ *point_count = 0;
+ xe_err(hwmon->xe, "failed to read fan %d %s point count, ret=%d\n", fan,
+ (table_type == USER_FAN_TABLE) ? "user" : "stock", ret);
+ return ret;
+ }
+
+ if (*point_count > MAX_FAN_CONTROL_POINTS) {
+ xe_err(hwmon->xe, "fan %d %s point count %u exceeds max %u\n", fan,
+ (table_type == USER_FAN_TABLE) ? "user" : "stock", *point_count,
+ MAX_FAN_CONTROL_POINTS);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/* Temperature to set when setting the fan PWM with pwmN. */
+#define FIXED_PWM_TEMP 1
+
+static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
+{
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ struct xe_pcode_write writes[MIN_FAN_CONTROL_POINTS + 1];
+ u32 point_count = 0;
+ u8 speed;
+ int ret, i;
+
+ /* Fan table speed and min_pwm are in percent. */
+ speed = DIV_ROUND_CLOSEST(pwm * 100, U8_MAX);
+ speed = max_t(u32, speed, min_t(u32, fi->min_pwm, 100));
+
+ /* Fan control needs at least two points; program them all at the same speed. */
+ for (i = 0; i < MIN_FAN_CONTROL_POINTS; i++) {
+ writes[i].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_FAN_TABLE, fan);
+ writes[i].data = FIELD_PREP(FAN_CONTROL_POINT_TEMP_MASK, FIXED_PWM_TEMP + i) |
+ FIELD_PREP(FAN_CONTROL_POINT_SPEED_MASK, speed);
+ xe_dbg(hwmon->xe, "prepared fan control point %d with temp=%d, speed=%u%%\n", i,
+ FIXED_PWM_TEMP + i, speed);
+ }
+
+ /* pcode fills the user table from point 0 in write order; the count write commits it. */
+ writes[i].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_NUM_FAN_CONTROL_POINTS, fan);
+ writes[i].data = MIN_FAN_CONTROL_POINTS;
+ ret = xe_pcode_write_batch(xe_device_get_root_tile(hwmon->xe), writes, ARRAY_SIZE(writes));
+ if (ret) {
+ /* pcode may hold a partial table now, so drop the stale cached value. */
+ fi->fan_table[USER_FAN_TABLE].point_count = 0;
+ xe_err(hwmon->xe, "failed to write pwm %u (%u%%) for fan %d, ret=%d\n",
+ pwm, speed, fan, ret);
+ return ret;
+ }
+ xe_dbg(hwmon->xe, "applied pwm %u (%u%%) for fan %d\n", pwm, speed, fan);
+
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, USER_FAN_TABLE);
+ if (ret || point_count != MIN_FAN_CONTROL_POINTS) {
+ fi->fan_table[USER_FAN_TABLE].point_count = 0;
+ xe_err(hwmon->xe, "pwm set verify failed for fan %d, ret=%d, point count=%u\n", fan,
+ ret, point_count);
+ return ret ?: -EIO;
+ }
+
+ /* Update the user fan table cache. */
+ for (i = 0; i < MIN_FAN_CONTROL_POINTS; i++) {
+ fi->fan_table[USER_FAN_TABLE].fcp[i].temp = FIXED_PWM_TEMP + i;
+ fi->fan_table[USER_FAN_TABLE].fcp[i].speed = speed;
+ xe_dbg(hwmon->xe, "fan %d user table cache point %d with temp=%d, speed=%u%%\n",
+ fan, i, fi->fan_table[USER_FAN_TABLE].fcp[i].temp,
+ fi->fan_table[USER_FAN_TABLE].fcp[i].speed);
+ }
+ fi->fan_table[USER_FAN_TABLE].point_count = MIN_FAN_CONTROL_POINTS;
+
+ return 0;
+}
+
static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
{
int point;
@@ -1784,6 +1873,20 @@ xe_hwmon_fan_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
}
}
+static umode_t
+xe_hwmon_pwm_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
+{
+ if (!hwmon->xe->info.has_fan_control || !IS_FAN_ENABLED(hwmon, channel))
+ return 0;
+
+ switch (attr) {
+ case hwmon_pwm_input:
+ return 0644;
+ default:
+ return 0;
+ }
+}
+
static int
xe_hwmon_fan_input_read(struct xe_hwmon *hwmon, int channel, long *val)
{
@@ -1837,6 +1940,61 @@ xe_hwmon_fan_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
}
}
+static int
+xe_hwmon_pwm_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
+{
+ struct xe_hwmon_fan_info *fi;
+ int ret = 0;
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ fi = &hwmon->fi[channel];
+
+ switch (attr) {
+ case hwmon_pwm_input:
+ if (!fi->fan_table[USER_FAN_TABLE].point_count) {
+ xe_dbg(hwmon->xe, "pwm not set for fan %d\n", channel);
+ ret = -ENODATA;
+ goto unlock;
+ }
+ /* Speed is cached in percent, so the 0..255 round trip may be off by a step. */
+ *val = DIV_ROUND_CLOSEST(fi->fan_table[USER_FAN_TABLE].fcp[0].speed * U8_MAX, 100);
+ xe_dbg(hwmon->xe, "pwm read for fan %d: %ld\n", channel, *val);
+ break;
+ default:
+ ret = -EOPNOTSUPP;
+ break;
+ }
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+ return ret;
+}
+
+static int
+xe_hwmon_pwm_write(struct xe_hwmon *hwmon, u32 attr, int channel, long val)
+{
+ int ret = 0;
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ switch (attr) {
+ case hwmon_pwm_input:
+ if (val < 0 || val > U8_MAX) {
+ ret = -EINVAL;
+ break;
+ }
+ ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, (u8)val);
+ break;
+ default:
+ ret = -EOPNOTSUPP;
+ break;
+ }
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ return ret;
+}
+
static umode_t
xe_hwmon_is_visible(const void *drvdata, enum hwmon_sensor_types type,
u32 attr, int channel)
@@ -1863,6 +2021,9 @@ xe_hwmon_is_visible(const void *drvdata, enum hwmon_sensor_types type,
case hwmon_fan:
ret = xe_hwmon_fan_is_visible(hwmon, attr, channel);
break;
+ case hwmon_pwm:
+ ret = xe_hwmon_pwm_is_visible(hwmon, attr, channel);
+ break;
default:
ret = 0;
break;
@@ -1892,6 +2053,8 @@ xe_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
return xe_hwmon_energy_read(hwmon, attr, channel, val);
case hwmon_fan:
return xe_hwmon_fan_read(hwmon, attr, channel, val);
+ case hwmon_pwm:
+ return xe_hwmon_pwm_read(hwmon, attr, channel, val);
default:
return -EOPNOTSUPP;
}
@@ -1910,6 +2073,8 @@ xe_hwmon_write(struct device *dev, enum hwmon_sensor_types type, u32 attr,
return xe_hwmon_power_write(hwmon, attr, channel, val);
case hwmon_curr:
return xe_hwmon_curr_write(hwmon, attr, channel, val);
+ case hwmon_pwm:
+ return xe_hwmon_pwm_write(hwmon, attr, channel, val);
default:
return -EOPNOTSUPP;
}
diff --git a/drivers/gpu/drm/xe/xe_pcode_api.h b/drivers/gpu/drm/xe/xe_pcode_api.h
index b8132db0e399..6e4878d965f2 100644
--- a/drivers/gpu/drm/xe/xe_pcode_api.h
+++ b/drivers/gpu/drm/xe/xe_pcode_api.h
@@ -82,9 +82,12 @@
#define PCODE_MBOX_DOMAIN_HBM 0x2
#define FAN_SPEED_CONTROL 0x7D
+#define FSC_WRITE_NUM_FAN_CONTROL_POINTS 0x0
+#define FSC_WRITE_FAN_TABLE 0x1
#define FSC_READ_MAX_FAN_RPS 0x3
#define FSC_READ_NUM_FANS 0x4
#define FSC_READ_STOCK_FAN_CONTROL_POINTS 0x5
+#define FSC_READ_USER_FAN_CONTROL_POINTS 0x6
#define FSC_READ_FAN_TABLE 0x7
#define FAN_CONTROL_POINT_TEMP_MASK REG_GENMASK(7, 0)
#define FAN_CONTROL_POINT_SPEED_MASK REG_GENMASK(15, 8)
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 05/10] drm/xe/hwmon: Expose pwm[1-3]_enable
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (3 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 04/10] drm/xe/hwmon: Expose pwm[1-3] Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 6:01 ` sashiko-bot
2026-11-24 5:48 ` [PATCH v4 06/10] drm/xe/hwmon: Enable fan curve control support Karthik Poosa
` (5 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Expose pwm[1-3]_enable to control the fan operating mode through
the hwmon interface.
Mode 0 forces the fan to run at full speed.
Mode 1 enables user fan-table control.
Mode 2 restores firmware-controlled fan management.
Document pwm[1-3]_enable in the Xe hwmon ABI.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Use xe helpers for dmesg logs.
- Update kernel version in Xe hwmon documentation.
- Correct level of some dmesg logs.
v3:
- Each pwm_enable mode now sets its own state; drop the redundant
post-switch pwm_enable_mode/is_full_speed update. (Badal)
- Fix misindented dead assignment in the stock-table branch.
- Make error handling consistent across pwm_enable modes. (Badal)
- Document the pwm[1-3] manual-mode write precondition in the ABI. (Badal)
- Use xe_pcode_write() instead of the timeout variant api as it is not
needed.
v4:
- Rebase on reworked pwm[1-3] patch.
- Clamp min PWM to 100% when activating the user table, since fan
table speed is in percent.
- Drop redundant channel range check in pwm write.
- Use tab indentation and update Date and KernelVersion to November
2026 and 7.5 in the pwm[1-3]_enable ABI entry.
.../ABI/testing/sysfs-driver-intel-xe-hwmon | 15 ++
drivers/gpu/drm/xe/xe_hwmon.c | 158 +++++++++++++++++-
2 files changed, 170 insertions(+), 3 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
index 31348d65c89d..b9e7003d7d80 100644
--- a/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
+++ b/Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
@@ -330,4 +330,19 @@ Description: RW. Target fan PWM duty value in the range 0..255, where 255
is 100% fan speed. Values below the fan's minimum PWM are
raised to that minimum.
+ Writing requires the corresponding pwm[1-3]_enable to be set to
+ 1 (manual user-table mode) first; otherwise the write is
+ rejected with -EINVAL.
+
+ Only supported for particular Intel Xe graphics platforms.
+
+What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/pwm[1-3]_enable
+Date: November 2026
+KernelVersion: 7.5
+Contact: intel-xe@lists.freedesktop.org
+Description: RW. Fan control mode selector.
+
+ Use value 0 to run fans at full speed. Use value 1 to enable
+ user table control and value 2 to use firmware default behavior.
+
Only supported for particular Intel Xe graphics platforms.
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index e892a6517334..b7e13e5d13ff 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -139,6 +139,18 @@ struct xe_hwmon_energy_info {
long accum_energy;
};
+/**
+ * enum xe_fan_pwm_enable_mode - fan PWM enable modes
+ */
+enum xe_fan_pwm_enable_mode {
+ /** @XE_FAN_PWM_FULL_SPEED: force all user table points to full speed */
+ XE_FAN_PWM_FULL_SPEED = 0,
+ /** @XE_FAN_PWM_MANUAL_USER_TABLE: use the driver-managed user table */
+ XE_FAN_PWM_MANUAL_USER_TABLE = 1,
+ /** @XE_FAN_PWM_AUTO_STOCK_TABLE: use the firmware stock table */
+ XE_FAN_PWM_AUTO_STOCK_TABLE = 2,
+};
+
/**
* enum fan_table_type - fan table types tracked per fan
*/
@@ -192,6 +204,10 @@ struct xe_hwmon_fan_info {
u32 max_rps;
/** @min_pwm: minimum fan PWM */
u32 min_pwm;
+ /** @pwm_enable_mode: current xe_fan_pwm_enable_mode */
+ u8 pwm_enable_mode;
+ /** @is_full_speed: flag indicating if fan is in full speed */
+ bool is_full_speed;
};
/**
@@ -920,7 +936,9 @@ static const struct hwmon_channel_info * const hwmon_info[] = {
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT | HWMON_E_LABEL, HWMON_E_INPUT | HWMON_E_LABEL),
HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_MAX, HWMON_F_INPUT | HWMON_F_MAX,
HWMON_F_INPUT | HWMON_F_MAX),
- HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT, HWMON_PWM_INPUT, HWMON_PWM_INPUT),
+ HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+ HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+ HWMON_PWM_INPUT | HWMON_PWM_ENABLE),
NULL
};
@@ -1190,10 +1208,80 @@ static int xe_hwmon_get_fan_point_count(struct xe_hwmon *hwmon, u8 fan, u32 *poi
return 0;
}
+static int xe_hwmon_activate_user_fan_table(struct xe_hwmon *hwmon, u8 fan,
+ bool is_full_speed, enum fan_table_type table_source)
+{
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ struct xe_pcode_write writes[MAX_FAN_CONTROL_POINTS + 1];
+ u32 point_count;
+ int ret;
+ int point;
+ struct fan_table *source_table = &fi->fan_table[table_source];
+
+ xe_dbg(hwmon->xe, "activating fan %d user table from %s table\n", fan,
+ (table_source == USER_FAN_TABLE) ? "user" : "stock");
+
+ point_count = source_table->point_count;
+ if (!point_count || point_count > MAX_FAN_CONTROL_POINTS) {
+ xe_err(hwmon->xe,
+ "fan %d %s table point count %d is invalid, cannot activate user table\n",
+ fan, (table_source == USER_FAN_TABLE) ? "user" : "stock", point_count);
+ return -EINVAL;
+ }
+
+ for (point = 0; point < point_count; point++) {
+ u8 temp = source_table->fcp[point].temp;
+ u8 speed = is_full_speed ? 100 : max_t(u8, source_table->fcp[point].speed,
+ min_t(u32, fi->min_pwm, 100));
+
+ writes[point].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_FAN_TABLE, fan);
+ writes[point].data = FIELD_PREP(FAN_CONTROL_POINT_TEMP_MASK, temp) |
+ FIELD_PREP(FAN_CONTROL_POINT_SPEED_MASK, speed);
+ }
+
+ writes[point_count].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_NUM_FAN_CONTROL_POINTS,
+ fan);
+ writes[point_count].data = point_count;
+ ret = xe_pcode_write_batch(xe_device_get_root_tile(hwmon->xe), writes, point_count + 1);
+ if (ret) {
+ xe_dbg(hwmon->xe, "failed to write fan %d user table, ret=%d\n", fan, ret);
+ return ret;
+ }
+
+ /* Verify if all the user points are set */
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, USER_FAN_TABLE);
+ if (ret) {
+ xe_err(hwmon->xe,
+ "failed to read fan %d user table point count, ret=%d\n", fan, ret);
+ return ret;
+ }
+ if (point_count != source_table->point_count) {
+ xe_err(hwmon->xe, "fan %d user table point count mismatch, expected %u, got %u\n",
+ fan, source_table->point_count, point_count);
+ return -EIO;
+ }
+
+ if (table_source == STOCK_FAN_TABLE) {
+ for (point = 0; point < point_count; point++) {
+ fi->fan_table[USER_FAN_TABLE].fcp[point].temp =
+ source_table->fcp[point].temp;
+ fi->fan_table[USER_FAN_TABLE].fcp[point].speed =
+ is_full_speed ? 100 : max_t(u8, source_table->fcp[point].speed,
+ min_t(u32, fi->min_pwm, 100));
+ }
+ }
+
+ fi->fan_table[USER_FAN_TABLE].point_count = point_count;
+ fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
+ fi->is_full_speed = is_full_speed;
+
+ return 0;
+}
+
/* Temperature to set when setting the fan PWM with pwmN. */
#define FIXED_PWM_TEMP 1
-static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
+static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm, bool full_speed)
{
struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
struct xe_pcode_write writes[MIN_FAN_CONTROL_POINTS + 1];
@@ -1201,6 +1289,11 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
u8 speed;
int ret, i;
+ if (!full_speed && fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
+ xe_dbg(hwmon->xe, "fan %d manual mode is not active, cannot set pwm\n", fan);
+ return -EINVAL;
+ }
+
/* Fan table speed and min_pwm are in percent. */
speed = DIV_ROUND_CLOSEST(pwm * 100, U8_MAX);
speed = max_t(u32, speed, min_t(u32, fi->min_pwm, 100));
@@ -1245,6 +1338,8 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
}
fi->fan_table[USER_FAN_TABLE].point_count = MIN_FAN_CONTROL_POINTS;
+ fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
+ fi->is_full_speed = full_speed;
return 0;
}
@@ -1320,6 +1415,9 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
if (!fi->fan_table[STOCK_FAN_TABLE].point_count)
continue;
+ /* Set PWM enable mode to automatic i.e stock table in use. */
+ fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
+
/* Read minimum fan PWM */
ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_FAN_MIN_PWM, fan,
&fi->min_pwm);
@@ -1881,6 +1979,7 @@ xe_hwmon_pwm_is_visible(struct xe_hwmon *hwmon, u32 attr, int channel)
switch (attr) {
case hwmon_pwm_input:
+ case hwmon_pwm_enable:
return 0644;
default:
return 0;
@@ -1961,6 +2060,9 @@ xe_hwmon_pwm_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
*val = DIV_ROUND_CLOSEST(fi->fan_table[USER_FAN_TABLE].fcp[0].speed * U8_MAX, 100);
xe_dbg(hwmon->xe, "pwm read for fan %d: %ld\n", channel, *val);
break;
+ case hwmon_pwm_enable:
+ *val = fi->pwm_enable_mode;
+ break;
default:
ret = -EOPNOTSUPP;
break;
@@ -1974,8 +2076,12 @@ xe_hwmon_pwm_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
static int
xe_hwmon_pwm_write(struct xe_hwmon *hwmon, u32 attr, int channel, long val)
{
+ struct xe_tile *root_tile = xe_device_get_root_tile(hwmon->xe);
+ struct xe_hwmon_fan_info *fi;
int ret = 0;
+ fi = &hwmon->fi[channel];
+
mutex_lock(&hwmon->hwmon_lock);
switch (attr) {
@@ -1984,7 +2090,53 @@ xe_hwmon_pwm_write(struct xe_hwmon *hwmon, u32 attr, int channel, long val)
ret = -EINVAL;
break;
}
- ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, (u8)val);
+ ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, (u8)val, false);
+ break;
+ case hwmon_pwm_enable:
+ if (val == XE_FAN_PWM_FULL_SPEED) {
+ ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, U8_MAX, true);
+ if (ret) {
+ xe_warn(hwmon->xe,
+ "full speed enable for fan %d failed, ret=%d\n",
+ channel, ret);
+ break;
+ }
+ } else if (val == XE_FAN_PWM_MANUAL_USER_TABLE) {
+ enum fan_table_type source = fi->fan_table[USER_FAN_TABLE].point_count ?
+ USER_FAN_TABLE : STOCK_FAN_TABLE;
+
+ /*
+ * Manual fan speed control using user fan table.
+ * If user fan table is not programmed, it would be initialized with
+ * clamped stock points which allows manual control with some
+ * default points.
+ */
+ ret = xe_hwmon_activate_user_fan_table(hwmon, channel, false, source);
+ if (ret) {
+ xe_warn(hwmon->xe,
+ "failed to activate user fan table for fan %d, ret=%d\n",
+ channel, ret);
+ break;
+ }
+ } else if (val == XE_FAN_PWM_AUTO_STOCK_TABLE) {
+ /* Switch to stock table specifying the user points to 0. */
+ ret = xe_pcode_write(root_tile, PCODE_MBOX(FAN_SPEED_CONTROL,
+ FSC_WRITE_NUM_FAN_CONTROL_POINTS,
+ channel), 0);
+ if (ret) {
+ xe_warn(hwmon->xe,
+ "failed to disable user fan table for fan %d, ret=%d\n",
+ channel, ret);
+ break;
+ }
+ xe_dbg(hwmon->xe,
+ "automatic control enabled for fan %d using stock table\n",
+ channel);
+ fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
+ fi->is_full_speed = false;
+ } else {
+ ret = -EINVAL;
+ }
break;
default:
ret = -EOPNOTSUPP;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 05/10] drm/xe/hwmon: Expose pwm[1-3]_enable
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
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-11-24 6:01 UTC (permalink / raw)
To: Karthik Poosa, intel-xe
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] drm/xe/hwmon: mode 0 sets manual mode in
xe_hwmon_set_user_fan_pwm()
- [Medium] drm/xe/hwmon: xe_hwmon_set_user_fan_pwm() clobbers user table
in mode 0
- [Medium] drm/xe/hwmon: uninitialized pwm_enable_mode on stock table
read failure
--
commit 2c87d5a2e63abba6144fe6efb9070eacc54a6cbc
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Expose pwm[1-3]_enable
This commit exposes the pwm[1-3]_enable sysfs attributes to select between
full-speed mode (0), manual user-table control (1), and firmware stock-table
control (2).
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index c053d597f26c5..59a8521316c2c 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
[ ... ]
> @@ -1190,10 +1208,80 @@ static int xe_hwmon_get_fan_point_count(struct xe_hwmon *hwmon, u8 fan, u32 *poi
> /* Temperature to set when setting the fan PWM with pwmN. */
> #define FIXED_PWM_TEMP 1
>
> -static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
> +static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm, bool full_speed)
> {
> struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
> struct xe_pcode_write writes[MIN_FAN_CONTROL_POINTS + 1];
> @@ -1201,6 +1289,11 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
> u8 speed;
> int ret, i;
>
> + if (!full_speed && fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
> + xe_dbg(hwmon->xe, "fan %d manual mode is not active, cannot set pwm\n", fan);
> + return -EINVAL;
> + }
[ ... ]
> @@ -1245,6 +1338,8 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm)
> }
> fi->fan_table[USER_FAN_TABLE].point_count = MIN_FAN_CONTROL_POINTS;
>
> + fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
> + fi->is_full_speed = full_speed;
> return 0;
> }
[Severity: Medium]
When full_speed is true (writing 0 to pwm[1-3]_enable), should
xe_hwmon_set_user_fan_pwm() set fi->pwm_enable_mode to
XE_FAN_PWM_FULL_SPEED instead of XE_FAN_PWM_MANUAL_USER_TABLE?
Because fi->pwm_enable_mode is set to XE_FAN_PWM_MANUAL_USER_TABLE (1),
reading pwm[1-3]_enable in this commit returns 1 right after writing 0
(until later commit "drm/xe/hwmon: Enable fan curve control support" checks
fi->is_full_speed in xe_hwmon_pwm_read()). In addition, subsequent writes
to pwm[1-3] while in mode 0 pass the fi->pwm_enable_mode !=
XE_FAN_PWM_MANUAL_USER_TABLE check above and drop the fan out of full-speed
mode instead of failing with -EINVAL as documented in the ABI.
> @@ -1320,6 +1415,9 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
> if (!fi->fan_table[STOCK_FAN_TABLE].point_count)
> continue;
>
> + /* Set PWM enable mode to automatic i.e stock table in use. */
> + fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
> +
[Severity: Medium]
If reading the stock fan table fails or returns 0 points in
xe_hwmon_read_fan_control_info(), does the early continue leave
fi->pwm_enable_mode zero-initialized to XE_FAN_PWM_FULL_SPEED (0)?
Because xe_hwmon_pwm_is_visible() only checks has_fan_control and
IS_FAN_ENABLED(), pwm[1-3]_enable is still exposed and reports mode 0
(full speed) even though the fan is under default firmware control, while
later commit "drm/xe/hwmon: Update fan info after late binding" only
initializes fi->pwm_enable_mode for newly enabled fan bits.
[ ... ]
> @@ -1984,7 +2090,53 @@ xe_hwmon_pwm_write(struct xe_hwmon *hwmon, u32 attr, int channel, long val)
> ret = -EINVAL;
> break;
> }
> - ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, (u8)val);
> + ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, (u8)val, false);
> + break;
> + case hwmon_pwm_enable:
> + if (val == XE_FAN_PWM_FULL_SPEED) {
> + ret = xe_hwmon_set_user_fan_pwm(hwmon, channel, U8_MAX, true);
> + if (ret) {
> + xe_warn(hwmon->xe,
> + "full speed enable for fan %d failed, ret=%d\n",
> + channel, ret);
> + break;
> + }
> + } else if (val == XE_FAN_PWM_MANUAL_USER_TABLE) {
> + enum fan_table_type source = fi->fan_table[USER_FAN_TABLE].point_count ?
> + USER_FAN_TABLE : STOCK_FAN_TABLE;
> +
> + /*
> + * Manual fan speed control using user fan table.
> + * If user fan table is not programmed, it would be initialized with
> + * clamped stock points which allows manual control with some
> + * default points.
> + */
> + ret = xe_hwmon_activate_user_fan_table(hwmon, channel, false, source);
[Severity: Medium]
Does enabling XE_FAN_PWM_FULL_SPEED via xe_hwmon_set_user_fan_pwm() clobber
fi->fan_table[USER_FAN_TABLE] with a 2-point 100% table?
When the user later writes 1 (XE_FAN_PWM_MANUAL_USER_TABLE) to
pwm[1-3]_enable, fi->fan_table[USER_FAN_TABLE].point_count is non-zero
(MIN_FAN_CONTROL_POINTS from mode 0), so xe_hwmon_pwm_write() selects
USER_FAN_TABLE and keeps the 2-point 100% full-speed table active instead
of initializing from STOCK_FAN_TABLE or restoring a prior user table.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124054811.798763-1-karthik.poosa@intel.com?part=5
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 06/10] drm/xe/hwmon: Enable fan curve control support
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (4 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 05/10] drm/xe/hwmon: Expose pwm[1-3]_enable Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 6:02 ` sashiko-bot
2026-11-24 5:48 ` [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control Karthik Poosa
` (4 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Expose curve-point temperature and pwm controls via
pwmF_auto_point[P]_temp and pwmF_auto_point[P]_pwm, where
F is the fan number and P is the fan curve point number.
Each fan curve point has a temperature and a pwm attribute.
Update Xe hwmon ABI documentation for pwm auto point temperature
attributes.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Use xe helpers for dmesg logs.
- Update kernel version in Xe hwmon documentation.
- Correct debug level of some dmesg logs.
v3:
- Allow variable fan curve points from >=2 to MAX_FAN_CONTROL_POINTS.
- Expose all MAX_FAN_CONTROL_POINTS fan-curve slots so users can extend
a short fan table.
- Stage temp/PWM pairs without changing the active curve. Commit at a
(0, 0) end marker or after all MAX_FAN_CONTROL_POINTS pairs.
- Write the points together, verify the firmware count, then update the
active cache.
v4:
- Use the two-argument IS_FAN_ENABLED() after rebase.
- Fix kernel-doc for nested staged fan_table members.
- Use "speed" for percent values and "pwm" only for the 0..255 sysfs
value. (Soham)
- Use u32 for the point index in xe_hwmon_commit_user_fan_table(). (Soham)
- Fix comment to say curve points must not decrease. (Soham)
- Add debug logs before -EINVAL returns. (Soham)
- Drop inline from xe_hwmon_get_active_fan_table(). (Soham)
- Use reverse xmas tree ordering for local variables. (Soham)
- Rename xe_hwmon_get_u8_from_sysfs() to xe_hwmon_sysfs_to_hw_val().
(Soham)
- Use if/else if/else for value selection in pwm auto point show. (Soham)
- Create the fan curve sensor attributes at probe time instead of 60
static definitions. (Soham)
- Clamp min PWM to 100% and reject pwm values above 100% speed.
- Use xe helpers for logs in the auto point store functions.
drivers/gpu/drm/xe/xe_hwmon.c | 450 +++++++++++++++++++++++++++++++++-
1 file changed, 443 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index b7e13e5d13ff..f52d689507a6 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -172,6 +172,11 @@ enum fan_table_type {
/* Minimum number of points required for a user fan table. */
#define MIN_FAN_CONTROL_POINTS 2
+/* pwmN_auto_pointM_temp and pwmN_auto_pointM_pwm for every curve point of a fan. */
+#define XE_CURVE_ATTRS_PER_FAN (2 * MAX_FAN_CONTROL_POINTS)
+#define XE_CURVE_ATTRS (FAN_MAX * XE_CURVE_ATTRS_PER_FAN)
+#define XE_CURVE_ATTR_NAME_LEN sizeof("pwmN_auto_pointNN_temp")
+
/* Fan control point index: bit31 selects fan table type; bits30:0 control point index. */
#define FCP_INDEX(table_type, point_num) (((u32)(table_type) << 31) | \
((u32)(point_num) & GENMASK(30, 0)))
@@ -199,6 +204,12 @@ struct xe_hwmon_fan_info {
/** @fan_table.fcp.speed: fan speed in percentage */
u8 speed;
} fcp[MAX_FAN_CONTROL_POINTS];
+ /** @fan_table.staged_fcp: curve supplied via sysfs but not yet committed */
+ struct fan_control_point staged_fcp[MAX_FAN_CONTROL_POINTS];
+ /** @fan_table.temp_staged: bitmask of temperature fields supplied via sysfs */
+ u16 temp_staged;
+ /** @fan_table.speed_staged: bitmask of speed fields supplied via sysfs */
+ u16 speed_staged;
} fan_table[FAN_TABLE_MAX];
/** @max_rps: maximum fan RPS */
u32 max_rps;
@@ -268,6 +279,16 @@ struct xe_hwmon {
u32 pl2_on_boot[CHANNEL_MAX];
/** @temp: Temperature info */
struct xe_hwmon_thermal_info temp;
+ /** @curve_sda: fan curve sensor attributes */
+ struct sensor_device_attribute curve_sda[XE_CURVE_ATTRS];
+ /** @curve_names: names of the fan curve sensor attributes */
+ char curve_names[XE_CURVE_ATTRS][XE_CURVE_ATTR_NAME_LEN];
+ /** @curve_attrs: NULL-terminated list of fan curve attributes */
+ struct attribute *curve_attrs[XE_CURVE_ATTRS + 1];
+ /** @curve_group: fan curve attribute group */
+ struct attribute_group curve_group;
+ /** @groups: NULL-terminated list of extra attribute groups */
+ const struct attribute_group *groups[3];
};
static inline int prepare_power_limit_param2(const struct xe_hwmon *hwmon, int channel)
@@ -905,11 +926,6 @@ static const struct attribute_group hwmon_attrgroup = {
.is_visible = xe_hwmon_attributes_visible,
};
-static const struct attribute_group *hwmon_groups[] = {
- &hwmon_attrgroup,
- NULL
-};
-
static const u32 hwmon_temp_config[CHANNEL_MAX + 1] = {
[CHANNEL_CARD] = HWMON_T_LABEL,
[CHANNEL_PKG] = HWMON_T_CRIT | HWMON_T_EMERGENCY | HWMON_T_INPUT |
@@ -1208,6 +1224,74 @@ static int xe_hwmon_get_fan_point_count(struct xe_hwmon *hwmon, u8 fan, u32 *poi
return 0;
}
+static int xe_hwmon_commit_user_fan_table(struct xe_hwmon *hwmon, u8 fan,
+ const struct fan_control_point *points, u32 point_count)
+{
+ /* The extra write is for the final write that sets the number of fan control points */
+ struct xe_pcode_write writes[MAX_FAN_CONTROL_POINTS + 1];
+ u32 accepted_count = 0;
+ u32 point;
+ int ret;
+
+ if (!point_count) {
+ xe_err(hwmon->xe, "no fan control points provided for fan %d\n", fan);
+ return -ENODATA;
+ }
+
+ for (point = 0; point < point_count; point++) {
+ u8 temp = points[point].temp;
+ u8 speed = points[point].speed;
+
+ /* Temperature and speed must not decrease from one point to the next. */
+ if (point > 0) {
+ u8 prev_temp = points[point - 1].temp;
+ u8 prev_speed = points[point - 1].speed;
+
+ if (temp < prev_temp || speed < prev_speed) {
+ xe_dbg(hwmon->xe,
+ "fan %d point %u decreases: %u/%u%% after %u/%u%%\n",
+ fan, point, temp, speed, prev_temp, prev_speed);
+ return -EINVAL;
+ }
+ }
+
+ /* Prepare the write for this fan control point */
+ writes[point].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_FAN_TABLE,
+ fan);
+ writes[point].data = FIELD_PREP(FAN_CONTROL_POINT_TEMP_MASK, temp) |
+ FIELD_PREP(FAN_CONTROL_POINT_SPEED_MASK, speed);
+ }
+
+ xe_dbg(hwmon->xe, "committing fan %d user table with %u points\n", fan, point_count);
+
+ writes[point_count].mbox = PCODE_MBOX(FAN_SPEED_CONTROL, FSC_WRITE_NUM_FAN_CONTROL_POINTS,
+ fan);
+ writes[point_count].data = point_count;
+
+ ret = xe_pcode_write_batch(xe_device_get_root_tile(hwmon->xe), writes, point_count + 1);
+ if (ret) {
+ xe_dbg(hwmon->xe,
+ "failed to write fan %d user table count to %u, ret=%d\n", fan, point_count,
+ ret);
+ return ret;
+ }
+
+ /* Verify if the user fan table was accepted correctly */
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &accepted_count, USER_FAN_TABLE);
+ if (ret)
+ return ret;
+
+ if (accepted_count != point_count) {
+ xe_err(hwmon->xe, "fan %d table count mismatch after commit, expected %u, got %u\n",
+ fan, point_count, accepted_count);
+ return -EIO;
+ }
+
+ xe_dbg(hwmon->xe, "fan %d user table committed successfully with %u points\n", fan,
+ point_count);
+ return 0;
+}
+
static int xe_hwmon_activate_user_fan_table(struct xe_hwmon *hwmon, u8 fan,
bool is_full_speed, enum fan_table_type table_source)
{
@@ -1272,6 +1356,8 @@ static int xe_hwmon_activate_user_fan_table(struct xe_hwmon *hwmon, u8 fan,
}
fi->fan_table[USER_FAN_TABLE].point_count = point_count;
+ fi->fan_table[USER_FAN_TABLE].temp_staged = 0;
+ fi->fan_table[USER_FAN_TABLE].speed_staged = 0;
fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
fi->is_full_speed = is_full_speed;
@@ -1337,12 +1423,354 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm, boo
fi->fan_table[USER_FAN_TABLE].fcp[i].speed);
}
fi->fan_table[USER_FAN_TABLE].point_count = MIN_FAN_CONTROL_POINTS;
+ fi->fan_table[USER_FAN_TABLE].temp_staged = 0;
+ fi->fan_table[USER_FAN_TABLE].speed_staged = 0;
fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
fi->is_full_speed = full_speed;
return 0;
}
+#define XE_CURVE_IDX(fan, point) (((fan) << 8) | (point))
+#define XE_CURVE_FAN(idx) ((u8)(((idx) >> 8) & 0xff))
+#define XE_CURVE_POINT(idx) ((u8)((idx) & 0xff))
+
+static int
+xe_hwmon_decode_curve_index(struct xe_hwmon *hwmon, u32 index, u8 *fan, u8 *point)
+{
+ u8 local_fan = XE_CURVE_FAN(index);
+ u8 local_point = XE_CURVE_POINT(index);
+
+ if (local_fan >= FAN_MAX || local_point >= MAX_FAN_CONTROL_POINTS) {
+ xe_dbg(hwmon->xe, "invalid fan curve index 0x%x: fan %u point %u\n",
+ index, local_fan, local_point);
+ return -EINVAL;
+ }
+
+ *fan = local_fan;
+ *point = local_point;
+
+ return 0;
+}
+
+static enum fan_table_type xe_hwmon_get_active_fan_table(struct xe_hwmon *hwmon, u8 fan)
+{
+ if (hwmon->fi[fan].pwm_enable_mode == XE_FAN_PWM_AUTO_STOCK_TABLE)
+ return STOCK_FAN_TABLE;
+ else
+ return USER_FAN_TABLE;
+}
+
+static ssize_t
+xe_hwmon_pwm_auto_point_temp_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
+ struct xe_hwmon *hwmon = dev_get_drvdata(dev);
+ enum fan_table_type active_table;
+ struct xe_hwmon_fan_info *fi;
+ u32 point_count;
+ u8 point;
+ u8 temp;
+ int ret;
+ u8 fan;
+
+ ret = xe_hwmon_decode_curve_index(hwmon, sattr->index, &fan, &point);
+ if (ret)
+ return ret;
+
+ guard(xe_pm_runtime)(hwmon->xe);
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ fi = &hwmon->fi[fan];
+ active_table = xe_hwmon_get_active_fan_table(hwmon, fan);
+
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, active_table);
+ if (ret)
+ goto unlock;
+
+ /* Slots beyond the active curve can still be staged for the next curve. */
+ if (point >= point_count &&
+ (active_table != USER_FAN_TABLE ||
+ !(fi->fan_table[USER_FAN_TABLE].temp_staged & BIT(point))))
+ temp = 0;
+ else if (point >= point_count)
+ temp = fi->fan_table[USER_FAN_TABLE].staged_fcp[point].temp;
+ else
+ temp = fi->fan_table[active_table].fcp[point].temp;
+ ret = sysfs_emit(buf, "%u\n", temp * MILLIDEGREE_PER_DEGREE);
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ return ret;
+}
+
+static int xe_hwmon_update_user_fan_point(struct xe_hwmon *hwmon, u8 fan, u32 point,
+ bool is_temp, u8 value)
+{
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ struct fan_table *table;
+ u32 point_count;
+ int ret;
+
+ table = &fi->fan_table[USER_FAN_TABLE];
+
+ if (is_temp) {
+ table->staged_fcp[point].temp = value;
+ table->temp_staged |= BIT(point);
+ } else {
+ table->staged_fcp[point].speed = value;
+ table->speed_staged |= BIT(point);
+ }
+
+ /* Wait for a complete prefix; (0, 0) ends the curve without becoming a point. */
+ for (point_count = 0; point_count < MAX_FAN_CONTROL_POINTS; point_count++) {
+ if (!(table->temp_staged & BIT(point_count)) ||
+ !(table->speed_staged & BIT(point_count)))
+ return 0;
+ if (!table->staged_fcp[point_count].temp &&
+ !table->staged_fcp[point_count].speed)
+ break;
+ }
+
+ if (point_count < MIN_FAN_CONTROL_POINTS) {
+ xe_dbg(hwmon->xe, "fan %d curve needs at least %d points, got %u\n",
+ fan, MIN_FAN_CONTROL_POINTS, point_count);
+ return -EINVAL;
+ }
+
+ ret = xe_hwmon_commit_user_fan_table(hwmon, fan, table->staged_fcp, point_count);
+ if (ret)
+ return ret;
+
+ /* Publish the new curve only after firmware accepts its point count. */
+ memcpy(table->fcp, table->staged_fcp, point_count * sizeof(table->fcp[0]));
+ table->point_count = point_count;
+ table->temp_staged = 0;
+ table->speed_staged = 0;
+ fi->pwm_enable_mode = XE_FAN_PWM_MANUAL_USER_TABLE;
+ fi->is_full_speed = false;
+ return 0;
+}
+
+static int xe_hwmon_sysfs_to_hw_val(struct xe_hwmon *hwmon, long val, bool is_temp, u8 *out)
+{
+ long max = is_temp ? U8_MAX : 100;
+ long hw_val;
+
+ /* Temperature is in degrees Celsius, speed in percent. */
+ if (is_temp)
+ hw_val = DIV_ROUND_CLOSEST(val, MILLIDEGREE_PER_DEGREE);
+ else
+ hw_val = DIV_ROUND_CLOSEST(val * 100, U8_MAX);
+
+ if (hw_val < 0 || hw_val > max) {
+ xe_dbg(hwmon->xe, "%s value %ld out of range\n", is_temp ? "temp" : "pwm", val);
+ return -EINVAL;
+ }
+
+ *out = hw_val;
+
+ return 0;
+}
+
+static ssize_t
+xe_hwmon_pwm_auto_point_temp_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
+ struct xe_hwmon *hwmon = dev_get_drvdata(dev);
+ struct xe_hwmon_fan_info *fi;
+ long val;
+ u8 point;
+ u8 temp;
+ int ret;
+ u8 fan;
+
+ ret = xe_hwmon_decode_curve_index(hwmon, sattr->index, &fan, &point);
+ if (ret)
+ return ret;
+
+ ret = kstrtol(buf, 10, &val);
+ if (ret)
+ return ret;
+
+ ret = xe_hwmon_sysfs_to_hw_val(hwmon, val, true, &temp);
+ if (ret)
+ return ret;
+
+ guard(xe_pm_runtime)(hwmon->xe);
+
+ mutex_lock(&hwmon->hwmon_lock);
+ fi = &hwmon->fi[fan];
+
+ if (fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
+ xe_err(hwmon->xe, "pwm%d_enable not in manual mode; cannot update temp point %d\n",
+ fan, point);
+ ret = -EINVAL;
+ goto unlock;
+ }
+
+ xe_dbg(hwmon->xe, "staging fan %d point %d temp to %u\n", fan, point, temp);
+ ret = xe_hwmon_update_user_fan_point(hwmon, fan, point, true, temp);
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ return ret ? ret : count;
+}
+
+static ssize_t
+xe_hwmon_pwm_auto_point_pwm_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
+ struct xe_hwmon *hwmon = dev_get_drvdata(dev);
+ enum fan_table_type active_table;
+ struct xe_hwmon_fan_info *fi;
+ u32 point_count;
+ u8 point;
+ u8 speed;
+ int ret;
+ u8 fan;
+
+ ret = xe_hwmon_decode_curve_index(hwmon, sattr->index, &fan, &point);
+ if (ret)
+ return ret;
+
+ guard(xe_pm_runtime)(hwmon->xe);
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ fi = &hwmon->fi[fan];
+ active_table = xe_hwmon_get_active_fan_table(hwmon, fan);
+
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, active_table);
+ if (ret)
+ goto unlock;
+
+ /* Slots beyond the active curve can still be staged for the next curve. */
+ if (point >= point_count &&
+ (active_table != USER_FAN_TABLE ||
+ !(fi->fan_table[USER_FAN_TABLE].speed_staged & BIT(point))))
+ speed = 0;
+ else if (point >= point_count)
+ speed = fi->fan_table[USER_FAN_TABLE].staged_fcp[point].speed;
+ else
+ speed = fi->fan_table[active_table].fcp[point].speed;
+ ret = sysfs_emit(buf, "%u\n", DIV_ROUND_CLOSEST(speed * U8_MAX, 100));
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ return ret;
+}
+
+static ssize_t
+xe_hwmon_pwm_auto_point_pwm_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
+ struct xe_hwmon *hwmon = dev_get_drvdata(dev);
+ struct xe_hwmon_fan_info *fi;
+ long val;
+ u8 point;
+ u8 speed;
+ int ret;
+ u8 fan;
+
+ ret = xe_hwmon_decode_curve_index(hwmon, sattr->index, &fan, &point);
+ if (ret)
+ return ret;
+
+ ret = kstrtol(buf, 10, &val);
+ if (ret)
+ return ret;
+
+ ret = xe_hwmon_sysfs_to_hw_val(hwmon, val, false, &speed);
+ if (ret)
+ return ret;
+
+ guard(xe_pm_runtime)(hwmon->xe);
+
+ mutex_lock(&hwmon->hwmon_lock);
+ fi = &hwmon->fi[fan];
+
+ if (fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
+ xe_err(hwmon->xe,
+ "pwm%d_enable is not in manual user mode, cannot update pwm point %d\n",
+ fan, point);
+ ret = -EINVAL;
+ goto unlock;
+ }
+
+ /* Speed and min_pwm are in percent; keep zero for the (0, 0) end marker. */
+ if (speed)
+ speed = max_t(u32, speed, min_t(u32, fi->min_pwm, 100));
+
+ xe_dbg(hwmon->xe, "staging fan %d point %d speed to %u%%\n", fan, point, speed);
+ ret = xe_hwmon_update_user_fan_point(hwmon, fan, point, false, speed);
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+
+ return ret ? ret : count;
+}
+
+static umode_t xe_hwmon_curve_attributes_visible(struct kobject *kobj,
+ struct attribute *attr, int index)
+{
+ struct device *dev = kobj_to_dev(kobj);
+ struct xe_hwmon *hwmon = dev_get_drvdata(dev);
+ u32 fan = index / XE_CURVE_ATTRS_PER_FAN;
+
+ if (!hwmon->xe->info.has_fan_control || !IS_FAN_ENABLED(hwmon, fan))
+ return 0;
+
+ /* All slots must exist at registration, before the user curve has been staged. */
+ return attr->mode;
+}
+
+static void xe_hwmon_init_curve_attrs(struct xe_hwmon *hwmon)
+{
+ int fan, kind, point, i = 0;
+
+ /* Per fan: all temp points then all pwm points; is_visible relies on this layout. */
+ for (fan = 0; fan < FAN_MAX; fan++) {
+ for (kind = 0; kind < 2; kind++) {
+ bool is_temp = !kind;
+
+ for (point = 0; point < MAX_FAN_CONTROL_POINTS; point++, i++) {
+ struct sensor_device_attribute *sda = &hwmon->curve_sda[i];
+
+ snprintf(hwmon->curve_names[i], XE_CURVE_ATTR_NAME_LEN,
+ "pwm%d_auto_point%d_%s", fan + 1, point + 1,
+ is_temp ? "temp" : "pwm");
+ sysfs_attr_init(&sda->dev_attr.attr);
+ sda->dev_attr.attr.name = hwmon->curve_names[i];
+ sda->dev_attr.attr.mode = 0644;
+ if (is_temp) {
+ sda->dev_attr.show = xe_hwmon_pwm_auto_point_temp_show;
+ sda->dev_attr.store = xe_hwmon_pwm_auto_point_temp_store;
+ } else {
+ sda->dev_attr.show = xe_hwmon_pwm_auto_point_pwm_show;
+ sda->dev_attr.store = xe_hwmon_pwm_auto_point_pwm_store;
+ }
+ sda->index = XE_CURVE_IDX(fan, point);
+ hwmon->curve_attrs[i] = &sda->dev_attr.attr;
+ }
+ }
+ }
+
+ hwmon->curve_group.attrs = hwmon->curve_attrs;
+ hwmon->curve_group.is_visible = xe_hwmon_curve_attributes_visible;
+}
+
static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
{
int point;
@@ -2061,7 +2489,7 @@ xe_hwmon_pwm_read(struct xe_hwmon *hwmon, u32 attr, int channel, long *val)
xe_dbg(hwmon->xe, "pwm read for fan %d: %ld\n", channel, *val);
break;
case hwmon_pwm_enable:
- *val = fi->pwm_enable_mode;
+ *val = fi->is_full_speed ? XE_FAN_PWM_FULL_SPEED : fi->pwm_enable_mode;
break;
default:
ret = -EOPNOTSUPP;
@@ -2134,6 +2562,8 @@ xe_hwmon_pwm_write(struct xe_hwmon *hwmon, u32 attr, int channel, long val)
channel);
fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
fi->is_full_speed = false;
+ fi->fan_table[USER_FAN_TABLE].temp_staged = 0;
+ fi->fan_table[USER_FAN_TABLE].speed_staged = 0;
} else {
ret = -EINVAL;
}
@@ -2378,10 +2808,16 @@ int xe_hwmon_register(struct xe_device *xe)
drm_dbg(&xe->drm, "Register xe hwmon interface\n");
+ hwmon->groups[0] = &hwmon_attrgroup;
+ if (xe->info.has_fan_control) {
+ xe_hwmon_init_curve_attrs(hwmon);
+ hwmon->groups[1] = &hwmon->curve_group;
+ }
+
/* hwmon_dev points to device hwmon<i> */
hwmon->hwmon_dev = hwmon_device_register_with_info(dev, "xe", hwmon,
&hwmon_chip_info,
- hwmon_groups);
+ hwmon->groups);
if (IS_ERR(hwmon->hwmon_dev)) {
ret = PTR_ERR(hwmon->hwmon_dev);
xe_log_err(xe, HWMON, ret, "Failed to register xe hwmon\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 06/10] drm/xe/hwmon: Enable fan curve control support
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
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-11-24 6:02 UTC (permalink / raw)
To: Karthik Poosa, intel-xe
Thank you for your contribution! Sashiko AI review found 8 potential
issues to consider:
- [Medium] drm/xe/hwmon: stale staged state on error in
xe_hwmon_update_user_fan_point()
- [Medium] drm/xe/hwmon: missing is_full_speed check in curve store
callbacks
- [Medium] drm/xe/hwmon: min_pwm clamping bypassed in
xe_hwmon_pwm_auto_point_pwm_store()
- [Medium] drm/xe/hwmon: overflow and post-rounding check in
xe_hwmon_sysfs_to_hw_val()
- [Medium] drm/xe/hwmon: live pcode count vs cache mismatch in curve
show callbacks
- [Low] drm/xe/hwmon: missing ABI documentation update claimed in commit
message
- [Low] drm/xe/hwmon: xe_err() and 0-based indices used in curve store
mode logs
- [Low] drm/xe/hwmon: guard() mixed with goto unlock in curve sysfs
callbacks
--
commit 148c3dbca37416a6517d9d7801eb5f432ec2b872
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Enable fan curve control support
This commit adds hwmon sysfs attributes pwm[1-3]_auto_point[1-10]_temp and
pwm[1-3]_auto_point[1-10]_pwm to stage and commit custom fan control curves
via pcode.
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 59a8521316c2c..77c4d1b0ecaef 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
[ ... ]
> @@ -1337,12 +1423,354 @@ static int xe_hwmon_set_user_fan_pwm(struct xe_hwmon *hwmon, u8 fan, u8 pwm, boo
[ ... ]
> +static ssize_t
> +xe_hwmon_pwm_auto_point_temp_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
[ ... ]
> + fi = &hwmon->fi[fan];
> + active_table = xe_hwmon_get_active_fan_table(hwmon, fan);
> +
> + ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, active_table);
> + if (ret)
> + goto unlock;
> +
> + /* Slots beyond the active curve can still be staged for the next curve. */
> + if (point >= point_count &&
> + (active_table != USER_FAN_TABLE ||
> + !(fi->fan_table[USER_FAN_TABLE].temp_staged & BIT(point))))
> + temp = 0;
> + else if (point >= point_count)
> + temp = fi->fan_table[USER_FAN_TABLE].staged_fcp[point].temp;
> + else
> + temp = fi->fan_table[active_table].fcp[point].temp;
> + ret = sysfs_emit(buf, "%u\n", temp * MILLIDEGREE_PER_DEGREE);
[Severity: Medium]
Should xe_hwmon_pwm_auto_point_temp_show() and
xe_hwmon_pwm_auto_point_pwm_show() use the cached
fi->fan_table[active_table].point_count and check temp_staged / speed_staged
before falling back to active fcp[point]?
Querying point_count live from pcode via xe_hwmon_get_fan_point_count() while
reading point values from the software cache can desynchronize the bound from
the cache: if a previous table update or stock table probe failed and reset
cached point_count to 0, pcode can still report a non-zero count and cause
show to read unpopulated or stale fcp[] entries, and if stock point_count
exceeded MAX_FAN_CONTROL_POINTS (which xe_hwmon_read_fan_control_info()
clamps), xe_hwmon_get_fan_point_count() fails with -EINVAL. Also, checking
temp_staged / speed_staged only when point >= point_count means staging a new
value for an existing point (< point_count) still reads back the old active
value until the whole curve is committed.
> +
> +unlock:
> + mutex_unlock(&hwmon->hwmon_lock);
> +
> + return ret;
> +}
> +
> +static int xe_hwmon_update_user_fan_point(struct xe_hwmon *hwmon, u8 fan, u32 point,
> + bool is_temp, u8 value)
> +{
> + struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
> + struct fan_table *table;
> + u32 point_count;
> + int ret;
> +
> + table = &fi->fan_table[USER_FAN_TABLE];
> +
> + if (is_temp) {
> + table->staged_fcp[point].temp = value;
> + table->temp_staged |= BIT(point);
> + } else {
> + table->staged_fcp[point].speed = value;
> + table->speed_staged |= BIT(point);
> + }
> +
> + /* Wait for a complete prefix; (0, 0) ends the curve without becoming a point. */
> + for (point_count = 0; point_count < MAX_FAN_CONTROL_POINTS; point_count++) {
> + if (!(table->temp_staged & BIT(point_count)) ||
> + !(table->speed_staged & BIT(point_count)))
> + return 0;
> + if (!table->staged_fcp[point_count].temp &&
> + !table->staged_fcp[point_count].speed)
> + break;
> + }
> +
> + if (point_count < MIN_FAN_CONTROL_POINTS) {
> + xe_dbg(hwmon->xe, "fan %d curve needs at least %d points, got %u\n",
> + fan, MIN_FAN_CONTROL_POINTS, point_count);
> + return -EINVAL;
> + }
> +
> + ret = xe_hwmon_commit_user_fan_table(hwmon, fan, table->staged_fcp, point_count);
> + if (ret)
> + return ret;
[Severity: Medium]
When curve validation or xe_hwmon_commit_user_fan_table() fails here, does
leaving table->temp_staged and table->speed_staged set wedge subsequent curve
writes?
Because every bit in the completed prefix remains set in temp_staged and
speed_staged after an error return, the next single-attribute sysfs write
immediately sees a complete prefix and re-runs the commit check with the left
over staged points instead of waiting for both temp and pwm of the new curve
to be staged. In addition, if xe_hwmon_commit_user_fan_table() fails in or
after xe_pcode_write_batch(), pcode's user table may already be partially
overwritten while table->point_count is not invalidated to 0 as in
xe_hwmon_set_user_fan_pwm().
[ ... ]
> +static int xe_hwmon_sysfs_to_hw_val(struct xe_hwmon *hwmon, long val, bool is_temp, u8 *out)
> +{
> + long max = is_temp ? U8_MAX : 100;
> + long hw_val;
> +
> + /* Temperature is in degrees Celsius, speed in percent. */
> + if (is_temp)
> + hw_val = DIV_ROUND_CLOSEST(val, MILLIDEGREE_PER_DEGREE);
> + else
> + hw_val = DIV_ROUND_CLOSEST(val * 100, U8_MAX);
> +
> + if (hw_val < 0 || hw_val > max) {
> + xe_dbg(hwmon->xe, "%s value %ld out of range\n", is_temp ? "temp" : "pwm", val);
> + return -EINVAL;
> + }
[Severity: Medium]
Can validating hw_val after DIV_ROUND_CLOSEST() overflow val * 100 and accept
out-of-range sysfs inputs?
Because val is an arbitrary signed long from kstrtol(), large values overflow
val * 100 or DIV_ROUND_CLOSEST() before the range check and can wrap into
0..max. Checking after rounding also accepts out-of-range inputs near the
boundaries, such as negative temperatures in -499..-1 (which round to 0 and
can trigger the (0, 0) end marker) or pwm values of -1 and 256. Validating
val against 0..U8_MAX * MILLIDEGREE_PER_DEGREE for temperature and 0..U8_MAX
for pwm before converting avoids both issues.
> +
> + *out = hw_val;
> +
> + return 0;
> +}
> +
> +static ssize_t
> +xe_hwmon_pwm_auto_point_temp_store(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
[ ... ]
> + guard(xe_pm_runtime)(hwmon->xe);
> +
> + mutex_lock(&hwmon->hwmon_lock);
> + fi = &hwmon->fi[fan];
> +
> + if (fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
> + xe_err(hwmon->xe, "pwm%d_enable not in manual mode; cannot update temp point %d\n",
> + fan, point);
> + ret = -EINVAL;
> + goto unlock;
> + }
[Severity: Medium]
Does this check allow staging and committing a user fan curve while
pwmN_enable is set to 0 (XE_FAN_PWM_FULL_SPEED)?
When full-speed mode is enabled via xe_hwmon_set_user_fan_pwm(),
fi->pwm_enable_mode is set to XE_FAN_PWM_MANUAL_USER_TABLE with
fi->is_full_speed = true. Because xe_hwmon_pwm_auto_point_temp_store() and
xe_hwmon_pwm_auto_point_pwm_store() do not check !fi->is_full_speed, curve
writes succeed in full-speed mode and silently clear fi->is_full_speed = false
on commit, switching pwmN_enable from 0 to 1.
> +
> + xe_dbg(hwmon->xe, "staging fan %d point %d temp to %u\n", fan, point, temp);
> + ret = xe_hwmon_update_user_fan_point(hwmon, fan, point, true, temp);
> +
> +unlock:
> + mutex_unlock(&hwmon->hwmon_lock);
> +
> + return ret ? ret : count;
> +}
> +
> +static ssize_t
> +xe_hwmon_pwm_auto_point_pwm_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
[ ... ]
> + ret = xe_hwmon_decode_curve_index(hwmon, sattr->index, &fan, &point);
> + if (ret)
> + return ret;
> +
> + guard(xe_pm_runtime)(hwmon->xe);
> +
> + mutex_lock(&hwmon->hwmon_lock);
> +
> + fi = &hwmon->fi[fan];
> + active_table = xe_hwmon_get_active_fan_table(hwmon, fan);
> +
> + ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, active_table);
> + if (ret)
> + goto unlock;
[ ... ]
> +unlock:
> + mutex_unlock(&hwmon->hwmon_lock);
> +
> + return ret;
> +}
[Severity: Low]
This isn't a bug, but the four new curve show/store callbacks mix
guard(xe_pm_runtime) with manual mutex_lock(&hwmon->hwmon_lock) and goto
unlock; using guard(mutex)(&hwmon->hwmon_lock) would avoid mixing cleanup
helpers with goto-based unwinding.
> +
> +static ssize_t
> +xe_hwmon_pwm_auto_point_pwm_store(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
[ ... ]
> + if (fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE) {
> + xe_err(hwmon->xe,
> + "pwm%d_enable is not in manual user mode, cannot update pwm point %d\n",
> + fan, point);
> + ret = -EINVAL;
> + goto unlock;
> + }
[Severity: Low]
Should this and the matching check in xe_hwmon_pwm_auto_point_temp_store() use
xe_dbg() and print fan + 1 and point + 1?
Logging at error level lets unprivileged-style invalid mode writes spam dmesg,
and printing the 0-based fan and point indices reports "pwm0_enable" and
"point 0" when writing to pwm1_auto_point1_pwm.
> +
> + /* Speed and min_pwm are in percent; keep zero for the (0, 0) end marker. */
> + if (speed)
> + speed = max_t(u32, speed, min_t(u32, fi->min_pwm, 100));
[Severity: Medium]
Can an active curve point bypass fi->min_pwm when userspace writes a pwm value
of 0 or 1?
Both 0 and 1 convert to speed == 0 in xe_hwmon_sysfs_to_hw_val(), so skipping
the clamp here leaves speed at 0% and xe_hwmon_commit_user_fan_table() writes
0% directly to pcode for active points whose temperature is non-zero. Also,
if a point has temp == 0 and userspace writes pwm == 1, rounding speed to 0
without clamping turns the point into a (0, 0) end-of-curve marker. Clamping
active points (0 .. point_count - 1) to fi->min_pwm at commit time after
identifying the (0, 0) terminator would enforce min_pwm on all active points.
[ ... ]
> +static void xe_hwmon_init_curve_attrs(struct xe_hwmon *hwmon)
> +{
> + int fan, kind, point, i = 0;
> +
> + /* Per fan: all temp points then all pwm points; is_visible relies on this layout. */
> + for (fan = 0; fan < FAN_MAX; fan++) {
> + for (kind = 0; kind < 2; kind++) {
> + bool is_temp = !kind;
> +
> + for (point = 0; point < MAX_FAN_CONTROL_POINTS; point++, i++) {
> + struct sensor_device_attribute *sda = &hwmon->curve_sda[i];
> +
> + snprintf(hwmon->curve_names[i], XE_CURVE_ATTR_NAME_LEN,
> + "pwm%d_auto_point%d_%s", fan + 1, point + 1,
> + is_temp ? "temp" : "pwm");
[Severity: Low]
The commit message states that this patch updates the Xe hwmon ABI
documentation for these attributes, but
Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon is not modified in this
patch. Was the documentation hunk dropped by mistake?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124054811.798763-1-karthik.poosa@intel.com?part=6
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (5 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 06/10] drm/xe/hwmon: Enable fan curve control support Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 5:53 ` sashiko-bot
2026-11-24 5:48 ` [PATCH v4 08/10] drm/xe/hwmon: Preserve fan user table across suspend resume Karthik Poosa
` (3 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Add kernel-doc for xe hwmon fan control and describe the fan control
model built around firmware stock tables and driver-managed user tables.
Document the exposed sysfs files for fan speed, maximum speed, pwm
control, pwm mode selection, and per-point fan curve temperature/PWM
programming.
This makes the hwmon fan control userspace interface easier to discover
and understand.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Document the numeric pwmN_enable values. (Soham)
- Note that pwmN and curve point writes need manual mode. (Soham)
- Document the (0, 0) end marker, the two-point minimum and the
non-decreasing rule for curves. (Soham)
- Describe pwmN writes as a two-point table and note percent rounding
and the minimum duty cycle clamp.
- Remove trailing whitespace.
drivers/gpu/drm/xe/xe_hwmon.c | 52 +++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index f52d689507a6..42b6d67e3879 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
+ *
+ * Xe fan control is exposed through the hwmon pwm and fan interfaces when the
+ * platform advertises PCODE-backed fan management support.
+ *
+ * The implementation tracks two fan tables per fan:
+ *
+ * - A stock table read from firmware through PCODE.
+ * - A user table cached in the driver and programmed back through PCODE.
+ *
+ * The pwmN_enable sysfs value selects how those tables are used:
+ *
+ * - 0 (``XE_FAN_PWM_FULL_SPEED``) programs a two-point user table at 100
+ * percent duty cycle as a full-speed override.
+ * - 1 (``XE_FAN_PWM_MANUAL_USER_TABLE``) enables the user table for manual
+ * control.
+ * - 2 (``XE_FAN_PWM_AUTO_STOCK_TABLE``) restores automatic control using the
+ * stock firmware table.
+ *
+ * The fan-control sysfs files are:
+ *
+ * - ``fanN_input`` reports the measured fan speed in RPM.
+ * - ``fanN_max`` reports the maximum supported fan speed in RPM.
+ * - ``pwmN`` reads or sets the manual PWM duty cycle in the hwmon 0..255
+ * range.
+ * - ``pwmN_enable`` selects the mode described above.
+ * - ``pwmN_auto_pointM_temp`` exposes the temperature threshold for user-table
+ * point ``M`` in millidegrees Celsius.
+ * - ``pwmN_auto_pointM_pwm`` exposes the PWM value for user-table point ``M``
+ * in the hwmon 0..255 range.
+ *
+ * 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.
+ *
+ * Writes to ``pwmN_auto_pointM_temp`` and ``pwmN_auto_pointM_pwm`` are staged
+ * in the driver, so intermediate writes never reach firmware as a partial
+ * curve. The staged curve is committed once points 1..K all have both a
+ * temperature and a PWM value and either point K+1 is set to (0, 0) or K is
+ * the last supported point. The (0, 0) end marker is not part of the curve.
+ * A curve must have at least two points, and temperature and PWM must not
+ * decrease from one point to the next; otherwise the completing write fails
+ * with -EINVAL.
+ *
+ * Writes to ``pwmN`` replace the user table with a two-point table at a
+ * constant duty cycle.
+ */
+
/**
* enum xe_fan_pwm_enable_mode - fan PWM enable modes
*/
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control
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
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-11-24 5:53 UTC (permalink / raw)
To: Karthik Poosa, intel-xe
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 08/10] drm/xe/hwmon: Preserve fan user table across suspend resume
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (6 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 07/10] drm/xe/hwmon: Add kernel-doc for fan control Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 6:07 ` sashiko-bot
2026-11-24 5:48 ` [PATCH v4 09/10] drm/xe/hwmon: Update fan info after late binding Karthik Poosa
` (2 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Save and restore active fan user tables over suspend/resume via new
xe_hwmon PM hooks.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2: Use xe_pcode_read() instead of xe_pcode_read_timeout().
v3:
- Use u32 for the point index. (Soham)
- Say "user table point" in suspend warnings. (Soham)
- Sort the xe_hwmon.h include. (Soham)
- Call the system PM hooks from xe_device_suspend() and
xe_device_resume() after the upstream refactor, so FLR also
restores the table.
- Check d3cold.allowed only for runtime PM; system suspend always
loses the table.
- Pass hwmon to IS_FAN_ENABLED().
drivers/gpu/drm/xe/xe_device.c | 4 +
drivers/gpu/drm/xe/xe_hwmon.c | 135 +++++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_hwmon.h | 4 +
drivers/gpu/drm/xe/xe_pm.c | 5 ++
4 files changed, 148 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index eafc66d686e2..495e39c75072 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1418,6 +1418,8 @@ int xe_device_suspend(struct xe_device *xe, bool hibernate, bool flr)
for_each_gt(gt, xe, id)
xe_gt_suspend_prepare(gt);
+ xe_hwmon_suspend(xe, false);
+
if (flr) {
for_each_gt(gt, xe, id)
xe_gt_flr_prepare(gt);
@@ -1546,5 +1548,7 @@ int xe_device_resume(struct xe_device *xe, bool flr)
xe_late_bind_pm_resume(&xe->late_bind);
+ xe_hwmon_resume(xe, false);
+
return 0;
}
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 42b6d67e3879..e29774523f37 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -271,6 +271,8 @@ struct xe_hwmon_fan_info {
u8 pwm_enable_mode;
/** @is_full_speed: flag indicating if fan is in full speed */
bool is_full_speed;
+ /** @restore_user_table: restore user fan table on next resume */
+ bool restore_user_table;
};
/**
@@ -2898,4 +2900,137 @@ void xe_hwmon_unregister(struct xe_device *xe)
hwmon_device_unregister(xe->hwmon->hwmon_dev);
xe->hwmon = NULL;
}
+
+/**
+ * xe_hwmon_suspend - Save hwmon state before suspend
+ * @xe: xe device instance
+ * @runtime: true for runtime suspend, false for system suspend or FLR prepare
+ *
+ * Save any hwmon runtime state that must survive PM suspend transitions.
+ */
+void xe_hwmon_suspend(struct xe_device *xe, bool runtime)
+{
+ struct xe_hwmon *hwmon = xe->hwmon;
+ struct xe_tile *root_tile;
+ int fan;
+
+ if (!hwmon || !xe->info.has_fan_control)
+ return;
+
+ /* Runtime suspend keeps the fan tables unless the device enters d3cold. */
+ if (runtime && !xe->d3cold.allowed) {
+ xe_dbg(xe, "d3cold not allowed, skipping fan user-table snapshot\n");
+ return;
+ }
+
+ root_tile = xe_device_get_root_tile(hwmon->xe);
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ for (fan = 0; fan < FAN_MAX; fan++) {
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ struct fan_control_point points[MAX_FAN_CONTROL_POINTS];
+ u32 point_count = 0;
+ u32 point;
+ int ret;
+
+ if (!IS_FAN_ENABLED(hwmon, fan))
+ continue;
+
+ fi->restore_user_table = false;
+ if (fi->pwm_enable_mode == XE_FAN_PWM_AUTO_STOCK_TABLE)
+ continue;
+
+ ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, USER_FAN_TABLE);
+ if (ret || point_count < MIN_FAN_CONTROL_POINTS) {
+ xe_warn(hwmon->xe,
+ "fan %d user table point count before suspend invalid, ret=%d, count=%u\n",
+ fan, ret, point_count);
+ continue;
+ }
+
+ for (point = 0; point < point_count; point++) {
+ u32 fcp = FCP_INDEX(USER_FAN_TABLE, point);
+
+ ret = xe_pcode_read(root_tile, PCODE_MBOX(FAN_SPEED_CONTROL,
+ FSC_READ_FAN_TABLE, fan),
+ &fcp, NULL);
+ if (ret) {
+ xe_warn(hwmon->xe,
+ "failed to read fan %d user table point %u before suspend, ret=%d\n",
+ fan, point, ret);
+ break;
+ }
+
+ points[point].temp =
+ REG_FIELD_GET(FAN_CONTROL_POINT_TEMP_MASK, fcp);
+ points[point].speed =
+ REG_FIELD_GET(FAN_CONTROL_POINT_SPEED_MASK, fcp);
+ }
+ if (ret)
+ continue;
+
+ memcpy(fi->fan_table[USER_FAN_TABLE].fcp, points,
+ point_count * sizeof(points[0]));
+ fi->fan_table[USER_FAN_TABLE].point_count = point_count;
+ fi->restore_user_table = true;
+ xe_dbg(hwmon->xe,
+ "fan %d user table snapshot taken before suspend, point_count=%u\n", fan,
+ point_count);
+ }
+
+ mutex_unlock(&hwmon->hwmon_lock);
+}
+
+/**
+ * xe_hwmon_resume - Restore hwmon state after resume
+ * @xe: xe device instance
+ * @runtime: true for runtime resume, false for system resume or FLR done
+ *
+ * Restore any hwmon runtime state that was saved across suspend.
+ */
+void xe_hwmon_resume(struct xe_device *xe, bool runtime)
+{
+ struct xe_hwmon *hwmon = xe->hwmon;
+ int fan;
+
+ if (!hwmon || !xe->info.has_fan_control)
+ return;
+
+ if (runtime && !xe->d3cold.allowed) {
+ xe_dbg(xe, "d3cold not allowed, skipping fan user-table restore\n");
+ return;
+ }
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ for (fan = 0; fan < FAN_MAX; fan++) {
+ struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
+ int ret;
+
+ if (!IS_FAN_ENABLED(hwmon, fan))
+ continue;
+
+ if (!fi->restore_user_table) {
+ xe_dbg(xe, "fan %d user table restore not required\n", fan);
+ continue;
+ }
+
+ /* Re-program cached user-table settings for fans active before suspend. */
+ ret = xe_hwmon_activate_user_fan_table(hwmon, fan,
+ fi->is_full_speed,
+ USER_FAN_TABLE);
+ if (ret) {
+ xe_warn(xe, "failed to restore fan %d user table after resume, ret=%d\n",
+ fan, ret);
+ continue;
+ }
+
+ xe_dbg(xe, "fan %d user table restored\n", fan);
+ fi->restore_user_table = false;
+ }
+
+ mutex_unlock(&hwmon->hwmon_lock);
+}
+
MODULE_IMPORT_NS("INTEL_PMT_TELEMETRY");
diff --git a/drivers/gpu/drm/xe/xe_hwmon.h b/drivers/gpu/drm/xe/xe_hwmon.h
index e67e0134f02a..50874b6b6527 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.h
+++ b/drivers/gpu/drm/xe/xe_hwmon.h
@@ -13,9 +13,13 @@ struct xe_device;
#if IS_REACHABLE(CONFIG_HWMON)
int xe_hwmon_register(struct xe_device *xe);
void xe_hwmon_unregister(struct xe_device *xe);
+void xe_hwmon_suspend(struct xe_device *xe, bool runtime);
+void xe_hwmon_resume(struct xe_device *xe, bool runtime);
#else
static inline int xe_hwmon_register(struct xe_device *xe) { return 0; };
static inline void xe_hwmon_unregister(struct xe_device *xe) { }
+static inline void xe_hwmon_suspend(struct xe_device *xe, bool runtime) {}
+static inline void xe_hwmon_resume(struct xe_device *xe, bool runtime) {}
#endif
#endif /* _XE_HWMON_H_ */
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index f73f68bd449b..05e10254b61e 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -20,6 +20,7 @@
#include "xe_ggtt.h"
#include "xe_gt.h"
#include "xe_gt_idle.h"
+#include "xe_hwmon.h"
#include "xe_i2c.h"
#include "xe_irq.h"
#include "xe_late_bind_fw.h"
@@ -567,6 +568,8 @@ int xe_pm_runtime_suspend(struct xe_device *xe)
if (err)
goto out;
+ xe_hwmon_suspend(xe, true);
+
/*
* Applying lock for entire list op as xe_ttm_bo_destroy and xe_bo_move_notify
* also checks and deletes bo entry from user fault list.
@@ -683,6 +686,8 @@ int xe_pm_runtime_resume(struct xe_device *xe)
xe_pxp_pm_resume(xe->pxp);
+ xe_hwmon_resume(xe, true);
+
if (IS_VF_CCS_READY(xe))
xe_sriov_vf_ccs_register_context(xe);
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 08/10] drm/xe/hwmon: Preserve fan user table across suspend resume
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
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-11-24 6:07 UTC (permalink / raw)
To: Karthik Poosa, intel-xe
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] drm/xe/hwmon: xe_hwmon_resume() clears staged fan curve
points
- [Medium] drm/xe/hwmon: fan mode desync on PCODE error in
suspend/resume
- [Medium] drm/xe/hwmon: xe_hwmon_suspend() treats unprobed fan mode as
user table
- [Medium] drm/xe/hwmon: uninitialized point_count in
xe_hwmon_get_fan_point_count()
--
commit 5afbb369b25a32407c56f7ca0be622b0b78f35d5
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Preserve fan user table across suspend resume
This commit adds xe_hwmon_suspend() and xe_hwmon_resume() hooks to save
active fan user tables before suspend or FLR and restore them on resume.
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index b9e2e76d73c33..8efb5d2ce9ac2 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
[ ... ]
> @@ -2898,4 +2900,137 @@ void xe_hwmon_unregister(struct xe_device *xe)
> hwmon_device_unregister(xe->hwmon->hwmon_dev);
> xe->hwmon = NULL;
> }
> +
> +/**
> + * xe_hwmon_suspend - Save hwmon state before suspend
> + * @xe: xe device instance
> + * @runtime: true for runtime suspend, false for system suspend or FLR prepare
> + *
> + * Save any hwmon runtime state that must survive PM suspend transitions.
> + */
> +void xe_hwmon_suspend(struct xe_device *xe, bool runtime)
> +{
> + struct xe_hwmon *hwmon = xe->hwmon;
> + struct xe_tile *root_tile;
> + int fan;
> +
> + if (!hwmon || !xe->info.has_fan_control)
> + return;
> +
> + /* Runtime suspend keeps the fan tables unless the device enters d3cold. */
> + if (runtime && !xe->d3cold.allowed) {
> + xe_dbg(xe, "d3cold not allowed, skipping fan user-table snapshot\n");
> + return;
> + }
> +
> + root_tile = xe_device_get_root_tile(hwmon->xe);
> +
> + mutex_lock(&hwmon->hwmon_lock);
> +
> + for (fan = 0; fan < FAN_MAX; fan++) {
> + struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
> + struct fan_control_point points[MAX_FAN_CONTROL_POINTS];
> + u32 point_count = 0;
> + u32 point;
> + int ret;
> +
> + if (!IS_FAN_ENABLED(hwmon, fan))
> + continue;
> +
> + fi->restore_user_table = false;
> + if (fi->pwm_enable_mode == XE_FAN_PWM_AUTO_STOCK_TABLE)
> + continue;
[Severity: Medium]
Can this treat an uninitialized fi->pwm_enable_mode as an active user fan
table?
Because struct xe_hwmon is zero-allocated, fi->pwm_enable_mode starts at 0
(XE_FAN_PWM_FULL_SPEED) and is only set to XE_FAN_PWM_AUTO_STOCK_TABLE in
xe_hwmon_read_fan_control_info() after reading the stock fan table from
PCODE succeeds. On platforms like DG2 (which sets fan_enable_mask =
GENMASK(1, 0) for tachometer reads without PCODE fan tables) or when stock
table initialization fails at probe, fi->pwm_enable_mode stays 0 while
IS_FAN_ENABLED(hwmon, fan) is true. Since every path that activates a user
table sets fi->pwm_enable_mode to XE_FAN_PWM_MANUAL_USER_TABLE, checking
only for equality with XE_FAN_PWM_AUTO_STOCK_TABLE causes
xe_hwmon_suspend() to issue failing PCODE reads and log warnings on every
suspend.
Checking fi->pwm_enable_mode != XE_FAN_PWM_MANUAL_USER_TABLE would skip
fans that have no active user table.
> +
> + ret = xe_hwmon_get_fan_point_count(hwmon, fan, &point_count, USER_FAN_TABLE);
> + if (ret || point_count < MIN_FAN_CONTROL_POINTS) {
> + xe_warn(hwmon->xe,
> + "fan %d user table point count before suspend invalid, ret=%d, count=%u\n",
> + fan, ret, point_count);
> + continue;
> + }
> +
> + for (point = 0; point < point_count; point++) {
> + u32 fcp = FCP_INDEX(USER_FAN_TABLE, point);
> +
> + ret = xe_pcode_read(root_tile, PCODE_MBOX(FAN_SPEED_CONTROL,
> + FSC_READ_FAN_TABLE, fan),
> + &fcp, NULL);
> + if (ret) {
> + xe_warn(hwmon->xe,
> + "failed to read fan %d user table point %u before suspend, ret=%d\n",
> + fan, point, ret);
> + break;
> + }
> +
> + points[point].temp =
> + REG_FIELD_GET(FAN_CONTROL_POINT_TEMP_MASK, fcp);
> + points[point].speed =
> + REG_FIELD_GET(FAN_CONTROL_POINT_SPEED_MASK, fcp);
> + }
> + if (ret)
> + continue;
> +
> + memcpy(fi->fan_table[USER_FAN_TABLE].fcp, points,
> + point_count * sizeof(points[0]));
> + fi->fan_table[USER_FAN_TABLE].point_count = point_count;
> + fi->restore_user_table = true;
[Severity: Medium]
Does xe_hwmon_suspend() need to re-read the user table from PCODE when
fi->fan_table[USER_FAN_TABLE] is already cached by every path that commits
or activates a user table?
xe_device_suspend() also runs during PCIe FLR prepare via
xe_pci_reset_prepare(), when hardware state may be corrupted and PCODE
mailbox reads can fail. Because fi->restore_user_table is cleared to false
before the PCODE reads, a mailbox error during suspend or FLR prepare skips
restoring the already-cached user table on resume. When either this
pre-suspend read or xe_hwmon_activate_user_fan_table() in xe_hwmon_resume()
fails, hardware falls back to the stock fan table after reset while
fi->pwm_enable_mode remains XE_FAN_PWM_MANUAL_USER_TABLE and
fi->is_full_speed remains set, leaving sysfs out of sync with the hardware.
[ ... ]
> +void xe_hwmon_resume(struct xe_device *xe, bool runtime)
> +{
> + struct xe_hwmon *hwmon = xe->hwmon;
> + int fan;
> +
> + if (!hwmon || !xe->info.has_fan_control)
> + return;
> +
> + if (runtime && !xe->d3cold.allowed) {
> + xe_dbg(xe, "d3cold not allowed, skipping fan user-table restore\n");
> + return;
> + }
> +
> + mutex_lock(&hwmon->hwmon_lock);
> +
> + for (fan = 0; fan < FAN_MAX; fan++) {
> + struct xe_hwmon_fan_info *fi = &hwmon->fi[fan];
> + int ret;
> +
> + if (!IS_FAN_ENABLED(hwmon, fan))
> + continue;
> +
> + if (!fi->restore_user_table) {
> + xe_dbg(xe, "fan %d user table restore not required\n", fan);
> + continue;
> + }
> +
> + /* Re-program cached user-table settings for fans active before suspend. */
> + ret = xe_hwmon_activate_user_fan_table(hwmon, fan,
> + fi->is_full_speed,
> + USER_FAN_TABLE);
[Severity: Medium]
Does calling xe_hwmon_activate_user_fan_table() on resume discard fan curve
points that userspace is in the middle of staging?
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_activate_user_fan_table() {
...
fi->fan_table[USER_FAN_TABLE].point_count = point_count;
fi->fan_table[USER_FAN_TABLE].temp_staged = 0;
fi->fan_table[USER_FAN_TABLE].speed_staged = 0;
...
}
Each sysfs write in xe_hwmon_pwm_auto_point_temp_store() and
xe_hwmon_pwm_auto_point_pwm_store() only holds a runtime PM reference for
that single attribute write while staging a multi-point curve in
Manual/User mode. If the device enters D3cold runtime suspend or system
suspend between point writes, xe_hwmon_resume() zeroes temp_staged and
speed_staged, so subsequent writes to finish the curve see missing prefix
bits in xe_hwmon_update_user_fan_point() and return 0 without committing
the curve.
> + if (ret) {
> + xe_warn(xe, "failed to restore fan %d user table after resume, ret=%d\n",
> + fan, ret);
> + continue;
> + }
[Severity: Medium]
Does xe_hwmon_get_fan_point_count() pass uninitialized or non-zero values
in *point_count into PCODE_DATA0?
__pcode_mailbox_rw() writes *data0 to PCODE_DATA0 before issuing the
mailbox read command, but xe_hwmon_get_fan_point_count() passes point_count
straight to xe_hwmon_pcode_read_fan_control() without initializing
*point_count = 0. In xe_hwmon_activate_user_fan_table() (called here on
resume), point_count holds source_table->point_count rather than 0, and in
xe_hwmon_pwm_auto_point_temp_show() and xe_hwmon_pwm_auto_point_pwm_show(),
point_count is an uninitialized stack variable whose contents are written to
PCODE_DATA0.
Initializing *point_count = 0 at the start of
xe_hwmon_get_fan_point_count() would avoid passing stale or uninitialized
data to PCODE.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124054811.798763-1-karthik.poosa@intel.com?part=8
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 09/10] drm/xe/hwmon: Update fan info after late binding
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (7 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 08/10] drm/xe/hwmon: Preserve fan user table across suspend resume Karthik Poosa
@ 2026-11-24 5:48 ` 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-24 5:56 ` ✗ CI.KUnit: failure for drm/xe/hwmon: Add fan control support Patchwork
10 siblings, 1 reply; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Add xe_hwmon_fan_update_post_lb() to re-read the fan enable mask and
stock fan tables once the fan-control late binding firmware is loaded.
Pass a mask of newly enabled fans to xe_hwmon_read_fan_control_info(),
so only those fans start in automatic mode and the mode selected by the
user is kept for fans that were already known.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
v2:
- Compare lbfw->id with XE_LB_FW_FAN_CONTROL. (Soham)
- Use xe already in scope. (Soham)
- Spell out "late binding" in warnings. (Soham)
- Return an error from xe_hwmon_get_fan_enable_mask() and keep the
old mask if the read fails.
- Start fans enabled after late binding in automatic mode.
drivers/gpu/drm/xe/xe_hwmon.c | 47 +++++++++++++++++++++++-----
drivers/gpu/drm/xe/xe_hwmon.h | 2 ++
drivers/gpu/drm/xe/xe_late_bind_fw.c | 3 ++
3 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index e29774523f37..2f1d779e2784 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -1223,14 +1223,14 @@ static int xe_hwmon_pcode_read_fan_control(const struct xe_hwmon *hwmon, u32 sub
uval, NULL);
}
-static void xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
+static int xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
{
int ret;
/* Platforms that don't return correct value */
if (hwmon->xe->info.platform == XE_DG2) {
hwmon->fan_enable_mask = GENMASK(1, 0);
- return;
+ return 0;
}
ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_NUM_FANS, 0,
@@ -1238,7 +1238,7 @@ static void xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
if (ret) {
hwmon->fan_enable_mask = 0;
xe_warn(hwmon->xe, "failed to read number of fans, ret=%d\n", ret);
- return;
+ return ret;
}
/* Check if fan mask exceeds FAN_MAX and log a warning if it does */
@@ -1249,6 +1249,8 @@ static void xe_hwmon_get_fan_enable_mask(struct xe_hwmon *hwmon)
}
xe_info(hwmon->xe, "Number of fans detected: %u\n", hweight32(hwmon->fan_enable_mask));
+
+ return 0;
}
static int xe_hwmon_get_fan_point_count(struct xe_hwmon *hwmon, u8 fan, u32 *point_count,
@@ -1825,7 +1827,7 @@ static void xe_hwmon_init_curve_attrs(struct xe_hwmon *hwmon)
hwmon->curve_group.is_visible = xe_hwmon_curve_attributes_visible;
}
-static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
+static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon, u32 new_fan_mask)
{
int point;
int fan;
@@ -1897,8 +1899,9 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
if (!fi->fan_table[STOCK_FAN_TABLE].point_count)
continue;
- /* Set PWM enable mode to automatic i.e stock table in use. */
- fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
+ /* Start new fans in automatic mode; keep the user's mode for known fans. */
+ if (new_fan_mask & BIT(fan))
+ fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
/* Read minimum fan PWM */
ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_FAN_MIN_PWM, fan,
@@ -2824,7 +2827,7 @@ xe_hwmon_get_preregistration_info(struct xe_hwmon *hwmon)
xe_hwmon_fan_input_read(hwmon, channel, &fan_speed);
/* Fan control tables initialization */
- if (xe_hwmon_read_fan_control_info(hwmon))
+ if (xe_hwmon_read_fan_control_info(hwmon, hwmon->fan_enable_mask))
xe_warn(hwmon->xe, "Fan control tables are not available\n");
}
return xe_hwmon_init_temp_info(hwmon);
@@ -3033,4 +3036,34 @@ void xe_hwmon_resume(struct xe_device *xe, bool runtime)
mutex_unlock(&hwmon->hwmon_lock);
}
+/**
+ * xe_hwmon_fan_update_post_lb - Update fan info after late binding
+ * @xe: xe device instance
+ *
+ * This function reads the number of fans and their stock table after late binding.
+ */
+void xe_hwmon_fan_update_post_lb(struct xe_device *xe)
+{
+ struct xe_hwmon *hwmon = xe->hwmon;
+ u32 old_mask;
+
+ if (!hwmon || !xe->info.has_fan_control)
+ return;
+
+ mutex_lock(&hwmon->hwmon_lock);
+
+ old_mask = hwmon->fan_enable_mask;
+ if (xe_hwmon_get_fan_enable_mask(hwmon)) {
+ xe_warn(hwmon->xe, "keeping fan enable mask %#x after late binding\n", old_mask);
+ hwmon->fan_enable_mask = old_mask;
+ goto unlock;
+ }
+
+ if (xe_hwmon_read_fan_control_info(hwmon, hwmon->fan_enable_mask & ~old_mask))
+ xe_warn(hwmon->xe, "failed to read stock fan tables after late binding\n");
+
+unlock:
+ mutex_unlock(&hwmon->hwmon_lock);
+}
+
MODULE_IMPORT_NS("INTEL_PMT_TELEMETRY");
diff --git a/drivers/gpu/drm/xe/xe_hwmon.h b/drivers/gpu/drm/xe/xe_hwmon.h
index 50874b6b6527..4d46290e7a9d 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.h
+++ b/drivers/gpu/drm/xe/xe_hwmon.h
@@ -15,11 +15,13 @@ int xe_hwmon_register(struct xe_device *xe);
void xe_hwmon_unregister(struct xe_device *xe);
void xe_hwmon_suspend(struct xe_device *xe, bool runtime);
void xe_hwmon_resume(struct xe_device *xe, bool runtime);
+void xe_hwmon_fan_update_post_lb(struct xe_device *xe);
#else
static inline int xe_hwmon_register(struct xe_device *xe) { return 0; };
static inline void xe_hwmon_unregister(struct xe_device *xe) { }
static inline void xe_hwmon_suspend(struct xe_device *xe, bool runtime) {}
static inline void xe_hwmon_resume(struct xe_device *xe, bool runtime) {}
+static inline void xe_hwmon_fan_update_post_lb(struct xe_device *xe) {}
#endif
#endif /* _XE_HWMON_H_ */
diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
index 355d7c841871..2ac92a12cc32 100644
--- a/drivers/gpu/drm/xe/xe_late_bind_fw.c
+++ b/drivers/gpu/drm/xe/xe_late_bind_fw.c
@@ -13,6 +13,7 @@
#include <drm/drm_print.h>
#include "xe_device.h"
+#include "xe_hwmon.h"
#include "xe_late_bind_fw.h"
#include "xe_pcode.h"
#include "xe_pcode_api.h"
@@ -289,6 +290,8 @@ static void xe_late_bind_work(struct work_struct *work)
if (!ret) {
drm_dbg(&xe->drm, "Load %s firmware successful\n",
fw_id_to_name[lbfw->id]);
+ if (lbfw->id == XE_LB_FW_FAN_CONTROL)
+ xe_hwmon_fan_update_post_lb(xe);
goto out;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 09/10] drm/xe/hwmon: Update fan info after late binding
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
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-11-24 6:11 UTC (permalink / raw)
To: Karthik Poosa, intel-xe
Thank you for your contribution! Sashiko AI review found 5 potential
issues to consider:
- [Medium] drm/xe/hwmon: known fans stay in full-speed mode after late
binding
- [Medium] drm/xe/hwmon: post-late-bind fan updates miss sysfs and tach
init
- [Medium] drm/xe/hwmon: use-after-free race in
xe_hwmon_fan_update_post_lb()
- [Medium] drm/xe/hwmon: probe race between xe_hwmon_register() and late
bind
- [Low] drm/xe/hwmon: unlocked max_rps read in xe_hwmon_fan_read()
--
commit 2b5439814ad9ed08f4a6cb30739b8d99fd5d96cb
Author: Karthik Poosa <karthik.poosa@intel.com>
drm/xe/hwmon: Update fan info after late binding
This commit adds xe_hwmon_fan_update_post_lb() to re-read the fan enable
mask and stock fan tables once the fan-control late-binding firmware is
loaded, initializing newly enabled fans in automatic mode.
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
> index 8efb5d2ce9ac2..c34f13b6e3ce8 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
[ ... ]
> @@ -1825,7 +1827,7 @@ static void xe_hwmon_init_curve_attrs(struct xe_hwmon *hwmon)
> hwmon->curve_group.is_visible = xe_hwmon_curve_attributes_visible;
> }
>
> -static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
> +static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon, u32 new_fan_mask)
> {
> int point;
> int fan;
> @@ -1897,8 +1899,9 @@ static int xe_hwmon_read_fan_control_info(struct xe_hwmon *hwmon)
> if (!fi->fan_table[STOCK_FAN_TABLE].point_count)
> continue;
>
> - /* Set PWM enable mode to automatic i.e stock table in use. */
> - fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
> + /* Start new fans in automatic mode; keep the user's mode for known fans. */
> + if (new_fan_mask & BIT(fan))
> + fi->pwm_enable_mode = XE_FAN_PWM_AUTO_STOCK_TABLE;
>
> /* Read minimum fan PWM */
> ret = xe_hwmon_pcode_read_fan_control(hwmon, FSC_READ_FAN_MIN_PWM, fan,
[Severity: Medium]
Does gating fi->pwm_enable_mode initialization on new_fan_mask leave known
fans stuck at 0 (XE_FAN_PWM_FULL_SPEED) after late binding?
Before late binding completes, a fan can already be set in
hwmon->fan_enable_mask (which __xe_late_bind_fw_init() requires before even
loading XE_LB_FW_FAN_CONTROL) while its stock fan table is not yet
available in pcode. During xe_hwmon_get_preregistration_info(),
xe_hwmon_read_fan_control_info() hits the early continue when
FSC_READ_STOCK_FAN_CONTROL_POINTS fails or returns 0, leaving the
zero-allocated fi->pwm_enable_mode at XE_FAN_PWM_FULL_SPEED.
When xe_hwmon_fan_update_post_lb() later runs, BIT(fan) is already in
old_mask, so hwmon->fan_enable_mask & ~old_mask clears BIT(fan) and
fi->pwm_enable_mode is never set to XE_FAN_PWM_AUTO_STOCK_TABLE. As a
result, pwmN_enable reports 0, reading the fan curve selects USER_FAN_TABLE
instead of STOCK_FAN_TABLE, and xe_hwmon_suspend() treats the fan as using
a manual user table.
> @@ -2824,7 +2827,7 @@ xe_hwmon_get_preregistration_info(struct xe_hwmon *hwmon)
> xe_hwmon_fan_input_read(hwmon, channel, &fan_speed);
>
> /* Fan control tables initialization */
> - if (xe_hwmon_read_fan_control_info(hwmon))
> + if (xe_hwmon_read_fan_control_info(hwmon, hwmon->fan_enable_mask))
> xe_warn(hwmon->xe, "Fan control tables are not available\n");
> }
> return xe_hwmon_init_temp_info(hwmon);
[Severity: Medium]
Can xe_hwmon_get_preregistration_info() and hwmon_device_register_with_info()
race with xe_hwmon_fan_update_post_lb() during device probe?
In xe_device_probe(), xe_late_bind_init() queues xe_late_bind_work() before
xe_hwmon_register() runs, and xe_hwmon_register() assigns xe->hwmon = hwmon
before calling xe_hwmon_get_preregistration_info() and
hwmon_device_register_with_info() without holding hwmon->hwmon_lock:
CPU0 CPU1 (late_bind->wq)
xe_hwmon_register()
xe->hwmon = hwmon
xe_hwmon_get_preregistration_info()
xe_late_bind_work()
xe_hwmon_fan_update_post_lb()
mutex_lock(&hwmon->hwmon_lock)
xe_hwmon_get_fan_enable_mask()
xe_hwmon_read_fan_control_info()
mutex_unlock(&hwmon->hwmon_lock)
xe_hwmon_get_fan_enable_mask()
xe_hwmon_read_fan_control_info() <-- unlocked data race / overwrite
Concurrent execution can overwrite the post-late-binding fan state or
transiently zero hwmon->fan_enable_mask while
hwmon_device_register_with_info() is evaluating sysfs attribute visibility.
> @@ -3033,4 +3036,34 @@ void xe_hwmon_resume(struct xe_device *xe, bool runtime)
> mutex_unlock(&hwmon->hwmon_lock);
> }
>
> +/**
> + * xe_hwmon_fan_update_post_lb - Update fan info after late binding
> + * @xe: xe device instance
> + *
> + * This function reads the number of fans and their stock table after late binding.
> + */
> +void xe_hwmon_fan_update_post_lb(struct xe_device *xe)
> +{
> + struct xe_hwmon *hwmon = xe->hwmon;
> + u32 old_mask;
> +
> + if (!hwmon || !xe->info.has_fan_control)
> + return;
> +
> + mutex_lock(&hwmon->hwmon_lock);
[Severity: Medium]
Can xe_hwmon_fan_update_post_lb() race with device removal or probe unwind
and cause a use-after-free on struct xe_hwmon?
In xe_device_probe(), xe_late_bind_init() registers its devm cleanup action
(xe_late_bind_remove(), which flushes late_bind->wq) before
xe_hwmon_register() allocates struct xe_hwmon and initializes
hwmon->hwmon_lock via devm. On teardown, xe_hwmon_unregister() clears
xe->hwmon = NULL without waiting for late_bind->wq, and devres releases
resources in reverse order, freeing struct xe_hwmon before
xe_late_bind_remove() runs:
CPU0 CPU1 (late_bind->wq)
xe_late_bind_work()
xe_hwmon_fan_update_post_lb()
hwmon = xe->hwmon
xe_device_remove()
xe_hwmon_unregister()
xe->hwmon = NULL
devres_release_all()
/* frees hwmon & hwmon_lock */
mutex_lock(&hwmon->hwmon_lock)
<-- use-after-free
xe_late_bind_remove()
wait_for_worker_completion()
> +
> + old_mask = hwmon->fan_enable_mask;
> + if (xe_hwmon_get_fan_enable_mask(hwmon)) {
> + xe_warn(hwmon->xe, "keeping fan enable mask %#x after late binding\n", old_mask);
> + hwmon->fan_enable_mask = old_mask;
> + goto unlock;
> + }
> +
> + if (xe_hwmon_read_fan_control_info(hwmon, hwmon->fan_enable_mask & ~old_mask))
> + xe_warn(hwmon->xe, "failed to read stock fan tables after late binding\n");
> +
> +unlock:
> + mutex_unlock(&hwmon->hwmon_lock);
> +}
[Severity: Medium]
When xe_hwmon_fan_update_post_lb() runs after
hwmon_device_register_with_info() has already completed, how do newly
discovered fans or newly populated fi->max_rps values become visible in
sysfs and have their tachometer state initialized?
hwmon_device_register_with_info() evaluates xe_hwmon_is_visible() (which
gates fan and pwm attributes on IS_FAN_ENABLED() and fanN_max on
hwmon->fi[channel].max_rps) and xe_hwmon_curve_attributes_visible() only
once during registration. Any fan added to hwmon->fan_enable_mask or any
fi->max_rps populated after late binding will not have its sysfs attributes
created, and newly enabled fans also miss the initial
xe_hwmon_fan_input_read() call that xe_hwmon_get_preregistration_info()
uses to seed fi->reg_val_prev and fi->time_prev.
[Severity: Low]
Does updating fi->max_rps in xe_hwmon_read_fan_control_info() after hwmon
registration race with unlocked reads of hwmon->fi[channel].max_rps in
xe_hwmon_fan_read()?
drivers/gpu/drm/xe/xe_hwmon.c:xe_hwmon_fan_read() {
...
case hwmon_fan_max:
*val = mul_u32_u32(hwmon->fi[channel].max_rps, 60);
return 0;
...
}
Because __pcode_mailbox_rw() writes the raw PCODE_DATA0 register into
&fi->max_rps before checking pcode_mailbox_status() and
xe_hwmon_read_fan_control_info() only zeroes fi->max_rps after
xe_hwmon_pcode_read_fan_control() returns an error, a concurrent reader in
xe_hwmon_fan_read() without hwmon->hwmon_lock can observe an unvalidated
register value.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124054811.798763-1-karthik.poosa@intel.com?part=9
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 10/10] drm/xe/hwmon: Enable fan support for CRI
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (8 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 09/10] drm/xe/hwmon: Update fan info after late binding Karthik Poosa
@ 2026-11-24 5:48 ` Karthik Poosa
2026-11-24 5:56 ` ✗ CI.KUnit: failure for drm/xe/hwmon: Add fan control support Patchwork
10 siblings, 0 replies; 17+ messages in thread
From: Karthik Poosa @ 2026-11-24 5:48 UTC (permalink / raw)
To: intel-xe
Cc: rodrigo.vivi, anshuman.gupta, badal.nilawar, raag.jadav,
riana.tauro, sk.anirban, mallesh.koujalagi, soham.purkait,
ravi.kishore.koppuravuri, Karthik Poosa
Enable fan control support for CRI device IDs 0x674E, 0x674F and
0x6751; other CRI SKUs don't support fan control.
Use new fan 3 speed register offset for CRI.
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
---
drivers/gpu/drm/xe/regs/xe_pcode_regs.h | 1 +
drivers/gpu/drm/xe/xe_hwmon.c | 3 ++-
drivers/gpu/drm/xe/xe_pci.c | 23 ++++++++++++++++++++++-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/regs/xe_pcode_regs.h b/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
index d9e4847dd68e..5657b483d18f 100644
--- a/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_pcode_regs.h
@@ -28,6 +28,7 @@
#define BMG_PACKAGE_TEMPERATURE XE_REG(0x138434)
#define CRI_PACKAGE_ENERGY_STATUS XE_REG(0x138120)
+#define CRI_FAN_3_SPEED XE_REG(0x138174)
#define CRI_MSU_VRAM_ENABLE XE_REG(0x138340)
#define CRI_PACKAGE_TEMPERATURE XE_REG(0x138344)
#define CRI_VRAM_TEMPERATURE XE_REG(0x138348)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 2f1d779e2784..8e732f54aae2 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -533,7 +533,8 @@ static struct xe_reg xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg
else if (channel == FAN_2)
return BMG_FAN_2_SPEED;
else if (channel == FAN_3)
- return BMG_FAN_3_SPEED;
+ return (xe->info.platform == XE_CRESCENTISLAND) ? CRI_FAN_3_SPEED :
+ BMG_FAN_3_SPEED;
break;
default:
drm_warn(&xe->drm, "Unknown xe hwmon reg id: %d\n", hwmon_reg);
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index e7b844f96d40..b6c1d42fba61 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -477,6 +477,7 @@ static const struct xe_device_desc cri_desc = {
.has_display = false,
.has_device_uid = true,
.has_drm_ras = true,
+ .has_fan_control = true,
.has_flat_ccs = false,
.has_gsc_nvm = 1,
.has_i2c = true,
@@ -612,6 +613,26 @@ find_subplatform(const struct xe_device_desc *desc, u16 devid)
return NULL;
}
+/* Only these CRI device IDs support fan control. */
+static const u16 cri_fan_control_ids[] = { 0x674E, 0x674F, 0x6751 };
+
+static bool xe_has_fan_control(struct xe_device *xe)
+{
+ int i;
+
+ if (!xe->desc->has_fan_control)
+ return false;
+
+ if (xe->info.platform != XE_CRESCENTISLAND)
+ return true;
+
+ for (i = 0; i < ARRAY_SIZE(cri_fan_control_ids); i++)
+ if (xe->info.devid == cri_fan_control_ids[i])
+ return true;
+
+ return false;
+}
+
enum xe_gmdid_type {
GMDID_GRAPHICS,
GMDID_MEDIA
@@ -804,7 +825,7 @@ static int xe_info_init_early(struct xe_device *xe,
xe->info.has_cached_pt = desc->has_cached_pt;
xe->info.has_device_uid = desc->has_device_uid;
xe->info.has_drm_ras = desc->has_drm_ras;
- xe->info.has_fan_control = desc->has_fan_control;
+ xe->info.has_fan_control = xe_has_fan_control(xe);
xe->info.has_fixed_vram_channels = desc->has_fixed_vram_channels;
/* runtime fusing may force flat_ccs to disabled later */
xe->info.has_flat_ccs = desc->has_flat_ccs;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* ✗ CI.KUnit: failure for drm/xe/hwmon: Add fan control support
2026-11-24 5:48 [PATCH v4 00/10] drm/xe/hwmon: Add fan control support Karthik Poosa
` (9 preceding siblings ...)
2026-11-24 5:48 ` [PATCH v4 10/10] drm/xe/hwmon: Enable fan support for CRI Karthik Poosa
@ 2026-11-24 5:56 ` Patchwork
10 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2026-11-24 5:56 UTC (permalink / raw)
To: Karthik Poosa; +Cc: intel-xe
== Series Details ==
Series: drm/xe/hwmon: Add fan control support
URL : https://patchwork.freedesktop.org/series/179435/
State : failure
== Summary ==
+ trap cleanup EXIT
+ kunitconfigs=('/kernel/drivers/gpu/tests/.kunitconfig' '/kernel/drivers/gpu/drm/xe/.kunitconfig' '/kernel/drivers/gpu/drm/tests/.kunitconfig' '/kernel/drivers/gpu/drm/ttm/tests/.kunitconfig' '/kernel/drivers/dma-buf/.kunitconfig')
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/tests/.kunitconfig
[05:54:14] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:54:19] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:54:40] Starting KUnit Kernel (1/1)...
[05:54:40] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:54:40] ================= gpu_buddy (15 subtests) ==================
[05:54:40] [PASSED] gpu_test_buddy_alloc_limit
[05:54:40] [PASSED] gpu_test_buddy_alloc_optimistic
[05:54:40] [PASSED] gpu_test_buddy_alloc_pessimistic
[05:54:40] [PASSED] gpu_test_buddy_alloc_pathological
[05:54:40] [PASSED] gpu_test_buddy_alloc_contiguous
[05:54:40] [PASSED] gpu_test_buddy_alloc_clear
[05:54:40] [PASSED] gpu_test_buddy_alloc_range
[05:54:40] [PASSED] gpu_test_buddy_alloc_range_bias
[05:54:40] [PASSED] gpu_test_buddy_alloc_range_clear_guard
[05:54:41] [PASSED] gpu_test_buddy_fragmentation_performance
[05:54:42] [PASSED] gpu_test_buddy_dirty_tracker_performance
[05:54:42] [PASSED] gpu_test_buddy_alloc_exceeds_max_order
[05:54:42] [PASSED] gpu_test_buddy_offset_aligned_allocation
[05:54:42] [PASSED] gpu_test_buddy_subtree_offset_alignment_stress
[05:54:42] [PASSED] gpu_test_buddy_addr_to_block
[05:54:42] ==================== [PASSED] gpu_buddy ====================
[05:54:42] ============================================================
[05:54:42] Testing complete. Ran 15 tests: passed: 15
[05:54:42] Elapsed time: 28.214s total, 5.140s configuring, 20.754s building, 2.239s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/xe/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[05:54:42] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:54:45] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:55:24] Starting KUnit Kernel (1/1)...
[05:55:24] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:55:24] ================= xe_ggtt_iov (9 subtests) =================
[05:55:24] [PASSED] init_shared_pf
[05:55:24] [PASSED] init_partial_overlap
[05:55:24] [PASSED] alloc_usable_pool_low
[05:55:24] [PASSED] alloc_shareable_pool_high
[05:55:24] [PASSED] alloc_partial_overlap
[05:55:24] [PASSED] alloc_partial_overlap_usable_full
[05:55:24] [PASSED] alloc_partial_overlap_shareable_full
[05:55:24] [PASSED] alloc_shareable_pool_unavailable
[05:55:24] [PASSED] alloc_shareable_pool_oversized
[05:55:24] =================== [PASSED] xe_ggtt_iov ===================
[05:55:24] =================== xe_ggtt (3 subtests) ===================
[05:55:24] [PASSED] init_native
[05:55:24] [PASSED] alloc_usable_pool_native
[05:55:24] [PASSED] alloc_usable_pool_oversized
[05:55:24] ===================== [PASSED] xe_ggtt =====================
[05:55:24] ================== guc_buf (11 subtests) ===================
[05:55:24] [PASSED] test_smallest
[05:55:24] [PASSED] test_largest
[05:55:24] [PASSED] test_granular
[05:55:24] [PASSED] test_unique
[05:55:24] [PASSED] test_overlap
[05:55:24] [PASSED] test_reusable
[05:55:24] [PASSED] test_too_big
[05:55:24] [PASSED] test_flush
[05:55:24] [PASSED] test_lookup
[05:55:24] [PASSED] test_data
[05:55:24] [PASSED] test_class
[05:55:24] ===================== [PASSED] guc_buf =====================
[05:55:24] =================== guc_dbm (7 subtests) ===================
[05:55:24] [PASSED] test_empty
[05:55:24] [PASSED] test_default
[05:55:24] ======================== test_size ========================
[05:55:24] [PASSED] 4
[05:55:24] [PASSED] 8
[05:55:24] [PASSED] 32
[05:55:24] [PASSED] 256
[05:55:24] ==================== [PASSED] test_size ====================
[05:55:24] ======================= test_reuse ========================
[05:55:24] [PASSED] 4
[05:55:24] [PASSED] 8
[05:55:24] [PASSED] 32
[05:55:24] [PASSED] 256
[05:55:24] =================== [PASSED] test_reuse ====================
[05:55:24] =================== test_range_overlap ====================
[05:55:24] [PASSED] 4
[05:55:24] [PASSED] 8
[05:55:24] [PASSED] 32
[05:55:24] [PASSED] 256
[05:55:24] =============== [PASSED] test_range_overlap ================
[05:55:24] =================== test_range_compact ====================
[05:55:24] [PASSED] 4
[05:55:24] [PASSED] 8
[05:55:24] [PASSED] 32
[05:55:24] [PASSED] 256
[05:55:24] =============== [PASSED] test_range_compact ================
[05:55:24] ==================== test_range_spare =====================
[05:55:24] [PASSED] 4
[05:55:24] [PASSED] 8
[05:55:24] [PASSED] 32
[05:55:24] [PASSED] 256
[05:55:24] ================ [PASSED] test_range_spare =================
[05:55:24] ===================== [PASSED] guc_dbm =====================
[05:55:24] ================== guc_idm (22 subtests) ===================
[05:55:24] [PASSED] bad_init
[05:55:24] [PASSED] no_init
[05:55:24] [PASSED] init_fini
[05:55:24] [PASSED] check_init_small
[05:55:24] [PASSED] check_init_shared
[05:55:24] [PASSED] check_used
[05:55:24] [PASSED] check_quota
[05:55:24] [PASSED] check_all
[05:55:24] [PASSED] check_limits
[05:55:24] [PASSED] check_overlap
[05:55:24] [PASSED] check_overlap_alloc
[05:55:24] [PASSED] check_overlap_release
[05:55:24] [PASSED] check_overlap_partial_init
[05:55:24] [PASSED] check_overlap_partial_shared_range_blocking
[05:55:24] [PASSED] check_used_usable
[05:55:24] [PASSED] check_used_shareable
[05:55:24] [PASSED] check_used_mixed
[05:55:24] [PASSED] check_release_usable_range
[05:55:24] [PASSED] check_release_shareable_range
[05:55:24] [PASSED] check_split_boundaries
[05:55:24] [PASSED] check_shareable_spare
[05:55:24] [PASSED] check_shareable_spare_fragmented_tail
[05:55:24] ===================== [PASSED] guc_idm =====================
[05:55:24] ============== guc_klv_helpers (13 subtests) ===============
[05:55:24] [PASSED] test_count
[05:55:24] [PASSED] test_encode_u32
[05:55:24] [PASSED] test_encode_u64
[05:55:24] [PASSED] test_encode_string
[05:55:24] [PASSED] test_encode_object_raw
[05:55:24] [PASSED] test_encode_object_klv
[05:55:24] [PASSED] test_encode_object_nested
[05:55:24] [PASSED] test_encode_object_basic
[05:55:24] ===================== test_decode_u16 =====================
[05:55:24] [PASSED] empty
[05:55:24] [PASSED] valid
[05:55:24] [PASSED] max
[05:55:24] [PASSED] big
[05:55:24] [PASSED] long
[05:55:24] ================= [PASSED] test_decode_u16 =================
[05:55:24] ===================== test_decode_u32 =====================
[05:55:24] [PASSED] empty
[05:55:24] [PASSED] valid
[05:55:24] [PASSED] max
[05:55:24] [PASSED] long
[05:55:24] ================= [PASSED] test_decode_u32 =================
[05:55:24] ===================== test_decode_u64 =====================
[05:55:24] [PASSED] empty
[05:55:24] [PASSED] short
[05:55:24] [PASSED] valid
[05:55:24] [PASSED] max
[05:55:24] [PASSED] long
[05:55:24] ================= [PASSED] test_decode_u64 =================
[05:55:24] ===================== test_decode_str =====================
[05:55:24] [PASSED] empty
[05:55:24] [PASSED] one
[05:55:24] [PASSED] one_trash
[05:55:24] [PASSED] two
[05:55:24] [PASSED] two_trash
[05:55:24] [PASSED] three
[05:55:24] [PASSED] dword
[05:55:24] [PASSED] four
[05:55:24] [PASSED] five
[05:55:24] [PASSED] six
[05:55:24] [PASSED] seven
[05:55:24] [PASSED] qword
[05:55:24] ================= [PASSED] test_decode_str =================
[05:55:24] [PASSED] test_print
[05:55:24] ================= [PASSED] guc_klv_helpers =================
[05:55:24] =================== xe_log (4 subtests) ====================
[05:55:24] [PASSED] demo_cper
[05:55:24] [PASSED] demo_dmesg
[05:55:24] ======================= test_dmesg ========================
[05:55:24] [PASSED] test_fatal
[05:55:24] [PASSED] test_fatal_tile
[05:55:24] [PASSED] test_fatal_gt
[05:55:24] [PASSED] test_fatal_comp
[05:55:24] [PASSED] test_fatal_comp_tile
[05:55:24] [PASSED] test_fatal_comp_gt
[05:55:24] [PASSED] test_fatal_all
[05:55:24] [PASSED] test_recoverable
[05:55:24] [PASSED] test_recoverable_tile
[05:55:24] [PASSED] test_recoverable_gt
[05:55:24] [PASSED] test_recoverable_comp
[05:55:24] [PASSED] test_recoverable_comp_tile
[05:55:24] [PASSED] test_recoverable_comp_gt
[05:55:24] [PASSED] test_recoverable_all
[05:55:24] [PASSED] test_info
[05:55:24] [PASSED] test_info_tile
[05:55:24] [PASSED] test_info_gt
[05:55:24] [PASSED] test_info_err
[05:55:24] [PASSED] test_info_comp
[05:55:24] [PASSED] test_info_comp_tile
[05:55:24] [PASSED] test_info_comp_gt
[05:55:24] [PASSED] test_info_all
[05:55:24] [PASSED] test_hw_fatal
[05:55:24] [PASSED] test_hw_recoverable
[05:55:24] [PASSED] test_hw_corrected
[05:55:24] [PASSED] test_hw_informational
[05:55:24] =================== [PASSED] test_dmesg ====================
[05:55:24] ====================== test_invalid =======================
[05:55:24] [SKIPPED] no-component no-location no-warn (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] reserved location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] unknown location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] nonzero-device-id location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] invalid-tile-id location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] invalid-gt-id location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] unknown component class (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] unknown system component (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] unknown hardware component (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] [SKIPPED] unknown component and location (requires CONFIG_DRM_XE_DEBUG)
[05:55:24] ================== [SKIPPED] test_invalid ==================
[05:55:24] ===================== [PASSED] xe_log ======================
[05:55:24] ================== no_relay (3 subtests) ===================
[05:55:24] [PASSED] xe_drops_guc2pf_if_not_ready
[05:55:24] [PASSED] xe_drops_guc2vf_if_not_ready
[05:55:24] [PASSED] xe_rejects_send_if_not_ready
[05:55:24] ==================== [PASSED] no_relay =====================
[05:55:24] ================== pf_relay (14 subtests) ==================
[05:55:24] [PASSED] pf_rejects_guc2pf_too_short
[05:55:24] [PASSED] pf_rejects_guc2pf_too_long
[05:55:24] [PASSED] pf_rejects_guc2pf_no_payload
[05:55:24] [PASSED] pf_fails_no_payload
[05:55:24] [PASSED] pf_fails_bad_origin
[05:55:24] [PASSED] pf_fails_bad_type
[05:55:24] [PASSED] pf_txn_reports_error
[05:55:24] [PASSED] pf_txn_sends_pf2guc
[05:55:24] [PASSED] pf_sends_pf2guc
[05:55:24] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[05:55:24] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[05:55:24] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[05:55:24] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[05:55:24] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[05:55:24] ==================== [PASSED] pf_relay =====================
[05:55:24] ================== vf_relay (3 subtests) ===================
[05:55:24] [PASSED] vf_rejects_guc2vf_too_short
[05:55:24] [PASSED] vf_rejects_guc2vf_too_long
[05:55:24] [PASSED] vf_rejects_guc2vf_no_payload
[05:55:24] ==================== [PASSED] vf_relay =====================
[05:55:24] ================ pf_gt_config (9 subtests) =================
[05:55:24] [PASSED] fair_contexts_1vf
[05:55:24] [PASSED] fair_doorbells_1vf
[05:55:24] [PASSED] fair_ggtt_1vf
[05:55:24] ====================== fair_vram_1vf ======================
[05:55:24] [PASSED] 3.50 GiB
[05:55:24] [PASSED] 11.5 GiB
[05:55:24] [PASSED] 15.5 GiB
[05:55:24] [PASSED] 31.5 GiB
[05:55:24] [PASSED] 63.5 GiB
[05:55:24] [PASSED] 1.91 GiB
[05:55:24] ================== [PASSED] fair_vram_1vf ==================
[05:55:24] ================ fair_vram_1vf_admin_only =================
[05:55:24] [PASSED] 3.50 GiB
[05:55:24] [PASSED] 11.5 GiB
[05:55:24] [PASSED] 15.5 GiB
[05:55:24] [PASSED] 31.5 GiB
[05:55:24] [PASSED] 63.5 GiB
[05:55:24] [PASSED] 1.91 GiB
[05:55:24] ============ [PASSED] fair_vram_1vf_admin_only =============
[05:55:24] ====================== fair_contexts ======================
[05:55:24] [PASSED] 1 VF
[05:55:24] [PASSED] 2 VFs
[05:55:24] [PASSED] 3 VFs
[05:55:24] [PASSED] 4 VFs
[05:55:24] [PASSED] 5 VFs
[05:55:24] [PASSED] 6 VFs
[05:55:24] [PASSED] 7 VFs
[05:55:24] [PASSED] 8 VFs
[05:55:24] [PASSED] 9 VFs
[05:55:24] [PASSED] 10 VFs
[05:55:24] [PASSED] 11 VFs
[05:55:24] [PASSED] 12 VFs
[05:55:24] [PASSED] 13 VFs
[05:55:24] [PASSED] 14 VFs
[05:55:24] [PASSED] 15 VFs
[05:55:24] [PASSED] 16 VFs
[05:55:24] [PASSED] 17 VFs
[05:55:24] [PASSED] 18 VFs
[05:55:24] [PASSED] 19 VFs
[05:55:24] [PASSED] 20 VFs
[05:55:24] [PASSED] 21 VFs
[05:55:24] [PASSED] 22 VFs
[05:55:24] [PASSED] 23 VFs
[05:55:24] [PASSED] 24 VFs
[05:55:24] [PASSED] 25 VFs
[05:55:24] [PASSED] 26 VFs
[05:55:24] [PASSED] 27 VFs
[05:55:24] [PASSED] 28 VFs
[05:55:24] [PASSED] 29 VFs
[05:55:24] [PASSED] 30 VFs
[05:55:24] [PASSED] 31 VFs
[05:55:24] [PASSED] 32 VFs
[05:55:24] [PASSED] 33 VFs
[05:55:24] [PASSED] 34 VFs
[05:55:24] [PASSED] 35 VFs
[05:55:24] [PASSED] 36 VFs
[05:55:24] [PASSED] 37 VFs
[05:55:24] [PASSED] 38 VFs
[05:55:24] [PASSED] 39 VFs
[05:55:24] [PASSED] 40 VFs
[05:55:24] [PASSED] 41 VFs
[05:55:24] [PASSED] 42 VFs
[05:55:24] [PASSED] 43 VFs
[05:55:24] [PASSED] 44 VFs
[05:55:24] [PASSED] 45 VFs
[05:55:24] [PASSED] 46 VFs
[05:55:24] [PASSED] 47 VFs
[05:55:24] [PASSED] 48 VFs
[05:55:24] [PASSED] 49 VFs
[05:55:24] [PASSED] 50 VFs
[05:55:24] [PASSED] 51 VFs
[05:55:24] [PASSED] 52 VFs
[05:55:24] [PASSED] 53 VFs
[05:55:24] [PASSED] 54 VFs
[05:55:24] [PASSED] 55 VFs
[05:55:24] [PASSED] 56 VFs
[05:55:24] [PASSED] 57 VFs
[05:55:24] [PASSED] 58 VFs
[05:55:24] [PASSED] 59 VFs
[05:55:24] [PASSED] 60 VFs
[05:55:24] [PASSED] 61 VFs
[05:55:24] [PASSED] 62 VFs
[05:55:24] [PASSED] 63 VFs
[05:55:24] ================== [PASSED] fair_contexts ==================
[05:55:24] ===================== fair_doorbells ======================
[05:55:24] [PASSED] 1 VF
[05:55:24] [PASSED] 2 VFs
[05:55:24] [PASSED] 3 VFs
[05:55:24] [PASSED] 4 VFs
[05:55:24] [PASSED] 5 VFs
[05:55:24] [PASSED] 6 VFs
[05:55:24] [PASSED] 7 VFs
[05:55:24] [PASSED] 8 VFs
[05:55:24] [PASSED] 9 VFs
[05:55:24] [PASSED] 10 VFs
[05:55:24] [PASSED] 11 VFs
[05:55:24] [PASSED] 12 VFs
[05:55:24] [PASSED] 13 VFs
[05:55:24] [PASSED] 14 VFs
[05:55:24] [PASSED] 15 VFs
[05:55:24] [PASSED] 16 VFs
[05:55:24] [PASSED] 17 VFs
[05:55:24] [PASSED] 18 VFs
[05:55:24] [PASSED] 19 VFs
[05:55:24] [PASSED] 20 VFs
[05:55:24] [PASSED] 21 VFs
[05:55:24] [PASSED] 22 VFs
[05:55:25] [PASSED] 23 VFs
[05:55:25] [PASSED] 24 VFs
[05:55:25] [PASSED] 25 VFs
[05:55:25] [PASSED] 26 VFs
[05:55:25] [PASSED] 27 VFs
[05:55:25] [PASSED] 28 VFs
[05:55:25] [PASSED] 29 VFs
[05:55:25] [PASSED] 30 VFs
[05:55:25] [PASSED] 31 VFs
[05:55:25] [PASSED] 32 VFs
[05:55:25] [PASSED] 33 VFs
[05:55:25] [PASSED] 34 VFs
[05:55:25] [PASSED] 35 VFs
[05:55:25] [PASSED] 36 VFs
[05:55:25] [PASSED] 37 VFs
[05:55:25] [PASSED] 38 VFs
[05:55:25] [PASSED] 39 VFs
[05:55:25] [PASSED] 40 VFs
[05:55:25] [PASSED] 41 VFs
[05:55:25] [PASSED] 42 VFs
[05:55:25] [PASSED] 43 VFs
[05:55:25] [PASSED] 44 VFs
[05:55:25] [PASSED] 45 VFs
[05:55:25] [PASSED] 46 VFs
[05:55:25] [PASSED] 47 VFs
[05:55:25] [PASSED] 48 VFs
[05:55:25] [PASSED] 49 VFs
[05:55:25] [PASSED] 50 VFs
[05:55:25] [PASSED] 51 VFs
[05:55:25] [PASSED] 52 VFs
[05:55:25] [PASSED] 53 VFs
[05:55:25] [PASSED] 54 VFs
[05:55:25] [PASSED] 55 VFs
[05:55:25] [PASSED] 56 VFs
[05:55:25] [PASSED] 57 VFs
[05:55:25] [PASSED] 58 VFs
[05:55:25] [PASSED] 59 VFs
[05:55:25] [PASSED] 60 VFs
[05:55:25] [PASSED] 61 VFs
[05:55:25] [PASSED] 62 VFs
[05:55:25] [PASSED] 63 VFs
[05:55:25] ================= [PASSED] fair_doorbells ==================
[05:55:25] ======================== fair_ggtt ========================
[05:55:25] [PASSED] 1 VF
[05:55:25] [PASSED] 2 VFs
[05:55:25] [PASSED] 3 VFs
[05:55:25] [PASSED] 4 VFs
[05:55:25] [PASSED] 5 VFs
[05:55:25] [PASSED] 6 VFs
[05:55:25] [PASSED] 7 VFs
[05:55:25] [PASSED] 8 VFs
[05:55:25] [PASSED] 9 VFs
[05:55:25] [PASSED] 10 VFs
[05:55:25] [PASSED] 11 VFs
[05:55:25] [PASSED] 12 VFs
[05:55:25] [PASSED] 13 VFs
[05:55:25] [PASSED] 14 VFs
[05:55:25] [PASSED] 15 VFs
[05:55:25] [PASSED] 16 VFs
[05:55:25] [PASSED] 17 VFs
[05:55:25] [PASSED] 18 VFs
[05:55:25] [PASSED] 19 VFs
[05:55:25] [PASSED] 20 VFs
[05:55:25] [PASSED] 21 VFs
[05:55:25] [PASSED] 22 VFs
[05:55:25] [PASSED] 23 VFs
[05:55:25] [PASSED] 24 VFs
[05:55:25] [PASSED] 25 VFs
[05:55:25] [PASSED] 26 VFs
[05:55:25] [PASSED] 27 VFs
[05:55:25] [PASSED] 28 VFs
[05:55:25] [PASSED] 29 VFs
[05:55:25] [PASSED] 30 VFs
[05:55:25] [PASSED] 31 VFs
[05:55:25] [PASSED] 32 VFs
[05:55:25] [PASSED] 33 VFs
[05:55:25] [PASSED] 34 VFs
[05:55:25] [PASSED] 35 VFs
[05:55:25] [PASSED] 36 VFs
[05:55:25] [PASSED] 37 VFs
[05:55:25] [PASSED] 38 VFs
[05:55:25] [PASSED] 39 VFs
[05:55:25] [PASSED] 40 VFs
[05:55:25] [PASSED] 41 VFs
[05:55:25] [PASSED] 42 VFs
[05:55:25] [PASSED] 43 VFs
[05:55:25] [PASSED] 44 VFs
[05:55:25] [PASSED] 45 VFs
[05:55:25] [PASSED] 46 VFs
[05:55:25] [PASSED] 47 VFs
[05:55:25] [PASSED] 48 VFs
[05:55:25] [PASSED] 49 VFs
[05:55:25] [PASSED] 50 VFs
[05:55:25] [PASSED] 51 VFs
[05:55:25] [PASSED] 52 VFs
[05:55:25] [PASSED] 53 VFs
[05:55:25] [PASSED] 54 VFs
[05:55:25] [PASSED] 55 VFs
[05:55:25] [PASSED] 56 VFs
[05:55:25] [PASSED] 57 VFs
[05:55:25] [PASSED] 58 VFs
[05:55:25] [PASSED] 59 VFs
[05:55:25] [PASSED] 60 VFs
[05:55:25] [PASSED] 61 VFs
[05:55:25] [PASSED] 62 VFs
[05:55:25] [PASSED] 63 VFs
[05:55:25] ==================== [PASSED] fair_ggtt ====================
[05:55:25] ======================== fair_vram ========================
[05:55:25] [PASSED] 1 VF
[05:55:25] [PASSED] 2 VFs
[05:55:25] [PASSED] 3 VFs
[05:55:25] [PASSED] 4 VFs
[05:55:25] [PASSED] 5 VFs
[05:55:25] [PASSED] 6 VFs
[05:55:25] [PASSED] 7 VFs
[05:55:25] [PASSED] 8 VFs
[05:55:25] [PASSED] 9 VFs
[05:55:25] [PASSED] 10 VFs
[05:55:25] [PASSED] 11 VFs
[05:55:25] [PASSED] 12 VFs
[05:55:25] [PASSED] 13 VFs
[05:55:25] [PASSED] 14 VFs
[05:55:25] [PASSED] 15 VFs
[05:55:25] [PASSED] 16 VFs
[05:55:25] [PASSED] 17 VFs
[05:55:25] [PASSED] 18 VFs
[05:55:25] [PASSED] 19 VFs
[05:55:25] [PASSED] 20 VFs
[05:55:25] [PASSED] 21 VFs
[05:55:25] [PASSED] 22 VFs
[05:55:25] [PASSED] 23 VFs
[05:55:25] [PASSED] 24 VFs
[05:55:25] [PASSED] 25 VFs
[05:55:25] [PASSED] 26 VFs
[05:55:25] [PASSED] 27 VFs
[05:55:25] [PASSED] 28 VFs
[05:55:25] [PASSED] 29 VFs
[05:55:25] [PASSED] 30 VFs
[05:55:25] [PASSED] 31 VFs
[05:55:25] [PASSED] 32 VFs
[05:55:25] [PASSED] 33 VFs
[05:55:25] [PASSED] 34 VFs
[05:55:25] [PASSED] 35 VFs
[05:55:25] [PASSED] 36 VFs
[05:55:25] [PASSED] 37 VFs
[05:55:25] [PASSED] 38 VFs
[05:55:25] [PASSED] 39 VFs
[05:55:25] [PASSED] 40 VFs
[05:55:25] [PASSED] 41 VFs
[05:55:25] [PASSED] 42 VFs
[05:55:25] [PASSED] 43 VFs
[05:55:25] [PASSED] 44 VFs
[05:55:25] [PASSED] 45 VFs
[05:55:25] [PASSED] 46 VFs
[05:55:25] [PASSED] 47 VFs
[05:55:25] [PASSED] 48 VFs
[05:55:25] [PASSED] 49 VFs
[05:55:25] [PASSED] 50 VFs
[05:55:25] [PASSED] 51 VFs
[05:55:25] [PASSED] 52 VFs
[05:55:25] [PASSED] 53 VFs
[05:55:25] [PASSED] 54 VFs
[05:55:25] [PASSED] 55 VFs
[05:55:25] [PASSED] 56 VFs
[05:55:25] [PASSED] 57 VFs
[05:55:25] [PASSED] 58 VFs
[05:55:25] [PASSED] 59 VFs
[05:55:25] [PASSED] 60 VFs
[05:55:25] [PASSED] 61 VFs
[05:55:25] [PASSED] 62 VFs
[05:55:25] [PASSED] 63 VFs
[05:55:25] ==================== [PASSED] fair_vram ====================
[05:55:25] ================== [PASSED] pf_gt_config ===================
[05:55:25] ===================== lmtt (1 subtest) =====================
[05:55:25] ======================== test_ops =========================
[05:55:25] [PASSED] 2-level
[05:55:25] [PASSED] multi-level
[05:55:25] ==================== [PASSED] test_ops =====================
[05:55:25] ====================== [PASSED] lmtt =======================
[05:55:25] ================= sriov_packet (1 subtest) =================
[05:55:25] [PASSED] test_descriptor_init
[05:55:25] ================== [PASSED] sriov_packet ===================
[05:55:25] ================= pf_service (11 subtests) =================
[05:55:25] [PASSED] pf_negotiate_any
[05:55:25] [PASSED] pf_negotiate_base_match
[05:55:25] [PASSED] pf_negotiate_base_newer
[05:55:25] [PASSED] pf_negotiate_base_next
[05:55:25] [SKIPPED] pf_negotiate_base_older (no older minor)
[05:55:25] [PASSED] pf_negotiate_base_prev
[05:55:25] [PASSED] pf_negotiate_latest_match
[05:55:25] [PASSED] pf_negotiate_latest_newer
[05:55:25] [PASSED] pf_negotiate_latest_next
[05:55:25] [SKIPPED] pf_negotiate_latest_older (no older minor)
[05:55:25] [SKIPPED] pf_negotiate_latest_prev (no prev major)
[05:55:25] =================== [PASSED] pf_service ====================
[05:55:25] ================= xe_guc_g2g (2 subtests) ==================
[05:55:25] ============== xe_live_guc_g2g_kunit_default ==============
[05:55:25] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[05:55:25] ============== xe_live_guc_g2g_kunit_allmem ===============
[05:55:25] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[05:55:25] =================== [SKIPPED] xe_guc_g2g ===================
[05:55:25] =================== xe_mocs (2 subtests) ===================
[05:55:25] ================ xe_live_mocs_kernel_kunit ================
[05:55:25] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[05:55:25] ================ xe_live_mocs_reset_kunit =================
[05:55:25] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[05:55:25] ==================== [SKIPPED] xe_mocs =====================
[05:55:25] ================= xe_migrate (3 subtests) ==================
[05:55:25] ================= xe_migrate_sanity_kunit =================
[05:55:25] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[05:55:25] ================== xe_validate_ccs_kunit ==================
[05:55:25] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[05:55:25] ============= xe_migrate_access_memory_kunit ==============
[05:55:25] ========= [SKIPPED] xe_migrate_access_memory_kunit =========
[05:55:25] =================== [SKIPPED] xe_migrate ===================
[05:55:25] ================== xe_dma_buf (1 subtest) ==================
[05:55:25] ==================== xe_dma_buf_kunit =====================
[05:55:25] ================ [SKIPPED] xe_dma_buf_kunit ================
[05:55:25] =================== [SKIPPED] xe_dma_buf ===================
[05:55:25] ================= xe_bo_shrink (1 subtest) =================
[05:55:25] =================== xe_bo_shrink_kunit ====================
[05:55:25] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[05:55:25] ================== [SKIPPED] xe_bo_shrink ==================
[05:55:25] ==================== xe_bo (2 subtests) ====================
[05:55:25] ================== xe_ccs_migrate_kunit ===================
[05:55:25] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[05:55:25] ==================== xe_bo_evict_kunit ====================
[05:55:25] =============== [SKIPPED] xe_bo_evict_kunit ================
[05:55:25] ===================== [SKIPPED] xe_bo ======================
[05:55:25] =================== xe_any (9 subtests) ====================
[05:55:25] [PASSED] test_to_xe
[05:55:25] [PASSED] test_to_dev
[05:55:25] [PASSED] test_to_pdev
[05:55:25] [PASSED] test_to_drm
[05:55:25] [PASSED] test_if_pdev
[05:55:25] [PASSED] test_if_xe
[05:55:25] [PASSED] test_if_tile
[05:55:25] [PASSED] test_if_gt
[05:55:25] [PASSED] test_to_id
[05:55:25] ===================== [PASSED] xe_any ======================
[05:55:25] ==================== args (13 subtests) ====================
[05:55:25] [PASSED] count_args_test
[05:55:25] [PASSED] call_args_example
[05:55:25] [PASSED] call_args_test
[05:55:25] [PASSED] drop_first_arg_example
[05:55:25] [PASSED] drop_first_arg_test
[05:55:25] [PASSED] first_arg_example
[05:55:25] [PASSED] first_arg_test
[05:55:25] [PASSED] last_arg_example
[05:55:25] [PASSED] last_arg_test
[05:55:25] [PASSED] pick_arg_example
[05:55:25] [PASSED] if_args_example
[05:55:25] [PASSED] if_args_test
[05:55:25] [PASSED] sep_comma_example
[05:55:25] ====================== [PASSED] args =======================
[05:55:25] =================== xe_pci (3 subtests) ====================
[05:55:25] ==================== check_graphics_ip ====================
[05:55:25] [PASSED] 12.00 Xe_LP
[05:55:25] [PASSED] 12.10 Xe_LP+
[05:55:25] [PASSED] 12.55 Xe_HPG
[05:55:25] [PASSED] 12.60 Xe_HPC
[05:55:25] [PASSED] 12.70 Xe_LPG
[05:55:25] [PASSED] 12.71 Xe_LPG
[05:55:25] [PASSED] 12.74 Xe_LPG+
[05:55:25] [PASSED] 20.01 Xe2_HPG
[05:55:25] [PASSED] 20.02 Xe2_HPG
[05:55:25] [PASSED] 20.04 Xe2_LPG
[05:55:25] [PASSED] 30.00 Xe3_LPG
[05:55:25] [PASSED] 30.01 Xe3_LPG
[05:55:25] [PASSED] 30.03 Xe3_LPG
[05:55:25] [PASSED] 30.04 Xe3_LPG
[05:55:25] [PASSED] 30.05 Xe3_LPG
[05:55:25] [PASSED] 35.10 Xe3p_LPG
[05:55:25] [PASSED] 35.11 Xe3p_XPC
[05:55:25] ================ [PASSED] check_graphics_ip ================
[05:55:25] ===================== check_media_ip ======================
[05:55:25] [PASSED] 12.00 Xe_M
[05:55:25] [PASSED] 12.55 Xe_HPM
[05:55:25] [PASSED] 13.00 Xe_LPM+
[05:55:25] [PASSED] 13.01 Xe2_HPM
[05:55:25] [PASSED] 20.00 Xe2_LPM
[05:55:25] [PASSED] 30.00 Xe3_LPM
[05:55:25] [PASSED] 30.02 Xe3_LPM
[05:55:25] [PASSED] 35.00 Xe3p_LPM
[05:55:25] [PASSED] 35.03 Xe3p_HPM
[05:55:25] ================= [PASSED] check_media_ip ==================
[05:55:25] =================== check_platform_desc ===================
[05:55:25] [PASSED] 0x9A60 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A68 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A70 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A40 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A49 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A59 (TIGERLAKE)
[05:55:25] [PASSED] 0x9A78 (TIGERLAKE)
[05:55:25] [PASSED] 0x9AC0 (TIGERLAKE)
[05:55:25] [PASSED] 0x9AC9 (TIGERLAKE)
[05:55:25] [PASSED] 0x9AD9 (TIGERLAKE)
[05:55:25] [PASSED] 0x9AF8 (TIGERLAKE)
[05:55:25] [PASSED] 0x4C80 (ROCKETLAKE)
[05:55:25] [PASSED] 0x4C8A (ROCKETLAKE)
[05:55:25] [PASSED] 0x4C8B (ROCKETLAKE)
[05:55:25] [PASSED] 0x4C8C (ROCKETLAKE)
[05:55:25] [PASSED] 0x4C90 (ROCKETLAKE)
[05:55:25] [PASSED] 0x4C9A (ROCKETLAKE)
[05:55:25] [PASSED] 0x4680 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4682 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4688 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x468A (ALDERLAKE_S)
[05:55:25] [PASSED] 0x468B (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4690 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4692 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4693 (ALDERLAKE_S)
[05:55:25] [PASSED] 0x46A0 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46A1 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46A2 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46A3 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46A6 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46A8 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46AA (ALDERLAKE_P)
[05:55:25] [PASSED] 0x462A (ALDERLAKE_P)
[05:55:25] [PASSED] 0x4626 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x4628 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46B0 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46B1 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46B2 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46B3 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46C0 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46C1 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46C2 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46C3 (ALDERLAKE_P)
[05:55:25] [PASSED] 0x46D0 (ALDERLAKE_N)
[05:55:25] [PASSED] 0x46D1 (ALDERLAKE_N)
[05:55:25] [PASSED] 0x46D2 (ALDERLAKE_N)
[05:55:25] [PASSED] 0x46D3 (ALDERLAKE_N)
[05:55:25] [PASSED] 0x46D4 (ALDERLAKE_N)
[05:55:25] [PASSED] 0xA721 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7A1 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7A9 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7AC (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7AD (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA720 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7A0 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7A8 (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7AA (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA7AB (ALDERLAKE_P)
[05:55:25] [PASSED] 0xA780 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA781 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA782 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA783 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA788 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA789 (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA78A (ALDERLAKE_S)
[05:55:25] [PASSED] 0xA78B (ALDERLAKE_S)
[05:55:25] [PASSED] 0x4905 (DG1)
[05:55:25] [PASSED] 0x4906 (DG1)
[05:55:25] [PASSED] 0x4907 (DG1)
[05:55:25] [PASSED] 0x4908 (DG1)
[05:55:25] [PASSED] 0x4909 (DG1)
[05:55:25] [PASSED] 0x56C0 (DG2)
[05:55:25] [PASSED] 0x56C2 (DG2)
[05:55:25] [PASSED] 0x56C1 (DG2)
[05:55:25] [PASSED] 0x7D51 (METEORLAKE)
[05:55:25] [PASSED] 0x7DD1 (METEORLAKE)
[05:55:25] [PASSED] 0x7D41 (METEORLAKE)
[05:55:25] [PASSED] 0x7D67 (METEORLAKE)
[05:55:25] [PASSED] 0xB640 (METEORLAKE)
[05:55:25] [PASSED] 0x56A0 (DG2)
[05:55:25] [PASSED] 0x56A1 (DG2)
[05:55:25] [PASSED] 0x56A2 (DG2)
[05:55:25] [PASSED] 0x56BE (DG2)
[05:55:25] [PASSED] 0x56BF (DG2)
[05:55:25] [PASSED] 0x5690 (DG2)
[05:55:25] [PASSED] 0x5691 (DG2)
[05:55:25] [PASSED] 0x5692 (DG2)
[05:55:25] [PASSED] 0x56A5 (DG2)
[05:55:25] [PASSED] 0x56A6 (DG2)
[05:55:25] [PASSED] 0x56B0 (DG2)
[05:55:25] [PASSED] 0x56B1 (DG2)
[05:55:25] [PASSED] 0x56BA (DG2)
[05:55:25] [PASSED] 0x56BB (DG2)
[05:55:25] [PASSED] 0x56BC (DG2)
[05:55:25] [PASSED] 0x56BD (DG2)
[05:55:25] [PASSED] 0x5693 (DG2)
[05:55:25] [PASSED] 0x5694 (DG2)
[05:55:25] [PASSED] 0x5695 (DG2)
[05:55:25] [PASSED] 0x56A3 (DG2)
[05:55:25] [PASSED] 0x56A4 (DG2)
[05:55:25] [PASSED] 0x56B2 (DG2)
[05:55:25] [PASSED] 0x56B3 (DG2)
[05:55:25] [PASSED] 0x5696 (DG2)
[05:55:25] [PASSED] 0x5697 (DG2)
[05:55:25] [PASSED] 0xB69 (PVC)
[05:55:25] [PASSED] 0xB6E (PVC)
[05:55:25] [PASSED] 0xBD4 (PVC)
[05:55:25] [PASSED] 0xBD5 (PVC)
[05:55:25] [PASSED] 0xBD6 (PVC)
[05:55:25] [PASSED] 0xBD7 (PVC)
[05:55:25] [PASSED] 0xBD8 (PVC)
[05:55:25] [PASSED] 0xBD9 (PVC)
[05:55:25] [PASSED] 0xBDA (PVC)
[05:55:25] [PASSED] 0xBDB (PVC)
[05:55:25] [PASSED] 0xBE0 (PVC)
[05:55:25] [PASSED] 0xBE1 (PVC)
[05:55:25] [PASSED] 0xBE5 (PVC)
[05:55:25] [PASSED] 0x7D40 (METEORLAKE)
[05:55:25] [PASSED] 0x7D45 (METEORLAKE)
[05:55:25] [PASSED] 0x7D55 (METEORLAKE)
[05:55:25] [PASSED] 0x7D60 (METEORLAKE)
[05:55:25] [PASSED] 0x7DD5 (METEORLAKE)
[05:55:25] [PASSED] 0x6420 (LUNARLAKE)
[05:55:25] [PASSED] 0x64A0 (LUNARLAKE)
[05:55:25] [PASSED] 0x64B0 (LUNARLAKE)
[05:55:25] [PASSED] 0xE202 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE209 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE20B (BATTLEMAGE)
[05:55:25] [PASSED] 0xE20C (BATTLEMAGE)
[05:55:25] [PASSED] 0xE20D (BATTLEMAGE)
[05:55:25] [PASSED] 0xE210 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE211 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE212 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE216 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE220 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE221 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE222 (BATTLEMAGE)
[05:55:25] [PASSED] 0xE223 (BATTLEMAGE)
[05:55:25] [PASSED] 0xB080 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB081 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB082 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB083 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB084 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB085 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB086 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB087 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB08F (PANTHERLAKE)
[05:55:25] [PASSED] 0xB090 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB0A0 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB0A1 (PANTHERLAKE)
[05:55:25] [PASSED] 0xB0B0 (PANTHERLAKE)
[05:55:25] [PASSED] 0xFD80 (PANTHERLAKE)
[05:55:25] [PASSED] 0xFD81 (PANTHERLAKE)
[05:55:25] [PASSED] 0xD740 (NOVALAKE_S)
[05:55:25] [PASSED] 0xD741 (NOVALAKE_S)
[05:55:25] [PASSED] 0xD742 (NOVALAKE_S)
[05:55:25] [PASSED] 0xD743 (NOVALAKE_S)
[05:55:25] [PASSED] 0xD745 (NOVALAKE_S)
[05:55:25] [PASSED] 0xD74A (NOVALAKE_S)
[05:55:25] [PASSED] 0xD74B (NOVALAKE_S)
[05:55:25] [PASSED] 0x674C (CRESCENTISLAND)
[05:55:25] [PASSED] 0x674D (CRESCENTISLAND)
[05:55:25] [PASSED] 0x674E (CRESCENTISLAND)
[05:55:25] [PASSED] 0x674F (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6750 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6751 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6752 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6753 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6754 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6755 (CRESCENTISLAND)
[05:55:25] [PASSED] 0x6756 (CRESCENTISLAND)
[05:55:25] [PASSED] 0xD750 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD751 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD752 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD753 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD754 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD755 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD756 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD757 (NOVALAKE_P)
[05:55:25] [PASSED] 0xD75F (NOVALAKE_P)
[05:55:25] =============== [PASSED] check_platform_desc ===============
[05:55:25] ===================== [PASSED] xe_pci ======================
[05:55:25] ============= xe_rtp_tables_test (5 subtests) ==============
[05:55:25] ================== xe_rtp_table_gt_test ===================
[05:55:25] [PASSED] gt_was/14011060649
[05:55:25] [PASSED] gt_was/14011059788
[05:55:25] [PASSED] gt_was/14015795083
[05:55:25] [PASSED] gt_was/16021867713
[05:55:25] [PASSED] gt_was/14019449301
[05:55:25] [PASSED] gt_was/16028005424
[05:55:25] [PASSED] gt_was/14026578760
[05:55:25] [PASSED] gt_was/1409420604
[05:55:25] [PASSED] gt_was/1408615072
[05:55:25] [PASSED] gt_was/22010523718
[05:55:25] [PASSED] gt_was/14011006942
[05:55:25] [PASSED] gt_was/14014830051
[05:55:25] [PASSED] gt_was/18018781329
[05:55:25] [PASSED] gt_was/1509235366
[05:55:25] [PASSED] gt_was/18018781329
[05:55:25] [PASSED] gt_was/16016694945
[05:55:25] [PASSED] gt_was/14018575942
[05:55:25] [PASSED] gt_was/22016670082
[05:55:25] [PASSED] gt_was/22016670082
[05:55:25] [PASSED] gt_was/14017421178
[05:55:25] [PASSED] gt_was/16025250150
[05:55:25] [PASSED] gt_was/14021871409
[05:55:25] [PASSED] gt_was/16021865536
[05:55:25] [PASSED] gt_was/14021486841
[05:55:25] [PASSED] gt_was/14025160223
[05:55:25] [PASSED] gt_was/14026144927, 16029437861, 14026127056
[05:55:25] [PASSED] gt_was/14025635424
[05:55:25] [PASSED] gt_was/16028005424
[05:55:25] ============== [PASSED] xe_rtp_table_gt_test ===============
[05:55:25] ================== xe_rtp_table_gt_test ===================
[05:55:25] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[05:55:25] [PASSED] gt_tunings/Tuning: 32B Access Enable
[05:55:25] [PASSED] gt_tunings/Tuning: L3 cache
[05:55:25] [PASSED] gt_tunings/Tuning: L3 cache - media
[05:55:25] [PASSED] gt_tunings/Tuning: Compression Overfetch
[05:55:25] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[05:55:25] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[05:55:25] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[05:55:25] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[05:55:25] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[05:55:25] [PASSED] gt_tunings/Tuning: Stateless compression control
[05:55:25] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[05:55:25] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[05:55:25] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[05:55:25] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[05:55:25] [PASSED] gt_tunings/Tuning: Force All Non-Compressible Memory Reads to be 256B Overfetches
[05:55:25] ============== [PASSED] xe_rtp_table_gt_test ===============
[05:55:25] ================== xe_rtp_table_oob_test ==================
[05:55:25] [PASSED] oob_was/1607983814
[05:55:25] [PASSED] oob_was/16010904313
[05:55:25] [PASSED] oob_was/18022495364
[05:55:25] [PASSED] oob_was/22012773006
[05:55:25] [PASSED] oob_was/14014475959
[05:55:25] [PASSED] oob_was/22011391025
[05:55:25] [PASSED] oob_was/22012727170
[05:55:25] [PASSED] oob_was/22012727685
[05:55:25] [PASSED] oob_was/22016596838
[05:55:25] [PASSED] oob_was/18020744125
[05:55:25] [PASSED] oob_was/1409600907
[05:55:25] [PASSED] oob_was/22014953428
[05:55:25] [PASSED] oob_was/16017236439
[05:55:25] [PASSED] oob_was/14019821291
[05:55:25] [PASSED] oob_was/14015076503
[05:55:25] [PASSED] oob_was/22016122933
[05:55:25] [PASSED] oob_was/14018913170
[05:55:25] [PASSED] oob_was/14018094691
[05:55:25] [PASSED] oob_was/18024947630
[05:55:25] [PASSED] oob_was/16022287689
[05:55:25] [PASSED] oob_was/13011645652
[05:55:25] [PASSED] oob_was/14022293748
[05:55:25] [PASSED] oob_was/22019794406
[05:55:25] [PASSED] oob_was/22019338487
[05:55:25] [PASSED] oob_was/16023588340
[05:55:25] [PASSED] oob_was/14019789679
[05:55:25] [PASSED] oob_was/14022866841
[05:55:25] [PASSED] oob_was/16021333562
[05:55:25] [PASSED] oob_was/14016712196
[05:55:25] [PASSED] oob_was/14015568240
[05:55:25] [PASSED] oob_was/18013179988
[05:55:25] [PASSED] oob_was/1508761755
[05:55:25] [PASSED] oob_was/16023105232
[05:55:25] [PASSED] oob_was/16026508708
[05:55:25] [PASSED] oob_was/14020001231
[05:55:25] [PASSED] oob_was/16023683509
[05:55:25] [PASSED] oob_was/14025515070
[05:55:25] [PASSED] oob_was/15015404425_disable
[05:55:25] [PASSED] oob_was/16026007364
[05:55:25] [PASSED] oob_was/14020316580
[05:55:25] [PASSED] oob_was/14025883347
[05:55:25] [PASSED] oob_was/16029380221
[05:55:25] [PASSED] oob_was/22022079272
[05:55:25] [PASSED] oob_was/16029897822
[05:55:25] [PASSED] oob_was/14026539277
[05:55:25] [PASSED] oob_was/14027054324
[05:55:25] [PASSED] oob_was/14025941587
[05:55:25] [PASSED] oob_was/16030224309
[05:55:25] [PASSED] oob_was/14028709524
[05:55:25] [PASSED] oob_was/14028250015
[05:55:25] [PASSED] oob_was/16031259911
[05:55:25] ============== [PASSED] xe_rtp_table_oob_test ==============
[05:55:25] ================ xe_rtp_table_dev_oob_test ================
[05:55:25] [PASSED] device_oob_was/22010954014
[05:55:25] [PASSED] device_oob_was/15015404425
[05:55:25] [PASSED] device_oob_was/22019338487_display
[05:55:25] [PASSED] device_oob_was/14022085890
[05:55:25] [PASSED] device_oob_was/14026633728
[05:55:25] [PASSED] device_oob_was/14026746987
[05:55:25] [PASSED] device_oob_was/14026779378
[05:55:25] [PASSED] device_oob_was/14028586678
[05:55:25] [PASSED] device_oob_was/14028434957
[05:55:25] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[05:55:25] ========== xe_rtp_table_missing_upper_bound_test ==========
[05:55:25] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865
[05:55:25] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037
[05:55:25] [PASSED] register_whitelist/1806527549
[05:55:25] [PASSED] register_whitelist/allow_read_ctx_timestamp
[05:55:25] [PASSED] register_whitelist/allow_read_queue_timestamp
[05:55:25] [PASSED] register_whitelist/16014440446
[05:55:25] [PASSED] register_whitelist/16017236439
[05:55:25] [PASSED] register_whitelist/16020183090
[05:55:25] [PASSED] register_whitelist/14024997852
[05:55:25] [PASSED] register_whitelist/14024997852
[05:55:25] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ======
[05:55:25] =============== [PASSED] xe_rtp_tables_test ================
[05:55:25] =================== xe_rtp (3 subtests) ====================
[05:55:25] =================== xe_rtp_rules_tests ====================
[05:55:25] [PASSED] no
[05:55:25] [PASSED] yes
[05:55:25] [PASSED] no-and-no
[05:55:25] [PASSED] no-and-yes
[05:55:25] [PASSED] yes-and-no
[05:55:25] [PASSED] yes-and-yes
[05:55:25] [PASSED] no-or-no
[05:55:25] [PASSED] no-or-yes
[05:55:25] [PASSED] yes-or-no
[05:55:25] [PASSED] yes-or-yes
[05:55:25] [PASSED] no-yes-or-yes-no
[05:55:25] [PASSED] no-yes-or-yes-yes
[05:55:25] [PASSED] yes-yes-or-no-yes
[05:55:25] [PASSED] yes-yes-or-yes-yes
[05:55:25] [PASSED] no-no-or-yes-or-no
[05:55:25] [PASSED] or
[05:55:25] [PASSED] or-yes
[05:55:25] [PASSED] or-no
[05:55:25] [PASSED] yes-or
[05:55:25] [PASSED] no-or
[05:55:25] [PASSED] no-or-or-yes
[05:55:25] [PASSED] yes-or-or-no
[05:55:25] [PASSED] no-or-or-no
[05:55:25] [PASSED] missing-context-engine-class
[05:55:25] [PASSED] missing-context-engine-class-or-yes
[05:55:25] [PASSED] missing-context-engine-class-or-or-yes
[05:55:25] =============== [PASSED] xe_rtp_rules_tests ================
[05:55:25] =============== xe_rtp_process_to_sr_tests ================
[05:55:25] [PASSED] coalesce-same-reg
[05:55:25] [PASSED] coalesce-same-reg-literal-and-func
[05:55:25] [PASSED] no-match-no-add
[05:55:25] [PASSED] two-regs-two-entries
[05:55:25] [PASSED] clr-one-set-other
[05:55:25] [PASSED] set-field
[05:55:25] [PASSED] conflict-duplicate
[05:55:25] [PASSED] conflict-not-disjoint
[05:55:25] [PASSED] conflict-not-disjoint-literal-and-func
[05:55:25] [PASSED] conflict-reg-type
[05:55:25] [PASSED] bad-mcr-reg-forced-to-regular
[05:55:25] [PASSED] bad-regular-reg-forced-to-mcr
[05:55:25] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[05:55:25] ================== xe_rtp_process_tests ===================
[05:55:25] [PASSED] active1
[05:55:25] [PASSED] active2
[05:55:25] [PASSED] active-inactive
[05:55:25] [PASSED] inactive-active
[05:55:25] [PASSED] inactive-active-inactive
[05:55:25] [PASSED] inactive-inactive-inactive
[05:55:25] ============== [PASSED] xe_rtp_process_tests ===============
[05:55:25] ===================== [PASSED] xe_rtp ======================
[05:55:25] ==================== xe_wa (1 subtest) =====================
[05:55:25] ======================== xe_wa_gt =========================
[05:55:25] [PASSED] TIGERLAKE B0
[05:55:25] [PASSED] DG1 A0
[05:55:25] [PASSED] DG1 B0
[05:55:25] [PASSED] ALDERLAKE_S A0
[05:55:25] [PASSED] ALDERLAKE_S B0
[05:55:25] [PASSED] ALDERLAKE_S C0
[05:55:25] [PASSED] ALDERLAKE_S D0
[05:55:25] [PASSED] ALDERLAKE_P A0
[05:55:25] [PASSED] ALDERLAKE_P B0
[05:55:25] [PASSED] ALDERLAKE_P C0
[05:55:25] [PASSED] ALDERLAKE_S RPLS D0
[05:55:25] [PASSED] ALDERLAKE_P RPLU E0
[05:55:25] [PASSED] DG2 G10 C0
[05:55:25] [PASSED] DG2 G11 B1
[05:55:25] [PASSED] DG2 G12 A1
[05:55:25] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[05:55:25] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[05:55:25] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[05:55:25] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[05:55:25] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[05:55:25] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[05:55:25] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[05:55:25] ==================== [PASSED] xe_wa_gt =====================
[05:55:25] ====================== [PASSED] xe_wa ======================
[05:55:25] ============================================================
[05:55:25] Testing complete. Ran 860 tests: passed: 831, skipped: 29
[05:55:25] Elapsed time: 42.437s total, 2.607s configuring, 39.065s building, 0.747s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[05:55:25] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:55:27] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:55:53] Starting KUnit Kernel (1/1)...
[05:55:53] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:55:53] ============ drm_test_pick_cmdline (2 subtests) ============
[05:55:53] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[05:55:53] =============== drm_test_pick_cmdline_named ===============
[05:55:53] [PASSED] NTSC
[05:55:53] [PASSED] NTSC-J
[05:55:53] [PASSED] PAL
[05:55:53] [PASSED] PAL-M
[05:55:53] =========== [PASSED] drm_test_pick_cmdline_named ===========
[05:55:53] ============== [PASSED] drm_test_pick_cmdline ==============
[05:55:53] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[05:55:53] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[05:55:53] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[05:55:53] =========== drm_validate_clone_mode (2 subtests) ===========
[05:55:53] ============== drm_test_check_in_clone_mode ===============
[05:55:53] [PASSED] in_clone_mode
[05:55:53] [PASSED] not_in_clone_mode
[05:55:53] ========== [PASSED] drm_test_check_in_clone_mode ===========
[05:55:53] =============== drm_test_check_valid_clones ===============
[05:55:53] [PASSED] not_in_clone_mode
[05:55:53] [PASSED] valid_clone
[05:55:53] [PASSED] invalid_clone
[05:55:53] =========== [PASSED] drm_test_check_valid_clones ===========
[05:55:53] ============= [PASSED] drm_validate_clone_mode =============
[05:55:53] ============= drm_validate_modeset (1 subtest) =============
[05:55:53] [PASSED] drm_test_check_connector_changed_modeset
[05:55:53] ============== [PASSED] drm_validate_modeset ===============
[05:55:53] ====== drm_test_bridge_get_current_state (1 subtest) =======
[05:55:53] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[05:55:53] ======== [PASSED] drm_test_bridge_get_current_state ========
[05:55:53] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[05:55:53] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[05:55:53] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[05:55:53] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[05:55:53] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[05:55:53] ============== drm_bridge_alloc (2 subtests) ===============
[05:55:53] [PASSED] drm_test_drm_bridge_alloc_basic
[05:55:53] [PASSED] drm_test_drm_bridge_alloc_get_put
[05:55:53] ================ [PASSED] drm_bridge_alloc =================
[05:55:53] ============= drm_bridge_bus_fmt (5 subtests) ==============
[05:55:53] [PASSED] drm_test_bridge_rgb_yuv_rgb
[05:55:53] [PASSED] drm_test_bridge_must_convert_to_yuv444
[05:55:54] [PASSED] drm_test_bridge_hdmi_auto_rgb
[05:55:54] [PASSED] drm_test_bridge_auto_first
[05:55:54] [PASSED] drm_test_bridge_rgb_yuv_no_path
[05:55:54] =============== [PASSED] drm_bridge_bus_fmt ================
[05:55:54] ============= drm_cmdline_parser (40 subtests) =============
[05:55:54] [PASSED] drm_test_cmdline_force_d_only
[05:55:54] [PASSED] drm_test_cmdline_force_D_only_dvi
[05:55:54] [PASSED] drm_test_cmdline_force_D_only_hdmi
[05:55:54] [PASSED] drm_test_cmdline_force_D_only_not_digital
[05:55:54] [PASSED] drm_test_cmdline_force_e_only
[05:55:54] [PASSED] drm_test_cmdline_res
[05:55:54] [PASSED] drm_test_cmdline_res_vesa
[05:55:54] [PASSED] drm_test_cmdline_res_vesa_rblank
[05:55:54] [PASSED] drm_test_cmdline_res_rblank
[05:55:54] [PASSED] drm_test_cmdline_res_bpp
[05:55:54] [PASSED] drm_test_cmdline_res_refresh
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[05:55:54] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[05:55:54] [PASSED] drm_test_cmdline_res_margins_force_on
[05:55:54] [PASSED] drm_test_cmdline_res_vesa_margins
[05:55:54] [PASSED] drm_test_cmdline_name
[05:55:54] [PASSED] drm_test_cmdline_name_bpp
[05:55:54] [PASSED] drm_test_cmdline_name_option
[05:55:54] [PASSED] drm_test_cmdline_name_bpp_option
[05:55:54] [PASSED] drm_test_cmdline_rotate_0
[05:55:54] [PASSED] drm_test_cmdline_rotate_90
[05:55:54] [PASSED] drm_test_cmdline_rotate_180
[05:55:54] [PASSED] drm_test_cmdline_rotate_270
[05:55:54] [PASSED] drm_test_cmdline_hmirror
[05:55:54] [PASSED] drm_test_cmdline_vmirror
[05:55:54] [PASSED] drm_test_cmdline_margin_options
[05:55:54] [PASSED] drm_test_cmdline_multiple_options
[05:55:54] [PASSED] drm_test_cmdline_bpp_extra_and_option
[05:55:54] [PASSED] drm_test_cmdline_extra_and_option
[05:55:54] [PASSED] drm_test_cmdline_freestanding_options
[05:55:54] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[05:55:54] [PASSED] drm_test_cmdline_panel_orientation
[05:55:54] ================ drm_test_cmdline_invalid =================
[05:55:54] [PASSED] margin_only
[05:55:54] [PASSED] interlace_only
[05:55:54] [PASSED] res_missing_x
[05:55:54] [PASSED] res_missing_y
[05:55:54] [PASSED] res_bad_y
[05:55:54] [PASSED] res_missing_y_bpp
[05:55:54] [PASSED] res_bad_bpp
[05:55:54] [PASSED] res_bad_refresh
[05:55:54] [PASSED] res_bpp_refresh_force_on_off
[05:55:54] [PASSED] res_invalid_mode
[05:55:54] [PASSED] res_bpp_wrong_place_mode
[05:55:54] [PASSED] name_bpp_refresh
[05:55:54] [PASSED] name_refresh
[05:55:54] [PASSED] name_refresh_wrong_mode
[05:55:54] [PASSED] name_refresh_invalid_mode
[05:55:54] [PASSED] rotate_multiple
[05:55:54] [PASSED] rotate_invalid_val
[05:55:54] [PASSED] rotate_truncated
[05:55:54] [PASSED] invalid_option
[05:55:54] [PASSED] invalid_tv_option
[05:55:54] [PASSED] truncated_tv_option
[05:55:54] ============ [PASSED] drm_test_cmdline_invalid =============
[05:55:54] =============== drm_test_cmdline_tv_options ===============
[05:55:54] [PASSED] NTSC
[05:55:54] [PASSED] NTSC_443
[05:55:54] [PASSED] NTSC_J
[05:55:54] [PASSED] PAL
[05:55:54] [PASSED] PAL_M
[05:55:54] [PASSED] PAL_N
[05:55:54] [PASSED] SECAM
[05:55:54] [PASSED] MONO_525
[05:55:54] [PASSED] MONO_625
[05:55:54] =========== [PASSED] drm_test_cmdline_tv_options ===========
[05:55:54] =============== [PASSED] drm_cmdline_parser ================
[05:55:54] ========== drmm_connector_hdmi_init (20 subtests) ==========
[05:55:54] [PASSED] drm_test_connector_hdmi_init_valid
[05:55:54] [PASSED] drm_test_connector_hdmi_init_bpc_8
[05:55:54] [PASSED] drm_test_connector_hdmi_init_bpc_10
[05:55:54] [PASSED] drm_test_connector_hdmi_init_bpc_12
[05:55:54] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[05:55:54] [PASSED] drm_test_connector_hdmi_init_bpc_null
[05:55:54] [PASSED] drm_test_connector_hdmi_init_formats_empty
[05:55:54] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[05:55:54] === drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[05:55:54] [PASSED] supported_formats=0x9 yuv420_allowed=1
[05:55:54] [PASSED] supported_formats=0x9 yuv420_allowed=0
[05:55:54] [PASSED] supported_formats=0x5 yuv420_allowed=1
[05:55:54] [PASSED] supported_formats=0x5 yuv420_allowed=0
[05:55:54] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[05:55:54] [PASSED] drm_test_connector_hdmi_init_null_ddc
[05:55:54] [PASSED] drm_test_connector_hdmi_init_null_product
[05:55:54] [PASSED] drm_test_connector_hdmi_init_null_vendor
[05:55:54] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[05:55:54] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[05:55:54] [PASSED] drm_test_connector_hdmi_init_product_valid
[05:55:54] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[05:55:54] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[05:55:54] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[05:55:54] ========= drm_test_connector_hdmi_init_type_valid =========
[05:55:54] [PASSED] HDMI-A
[05:55:54] [PASSED] HDMI-B
[05:55:54] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[05:55:54] ======== drm_test_connector_hdmi_init_type_invalid ========
[05:55:54] [PASSED] Unknown
[05:55:54] [PASSED] VGA
[05:55:54] [PASSED] DVI-I
[05:55:54] [PASSED] DVI-D
[05:55:54] [PASSED] DVI-A
[05:55:54] [PASSED] Composite
[05:55:54] [PASSED] SVIDEO
[05:55:54] [PASSED] LVDS
[05:55:54] [PASSED] Component
[05:55:54] [PASSED] DIN
[05:55:54] [PASSED] DP
[05:55:54] [PASSED] TV
[05:55:54] [PASSED] eDP
[05:55:54] [PASSED] Virtual
[05:55:54] [PASSED] DSI
[05:55:54] [PASSED] DPI
[05:55:54] [PASSED] Writeback
[05:55:54] [PASSED] SPI
[05:55:54] [PASSED] USB
[05:55:54] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[05:55:54] ============ [PASSED] drmm_connector_hdmi_init =============
[05:55:54] ============= drmm_connector_init (3 subtests) =============
[05:55:54] [PASSED] drm_test_drmm_connector_init
[05:55:54] [PASSED] drm_test_drmm_connector_init_null_ddc
[05:55:54] ========= drm_test_drmm_connector_init_type_valid =========
[05:55:54] [PASSED] Unknown
[05:55:54] [PASSED] VGA
[05:55:54] [PASSED] DVI-I
[05:55:54] [PASSED] DVI-D
[05:55:54] [PASSED] DVI-A
[05:55:54] [PASSED] Composite
[05:55:54] [PASSED] SVIDEO
[05:55:54] [PASSED] LVDS
[05:55:54] [PASSED] Component
[05:55:54] [PASSED] DIN
[05:55:54] [PASSED] DP
[05:55:54] [PASSED] HDMI-A
[05:55:54] [PASSED] HDMI-B
[05:55:54] [PASSED] TV
[05:55:54] [PASSED] eDP
[05:55:54] [PASSED] Virtual
[05:55:54] [PASSED] DSI
[05:55:54] [PASSED] DPI
[05:55:54] [PASSED] Writeback
[05:55:54] [PASSED] SPI
[05:55:54] [PASSED] USB
[05:55:54] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[05:55:54] =============== [PASSED] drmm_connector_init ===============
[05:55:54] ========= drm_connector_dynamic_init (6 subtests) ==========
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_init
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_init_properties
[05:55:54] ===== drm_test_drm_connector_dynamic_init_type_valid ======
[05:55:54] [PASSED] Unknown
[05:55:54] [PASSED] VGA
[05:55:54] [PASSED] DVI-I
[05:55:54] [PASSED] DVI-D
[05:55:54] [PASSED] DVI-A
[05:55:54] [PASSED] Composite
[05:55:54] [PASSED] SVIDEO
[05:55:54] [PASSED] LVDS
[05:55:54] [PASSED] Component
[05:55:54] [PASSED] DIN
[05:55:54] [PASSED] DP
[05:55:54] [PASSED] HDMI-A
[05:55:54] [PASSED] HDMI-B
[05:55:54] [PASSED] TV
[05:55:54] [PASSED] eDP
[05:55:54] [PASSED] Virtual
[05:55:54] [PASSED] DSI
[05:55:54] [PASSED] DPI
[05:55:54] [PASSED] Writeback
[05:55:54] [PASSED] SPI
[05:55:54] [PASSED] USB
[05:55:54] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[05:55:54] ======== drm_test_drm_connector_dynamic_init_name =========
[05:55:54] [PASSED] Unknown
[05:55:54] [PASSED] VGA
[05:55:54] [PASSED] DVI-I
[05:55:54] [PASSED] DVI-D
[05:55:54] [PASSED] DVI-A
[05:55:54] [PASSED] Composite
[05:55:54] [PASSED] SVIDEO
[05:55:54] [PASSED] LVDS
[05:55:54] [PASSED] Component
[05:55:54] [PASSED] DIN
[05:55:54] [PASSED] DP
[05:55:54] [PASSED] HDMI-A
[05:55:54] [PASSED] HDMI-B
[05:55:54] [PASSED] TV
[05:55:54] [PASSED] eDP
[05:55:54] [PASSED] Virtual
[05:55:54] [PASSED] DSI
[05:55:54] [PASSED] DPI
[05:55:54] [PASSED] Writeback
[05:55:54] [PASSED] SPI
[05:55:54] [PASSED] USB
[05:55:54] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[05:55:54] =========== [PASSED] drm_connector_dynamic_init ============
[05:55:54] ==== drm_connector_dynamic_register_early (4 subtests) =====
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[05:55:54] ====== [PASSED] drm_connector_dynamic_register_early =======
[05:55:54] ======= drm_connector_dynamic_register (7 subtests) ========
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[05:55:54] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[05:55:54] ========= [PASSED] drm_connector_dynamic_register ==========
[05:55:54] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[05:55:54] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[05:55:54] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[05:55:54] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[05:55:54] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[05:55:54] ========== drm_test_get_tv_mode_from_name_valid ===========
[05:55:54] [PASSED] NTSC
[05:55:54] [PASSED] NTSC-443
[05:55:54] [PASSED] NTSC-J
[05:55:54] [PASSED] PAL
[05:55:54] [PASSED] PAL-M
[05:55:54] [PASSED] PAL-N
[05:55:54] [PASSED] SECAM
[05:55:54] [PASSED] Mono
[05:55:54] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[05:55:54] [PASSED] drm_test_get_tv_mode_from_name_truncated
[05:55:54] ============ [PASSED] drm_get_tv_mode_from_name ============
[05:55:54] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[05:55:54] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[05:55:54] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[05:55:54] [PASSED] VIC 96
[05:55:54] [PASSED] VIC 97
[05:55:54] [PASSED] VIC 101
[05:55:54] [PASSED] VIC 102
[05:55:54] [PASSED] VIC 106
[05:55:54] [PASSED] VIC 107
[05:55:54] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[05:55:54] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[05:55:54] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[05:55:54] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[05:55:54] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[05:55:54] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[05:55:54] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[05:55:54] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[05:55:54] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[05:55:54] [PASSED] Automatic
[05:55:54] [PASSED] Full
[05:55:54] [PASSED] Limited 16:235
[05:55:54] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[05:55:54] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[05:55:54] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[05:55:54] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[05:55:54] === drm_test_drm_hdmi_connector_get_output_format_name ====
[05:55:54] [PASSED] RGB
[05:55:54] [PASSED] YUV 4:2:0
[05:55:54] [PASSED] YUV 4:2:2
[05:55:54] [PASSED] YUV 4:4:4
[05:55:54] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[05:55:54] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[05:55:54] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[05:55:54] ============= drm_damage_helper (21 subtests) ==============
[05:55:54] [PASSED] drm_test_damage_iter_no_damage
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_src_moved
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_not_visible
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[05:55:54] [PASSED] drm_test_damage_iter_no_damage_no_fb
[05:55:54] [PASSED] drm_test_damage_iter_simple_damage
[05:55:54] [PASSED] drm_test_damage_iter_single_damage
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_outside_src
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_src_moved
[05:55:54] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[05:55:54] [PASSED] drm_test_damage_iter_damage
[05:55:54] [PASSED] drm_test_damage_iter_damage_one_intersect
[05:55:54] [PASSED] drm_test_damage_iter_damage_one_outside
[05:55:54] [PASSED] drm_test_damage_iter_damage_src_moved
[05:55:54] [PASSED] drm_test_damage_iter_damage_not_visible
[05:55:54] ================ [PASSED] drm_damage_helper ================
[05:55:54] ============== drm_dp_mst_helper (3 subtests) ==============
[05:55:54] ============== drm_test_dp_mst_calc_pbn_mode ==============
[05:55:54] [PASSED] Clock 154000 BPP 30 DSC disabled
[05:55:54] [PASSED] Clock 234000 BPP 30 DSC disabled
[05:55:54] [PASSED] Clock 297000 BPP 24 DSC disabled
[05:55:54] [PASSED] Clock 332880 BPP 24 DSC enabled
[05:55:54] [PASSED] Clock 324540 BPP 24 DSC enabled
[05:55:54] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[05:55:54] ============== drm_test_dp_mst_calc_pbn_div ===============
[05:55:54] [PASSED] Link rate 2000000 lane count 4
[05:55:54] [PASSED] Link rate 2000000 lane count 2
[05:55:54] [PASSED] Link rate 2000000 lane count 1
[05:55:54] [PASSED] Link rate 1350000 lane count 4
[05:55:54] [PASSED] Link rate 1350000 lane count 2
[05:55:54] [PASSED] Link rate 1350000 lane count 1
[05:55:54] [PASSED] Link rate 1000000 lane count 4
[05:55:54] [PASSED] Link rate 1000000 lane count 2
[05:55:54] [PASSED] Link rate 1000000 lane count 1
[05:55:54] [PASSED] Link rate 810000 lane count 4
[05:55:54] [PASSED] Link rate 810000 lane count 2
[05:55:54] [PASSED] Link rate 810000 lane count 1
[05:55:54] [PASSED] Link rate 540000 lane count 4
[05:55:54] [PASSED] Link rate 540000 lane count 2
[05:55:54] [PASSED] Link rate 540000 lane count 1
[05:55:54] [PASSED] Link rate 270000 lane count 4
[05:55:54] [PASSED] Link rate 270000 lane count 2
[05:55:54] [PASSED] Link rate 270000 lane count 1
[05:55:54] [PASSED] Link rate 162000 lane count 4
[05:55:54] [PASSED] Link rate 162000 lane count 2
[05:55:54] [PASSED] Link rate 162000 lane count 1
[05:55:54] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[05:55:54] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[05:55:54] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[05:55:54] [PASSED] DP_POWER_UP_PHY with port number
[05:55:54] [PASSED] DP_POWER_DOWN_PHY with port number
[05:55:54] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[05:55:54] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[05:55:54] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[05:55:54] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[05:55:54] [PASSED] DP_QUERY_PAYLOAD with port number
[05:55:54] [PASSED] DP_QUERY_PAYLOAD with VCPI
[05:55:54] [PASSED] DP_REMOTE_DPCD_READ with port number
[05:55:54] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[05:55:54] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[05:55:54] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[05:55:54] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[05:55:54] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[05:55:54] [PASSED] DP_REMOTE_I2C_READ with port number
[05:55:54] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[05:55:54] [PASSED] DP_REMOTE_I2C_READ with transactions array
[05:55:54] [PASSED] DP_REMOTE_I2C_WRITE with port number
[05:55:54] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[05:55:54] [PASSED] DP_REMOTE_I2C_WRITE with data array
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[05:55:54] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[05:55:54] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[05:55:54] ================ [PASSED] drm_dp_mst_helper ================
[05:55:54] ================== drm_exec (7 subtests) ===================
[05:55:54] [PASSED] sanitycheck
[05:55:54] [PASSED] test_lock
[05:55:54] [PASSED] test_lock_unlock
[05:55:54] [PASSED] test_duplicates
[05:55:54] [PASSED] test_prepare
[05:55:54] [PASSED] test_prepare_array
[05:55:54] [PASSED] test_multiple_loops
[05:55:54] ==================== [PASSED] drm_exec =====================
[05:55:54] =========== drm_format_helper_test (17 subtests) ===========
[05:55:54] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[05:55:54] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[05:55:54] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[05:55:54] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[05:55:54] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[05:55:54] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[05:55:54] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[05:55:54] ============= drm_test_fb_xrgb8888_to_bgr888 ==============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[05:55:54] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[05:55:54] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[05:55:54] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[05:55:54] ============== drm_test_fb_xrgb8888_to_mono ===============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[05:55:54] ==================== drm_test_fb_swab =====================
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ================ [PASSED] drm_test_fb_swab =================
[05:55:54] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[05:55:54] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[05:55:54] [PASSED] single_pixel_source_buffer
[05:55:54] [PASSED] single_pixel_clip_rectangle
[05:55:54] [PASSED] well_known_colors
[05:55:54] [PASSED] destination_pitch
[05:55:54] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[05:55:54] ================= drm_test_fb_clip_offset =================
[05:55:54] [PASSED] pass through
[05:55:54] [PASSED] horizontal offset
[05:55:54] [PASSED] vertical offset
[05:55:54] [PASSED] horizontal and vertical offset
[05:55:54] [PASSED] horizontal offset (custom pitch)
[05:55:54] [PASSED] vertical offset (custom pitch)
[05:55:54] [PASSED] horizontal and vertical offset (custom pitch)
[05:55:54] ============= [PASSED] drm_test_fb_clip_offset =============
[05:55:54] =================== drm_test_fb_memcpy ====================
[05:55:54] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[05:55:54] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[05:55:54] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[05:55:54] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[05:55:54] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[05:55:54] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[05:55:54] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[05:55:54] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[05:55:54] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[05:55:54] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[05:55:54] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[05:55:54] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[05:55:54] =============== [PASSED] drm_test_fb_memcpy ================
[05:55:54] ============= [PASSED] drm_format_helper_test ==============
[05:55:54] ================= drm_format (18 subtests) =================
[05:55:54] [PASSED] drm_test_format_block_width_invalid
[05:55:54] [PASSED] drm_test_format_block_width_one_plane
[05:55:54] [PASSED] drm_test_format_block_width_two_plane
[05:55:54] [PASSED] drm_test_format_block_width_three_plane
[05:55:54] [PASSED] drm_test_format_block_width_tiled
[05:55:54] [PASSED] drm_test_format_block_height_invalid
[05:55:54] [PASSED] drm_test_format_block_height_one_plane
[05:55:54] [PASSED] drm_test_format_block_height_two_plane
[05:55:54] [PASSED] drm_test_format_block_height_three_plane
[05:55:54] [PASSED] drm_test_format_block_height_tiled
[05:55:54] [PASSED] drm_test_format_min_pitch_invalid
[05:55:54] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[05:55:54] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[05:55:54] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[05:55:54] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[05:55:54] [PASSED] drm_test_format_min_pitch_two_plane
[05:55:54] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[05:55:54] [PASSED] drm_test_format_min_pitch_tiled
[05:55:54] =================== [PASSED] drm_format ====================
[05:55:54] ============== drm_framebuffer (10 subtests) ===============
[05:55:54] ========== drm_test_framebuffer_check_src_coords ==========
[05:55:54] [PASSED] Success: source fits into fb
[05:55:54] [PASSED] Fail: overflowing fb with x-axis coordinate
[05:55:54] [PASSED] Fail: overflowing fb with y-axis coordinate
[05:55:54] [PASSED] Fail: overflowing fb with source width
[05:55:54] [PASSED] Fail: overflowing fb with source height
[05:55:54] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[05:55:54] [PASSED] drm_test_framebuffer_cleanup
[05:55:54] =============== drm_test_framebuffer_create ===============
[05:55:54] [PASSED] ABGR8888 normal sizes
[05:55:54] [PASSED] ABGR8888 max sizes
[05:55:54] [PASSED] ABGR8888 pitch greater than min required
[05:55:54] [PASSED] ABGR8888 pitch less than min required
[05:55:54] [PASSED] ABGR8888 Invalid width
[05:55:54] [PASSED] ABGR8888 Invalid buffer handle
[05:55:54] [PASSED] No pixel format
[05:55:54] [PASSED] ABGR8888 Width 0
[05:55:54] [PASSED] ABGR8888 Height 0
[05:55:54] [PASSED] ABGR8888 Out of bound height * pitch combination
[05:55:54] [PASSED] ABGR8888 Large buffer offset
[05:55:54] [PASSED] ABGR8888 Buffer offset for inexistent plane
[05:55:54] [PASSED] ABGR8888 Invalid flag
[05:55:54] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[05:55:54] [PASSED] ABGR8888 Valid buffer modifier
[05:55:54] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[05:55:54] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] NV12 Normal sizes
[05:55:54] [PASSED] NV12 Max sizes
[05:55:54] [PASSED] NV12 Invalid pitch
[05:55:54] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[05:55:54] [PASSED] NV12 different modifier per-plane
[05:55:54] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[05:55:54] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] NV12 Modifier for inexistent plane
[05:55:54] [PASSED] NV12 Handle for inexistent plane
[05:55:54] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[05:55:54] [PASSED] YVU420 Normal sizes
[05:55:54] [PASSED] YVU420 Max sizes
[05:55:54] [PASSED] YVU420 Invalid pitch
[05:55:54] [PASSED] YVU420 Different pitches
[05:55:54] [PASSED] YVU420 Different buffer offsets/pitches
[05:55:54] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[05:55:54] [PASSED] YVU420 Valid modifier
[05:55:54] [PASSED] YVU420 Different modifiers per plane
[05:55:54] [PASSED] YVU420 Modifier for inexistent plane
[05:55:54] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[05:55:54] [PASSED] X0L2 Normal sizes
[05:55:54] [PASSED] X0L2 Max sizes
[05:55:54] [PASSED] X0L2 Invalid pitch
[05:55:54] [PASSED] X0L2 Pitch greater than minimum required
[05:55:54] [PASSED] X0L2 Handle for inexistent plane
[05:55:54] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[05:55:54] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[05:55:54] [PASSED] X0L2 Valid modifier
[05:55:54] [PASSED] X0L2 Modifier for inexistent plane
[05:55:54] =========== [PASSED] drm_test_framebuffer_create ===========
[05:55:54] [PASSED] drm_test_framebuffer_free
[05:55:54] [PASSED] drm_test_framebuffer_init
[05:55:54] [PASSED] drm_test_framebuffer_init_bad_format
[05:55:54] [PASSED] drm_test_framebuffer_init_dev_mismatch
[05:55:54] [PASSED] drm_test_framebuffer_lookup
[05:55:54] [PASSED] drm_test_framebuffer_lookup_inexistent
[05:55:54] [PASSED] drm_test_framebuffer_modifiers_not_supported
[05:55:54] ================= [PASSED] drm_framebuffer =================
[05:55:54] ================ drm_gem_shmem (8 subtests) ================
[05:55:54] [PASSED] drm_gem_shmem_test_obj_create
[05:55:54] [PASSED] drm_gem_shmem_test_obj_create_private
[05:55:54] [PASSED] drm_gem_shmem_test_pin_pages
[05:55:54] [PASSED] drm_gem_shmem_test_vmap
[05:55:54] [PASSED] drm_gem_shmem_test_get_sg_table
[05:55:54] [PASSED] drm_gem_shmem_test_get_pages_sgt
[05:55:54] [PASSED] drm_gem_shmem_test_madvise
[05:55:54] [PASSED] drm_gem_shmem_test_purge
[05:55:54] ================== [PASSED] drm_gem_shmem ==================
[05:55:54] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[05:55:54] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 =======
[05:55:54] [PASSED] Automatic
[05:55:54] [PASSED] Full
[05:55:54] [PASSED] Limited 16:235
[05:55:54] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[05:55:54] [PASSED] drm_test_check_disable_connector
[05:55:54] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[05:55:54] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[05:55:54] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[05:55:54] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[05:55:54] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[05:55:54] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[05:55:54] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[05:55:54] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[05:55:54] [PASSED] drm_test_check_output_bpc_dvi
[05:55:54] [PASSED] drm_test_check_output_bpc_format_vic_1
[05:55:54] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[05:55:54] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[05:55:54] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[05:55:54] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[05:55:54] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[05:55:54] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[05:55:54] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[05:55:54] ============ drm_test_check_hdmi_color_format =============
[05:55:54] [PASSED] AUTO -> RGB
[05:55:54] [PASSED] YCBCR422 -> YUV422
[05:55:54] [PASSED] YCBCR420 -> YUV420
[05:55:54] [PASSED] YCBCR444 -> YUV444
[05:55:54] [PASSED] RGB -> RGB
[05:55:54] ======== [PASSED] drm_test_check_hdmi_color_format =========
[05:55:54] ======== drm_test_check_hdmi_color_format_420_only ========
[05:55:54] [PASSED] RGB should fail
[05:55:54] [PASSED] YUV444 should fail
[05:55:54] [PASSED] YUV422 should fail
[05:55:54] [PASSED] YUV420 should work
[05:55:54] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[05:55:54] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[05:55:54] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[05:55:54] [PASSED] drm_test_check_broadcast_rgb_value
[05:55:54] [PASSED] drm_test_check_bpc_8_value
[05:55:54] [PASSED] drm_test_check_bpc_10_value
[05:55:54] [PASSED] drm_test_check_bpc_12_value
[05:55:54] [PASSED] drm_test_check_format_value
[05:55:54] [PASSED] drm_test_check_tmds_char_value
[05:55:54] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[05:55:54] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[05:55:54] [PASSED] drm_test_check_mode_valid
[05:55:54] [PASSED] drm_test_check_mode_valid_reject
[05:55:54] [PASSED] drm_test_check_mode_valid_reject_rate
[05:55:54] [PASSED] drm_test_check_mode_valid_reject_max_clock
[05:55:54] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[05:55:54] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[05:55:54] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[05:55:54] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[05:55:54] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[05:55:54] [PASSED] drm_test_check_infoframes
[05:55:54] [PASSED] drm_test_check_reject_avi_infoframe
[05:55:54] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[05:55:54] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[05:55:54] [PASSED] drm_test_check_reject_audio_infoframe
[05:55:54] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[05:55:54] ================= drm_managed (2 subtests) =================
[05:55:54] [PASSED] drm_test_managed_release_action
[05:55:54] [PASSED] drm_test_managed_run_action
[05:55:54] =================== [PASSED] drm_managed ===================
[05:55:54] =================== drm_mm (6 subtests) ====================
[05:55:54] [PASSED] drm_test_mm_init
[05:55:54] [PASSED] drm_test_mm_debug
[05:55:54] [PASSED] drm_test_mm_align32
[05:55:54] [PASSED] drm_test_mm_align64
[05:55:54] [PASSED] drm_test_mm_lowest
[05:55:54] [PASSED] drm_test_mm_highest
[05:55:54] ===================== [PASSED] drm_mm ======================
[05:55:54] ============= drm_modes_analog_tv (5 subtests) =============
[05:55:54] [PASSED] drm_test_modes_analog_tv_mono_576i
[05:55:54] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[05:55:54] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[05:55:54] [PASSED] drm_test_modes_analog_tv_pal_576i
[05:55:54] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[05:55:54] =============== [PASSED] drm_modes_analog_tv ===============
[05:55:54] ============== drm_panic_helper (3 subtests) ===============
[05:55:54] ============= drm_test_panic_screen_user_map ==============
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] ========= [PASSED] drm_test_panic_screen_user_map ==========
[05:55:54] ============= drm_test_panic_screen_user_page =============
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] ========= [PASSED] drm_test_panic_screen_user_page =========
[05:55:54] ========== drm_test_panic_screen_user_set_pixel ===========
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[05:55:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[05:55:54] ====== [PASSED] drm_test_panic_screen_user_set_pixel =======
[05:55:54] ================ [PASSED] drm_panic_helper =================
[05:55:54] ============== drm_plane_helper (2 subtests) ===============
[05:55:54] =============== drm_test_check_plane_state ================
[05:55:54] [PASSED] clipping_simple
[05:55:54] [PASSED] clipping_rotate_reflect
[05:55:54] [PASSED] positioning_simple
[05:55:54] [PASSED] upscaling
[05:55:54] [PASSED] downscaling
[05:55:54] [PASSED] rounding1
[05:55:54] [PASSED] rounding2
[05:55:54] [PASSED] rounding3
[05:55:54] [PASSED] rounding4
[05:55:54] =========== [PASSED] drm_test_check_plane_state ============
[05:55:54] =========== drm_test_check_invalid_plane_state ============
[05:55:54] [PASSED] positioning_invalid
[05:55:54] [PASSED] upscaling_invalid
[05:55:54] [PASSED] downscaling_invalid
[05:55:54] ======= [PASSED] drm_test_check_invalid_plane_state ========
[05:55:54] ================ [PASSED] drm_plane_helper =================
[05:55:54] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[05:55:54] ====== drm_test_connector_helper_tv_get_modes_check =======
[05:55:54] [PASSED] None
[05:55:54] [PASSED] PAL
[05:55:54] [PASSED] NTSC
[05:55:54] [PASSED] Both, NTSC Default
[05:55:54] [PASSED] Both, PAL Default
[05:55:54] [PASSED] Both, NTSC Default, with PAL on command-line
[05:55:54] [PASSED] Both, PAL Default, with NTSC on command-line
[05:55:54] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[05:55:54] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[05:55:54] ================== drm_rect (9 subtests) ===================
[05:55:54] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[05:55:54] [PASSED] drm_test_rect_clip_scaled_not_clipped
[05:55:54] [PASSED] drm_test_rect_clip_scaled_clipped
[05:55:54] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[05:55:54] ================= drm_test_rect_intersect =================
[05:55:54] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[05:55:54] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[05:55:54] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[05:55:54] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[05:55:54] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[05:55:54] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[05:55:54] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[05:55:54] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[05:55:54] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[05:55:54] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[05:55:54] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[05:55:54] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[05:55:54] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[05:55:54] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[05:55:54] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[05:55:54] ============= [PASSED] drm_test_rect_intersect =============
[05:55:54] ================ drm_test_rect_calc_hscale ================
[05:55:54] [PASSED] normal use
[05:55:54] [PASSED] out of max range
[05:55:54] [PASSED] out of min range
[05:55:54] [PASSED] zero dst
[05:55:54] [PASSED] negative src
[05:55:54] [PASSED] negative dst
[05:55:54] ============ [PASSED] drm_test_rect_calc_hscale ============
[05:55:54] ================ drm_test_rect_calc_vscale ================
[05:55:54] [PASSED] normal use
[05:55:54] [PASSED] out of max range
[05:55:54] [PASSED] out of min range
[05:55:54] [PASSED] zero dst
[05:55:54] [PASSED] negative src
[05:55:54] [PASSED] negative dst
[05:55:54] ============ [PASSED] drm_test_rect_calc_vscale ============
[05:55:54] ================== drm_test_rect_rotate ===================
[05:55:54] [PASSED] reflect-x
[05:55:54] [PASSED] reflect-y
[05:55:54] [PASSED] rotate-0
[05:55:54] [PASSED] rotate-90
[05:55:54] [PASSED] rotate-180
[05:55:54] [PASSED] rotate-270
[05:55:54] ============== [PASSED] drm_test_rect_rotate ===============
[05:55:54] ================ drm_test_rect_rotate_inv =================
[05:55:54] [PASSED] reflect-x
[05:55:54] [PASSED] reflect-y
[05:55:54] [PASSED] rotate-0
[05:55:54] [PASSED] rotate-90
[05:55:54] [PASSED] rotate-180
[05:55:54] [PASSED] rotate-270
[05:55:54] ============ [PASSED] drm_test_rect_rotate_inv =============
[05:55:54] ==================== [PASSED] drm_rect =====================
[05:55:54] ============ drm_sysfb_modeset_test (1 subtest) ============
[05:55:54] ============ drm_test_sysfb_build_fourcc_list =============
[05:55:54] [PASSED] no native formats
[05:55:54] [PASSED] XRGB8888 as native format
[05:55:54] [PASSED] remove duplicates
[05:55:54] [PASSED] convert alpha formats
[05:55:54] [PASSED] random formats
[05:55:54] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[05:55:54] ============= [PASSED] drm_sysfb_modeset_test ==============
[05:55:54] ================== drm_fixp (2 subtests) ===================
[05:55:54] [PASSED] drm_test_int2fixp
[05:55:54] [PASSED] drm_test_sm2fixp
[05:55:54] ==================== [PASSED] drm_fixp =====================
[05:55:54] ============================================================
[05:55:54] Testing complete. Ran 667 tests: passed: 667
[05:55:54] Elapsed time: 28.821s total, 2.581s configuring, 25.924s building, 0.301s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[05:55:54] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:55:56] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[05:56:06] Starting KUnit Kernel (1/1)...
[05:56:06] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:56:07] ================= ttm_device (5 subtests) ==================
[05:56:07] [PASSED] ttm_device_init_basic
[05:56:07] [PASSED] ttm_device_init_multiple
[05:56:07] [PASSED] ttm_device_fini_basic
[05:56:07] [PASSED] ttm_device_init_no_vma_man
[05:56:07] ================== ttm_device_init_pools ==================
[05:56:07] [PASSED] No DMA allocations, no DMA32 required
[05:56:07] [PASSED] DMA allocations, DMA32 required
[05:56:07] [PASSED] No DMA allocations, DMA32 required
[05:56:07] [PASSED] DMA allocations, no DMA32 required
[05:56:07] ============== [PASSED] ttm_device_init_pools ==============
[05:56:07] =================== [PASSED] ttm_device ====================
[05:56:07] ================== ttm_pool (8 subtests) ===================
[05:56:07] ================== ttm_pool_alloc_basic ===================
[05:56:07] [PASSED] One page
[05:56:07] [PASSED] More than one page
[05:56:07] [PASSED] Above the allocation limit
[05:56:07] [PASSED] One page, with coherent DMA mappings enabled
[05:56:07] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:56:07] ============== [PASSED] ttm_pool_alloc_basic ===============
[05:56:07] ============== ttm_pool_alloc_basic_dma_addr ==============
[05:56:07] [PASSED] One page
[05:56:07] [PASSED] More than one page
[05:56:07] [PASSED] Above the allocation limit
[05:56:07] [PASSED] One page, with coherent DMA mappings enabled
[05:56:07] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:56:07] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[05:56:07] [PASSED] ttm_pool_alloc_order_caching_match
[05:56:07] [PASSED] ttm_pool_alloc_caching_mismatch
[05:56:07] [PASSED] ttm_pool_alloc_order_mismatch
[05:56:07] [PASSED] ttm_pool_free_dma_alloc
[05:56:07] [PASSED] ttm_pool_free_no_dma_alloc
[05:56:07] [ERROR] Test: ttm_pool: missing expected subtest!
[05:56:07]
[05:56:07] Pid: 80, comm: kunit_try_catch Tainted: G W N 7.4.0-rc4-gd9cb1a6b53bb
[05:56:07] RIP: 0033:list_lru_count_node+0xe/0x20
[05:56:07] RSP: 00000000b18dbef8 EFLAGS: 00010246
[05:56:07] RAX: 0000000000000001 RBX: 00000000b1803c90 RCX: 0000000000000021
[05:56:07] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000071853030
[05:56:07] RBP: 0000000071853000 R08: 00000000b18dbe98 R09: 0000000000000000
[05:56:07] R10: 00000000b03e5a60 R11: 0000000000000000 R12: 0000000060121160
[05:56:07] R13: 0000000071853030 R14: 000000006046f0e0 R15: 00000000604ba488
[05:56:07] Kernel panic - not syncing: Segfault with no mm
[05:56:07] [CRASHED]
[05:56:07] [ERROR] Test: ttm_pool: missing subtest result line!
[05:56:07] # module: ttm_pool_test
[05:56:07] ==================== [CRASHED] ttm_pool ====================
[05:56:07] [ERROR] Test: main: missing expected subtest!
[05:56:07] [CRASHED]
[05:56:07] [ERROR] Test: main: missing expected subtest!
[05:56:07] [CRASHED]
[05:56:07] [ERROR] Test: main: missing expected subtest!
[05:56:07] [CRASHED]
[05:56:07] [ERROR] Test: main: missing expected subtest!
[05:56:07] [CRASHED]
[05:56:07] ============================================================
[05:56:07] Testing complete. Ran 28 tests: passed: 23, crashed: 5, errors: 6
The kernel seems to have crashed; you can decode the stack traces with:
$ scripts/decode_stacktrace.sh .kunit/vmlinux .kunit < .kunit/test.log | tee .kunit/decoded.log | /kernel/tools/testing/kunit/kunit.py parse
[05:56:07] Elapsed time: 12.929s total, 2.567s configuring, 10.046s building, 0.316s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 17+ messages in thread