mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
drm/xe/hwmon: Enable energy attributes for CRI
Enable HWMON energy attributes for CRI, which are available through MMIO registers. Although these attributes can also be accessed via PMT, MMIO is preferred as it avoids dependency on ocode firmware load in late binding scenario. v2: Rephrase commit message. (Anshuman) Signed-off-by: Karthik Poosa <karthik.poosa@intel.com> Reviewed-by: Soham Purkait <soham.purkait@intel.com> Link: https://patch.msgid.link/20260417041456.818668-1-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
ffc2f7fd1c
commit
c973f7a672
|
|
@ -27,4 +27,7 @@
|
|||
#define TEMP_SIGN_MASK REG_BIT(31)
|
||||
#define BMG_PACKAGE_TEMPERATURE XE_REG(0x138434)
|
||||
|
||||
#define CRI_PACKAGE_ENERGY_STATUS XE_REG(0x138120)
|
||||
#define CRI_PLATFORM_ENERGY_STATUS XE_REG(0x138458)
|
||||
|
||||
#endif /* _XE_PCODE_REGS_H_ */
|
||||
|
|
|
|||
|
|
@ -303,7 +303,12 @@ static struct xe_reg xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg
|
|||
return GT_PERF_STATUS;
|
||||
break;
|
||||
case REG_PKG_ENERGY_STATUS:
|
||||
if (xe->info.platform == XE_PVC && channel == CHANNEL_PKG) {
|
||||
if (xe->info.platform == XE_CRESCENTISLAND) {
|
||||
if (channel == CHANNEL_CARD)
|
||||
return CRI_PLATFORM_ENERGY_STATUS;
|
||||
else if (channel == CHANNEL_PKG)
|
||||
return CRI_PACKAGE_ENERGY_STATUS;
|
||||
} else if (xe->info.platform == XE_PVC && channel == CHANNEL_PKG) {
|
||||
return PVC_GT0_PLATFORM_ENERGY_STATUS;
|
||||
} else if ((xe->info.platform == XE_DG2) && (channel == CHANNEL_PKG)) {
|
||||
return PCU_CR_PACKAGE_ENERGY_STATUS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user