]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/gt_throttle: Always read and mask
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 29 Oct 2025 23:45:05 +0000 (16:45 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 31 Oct 2025 06:20:25 +0000 (23:20 -0700)
commit61e983e788bbe83f085890dd1bb4f2c9aed1e174
tree33917d2ba128683b1b3b99cd17f75d858bee7819
parentf90556a41fe5f4aa3d573451f7cb3e4471a3fd6d
drm/xe/gt_throttle: Always read and mask

Use a single function to read and mask the value the callers will be
interested in. This reduces the risk of a caller using a plain call to
xe_gt_throttle_get_limit_reasons() without applying any mask, which can
return unexpected bits for future platforms.

Select which reg and mask it's going to be used according to the
platform and gt type and always use that one function.

There was an odd xe_gt_dbg() when reading the status, which is not done
for any other throttle/* sysfs file, so just make the status be as
special as everybody else.

Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://patch.msgid.link/20251029-gt-throttle-cri-v3-3-d1f5abbb8114@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_gt_throttle.c