]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/hwmon: Expose temperature limits
authorKarthik Poosa <karthik.poosa@intel.com>
Mon, 12 Jan 2026 20:35:18 +0000 (02:05 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 12 Jan 2026 22:00:29 +0000 (17:00 -0500)
commitc332fba805d659eca1f8e3a41d259c03421e81f1
tree510e42afa3edc60615e8d9d57654a7f245ba3ddd
parentb1dcec9bd8a1de5fe04ecb3831f8db0a5c059970
drm/xe/hwmon: Expose temperature limits

Read temperature limits using pcode mailbox and expose shutdown
temperature limit as tempX_emergency, critical temperature limit as
tempX_crit and GPU max temperature limit as temp2_max.

Update Xe hwmon documentation with above entries.

v2:
 - Resolve a documentation warning.
 - Address below review comments from Raag.
 - Update date and kernel version in Xe hwmon documentation.
 - Remove explicit disable of has_mbx_thermal_info for unsupported
   platforms.
 - Remove unnecessary default case in switches.
 - Remove obvious comments.
 - Use TEMP_LIMIT_MAX to compute number of dwords needed in
   xe_hwmon_thermal_info.
 - Remove THERMAL_LIMITS_DWORDS macro.
 - Use has_mbx_thermal_info for checking thermal mailbox support.

v3:
 - Address below minor comments. (Raag)
 - Group new temperature attributes with existing temperature attributes
   as per channel index in Xe hwmon documentation.
 - Rename enums of xe_temp_limit to improve clarity.
 - Use DIV_ROUND_UP to calculate dwords needed for temperature limits.
 - Use return instead of breaks in xe_hwmon_temp_read.
 - Minor aesthetic refinements.

v4:
 - Remove a redundant break. (Raag)
 - Update drm_dbg to drm_warn to inform user of unavailability for
   thermal mailbox on expected platforms.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://patch.msgid.link/20260112203521.1014388-2-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_hwmon.c
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_pci_types.h
drivers/gpu/drm/xe/xe_pcode_api.h