Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/hwmon: Drop redundant runtime PM usage

The device is expected to be in D0 state during driver probe. No need to
resume it in ->is_visible() callbacks.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250918114804.2957177-2-raag.jadav@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

authored by

Raag Jadav and committed by
Lucas De Marchi
5a856e27 20f3b28e

-8
-8
drivers/gpu/drm/xe/xe_hwmon.c
··· 658 658 struct xe_reg rapl_limit; 659 659 struct xe_mmio *mmio = xe_root_tile_mmio(hwmon->xe); 660 660 661 - xe_pm_runtime_get(hwmon->xe); 662 - 663 661 if (hwmon->xe->info.has_mbx_power_limits) { 664 662 xe_hwmon_pcode_read_power_limit(hwmon, power_attr, channel, &uval); 665 663 } else if (power_attr != PL2_HWMON_ATTR) { ··· 666 668 uval = xe_mmio_read32(mmio, rapl_limit); 667 669 } 668 670 ret = (uval & PWR_LIM_EN) ? attr->mode : 0; 669 - 670 - xe_pm_runtime_put(hwmon->xe); 671 671 672 672 return ret; 673 673 } ··· 1092 1096 struct xe_hwmon *hwmon = (struct xe_hwmon *)drvdata; 1093 1097 int ret; 1094 1098 1095 - xe_pm_runtime_get(hwmon->xe); 1096 - 1097 1099 switch (type) { 1098 1100 case hwmon_temp: 1099 1101 ret = xe_hwmon_temp_is_visible(hwmon, attr, channel); ··· 1115 1121 ret = 0; 1116 1122 break; 1117 1123 } 1118 - 1119 - xe_pm_runtime_put(hwmon->xe); 1120 1124 1121 1125 return ret; 1122 1126 }