[PATCH 6/8] drm/xe/vf: Don't enable hwmon if VF
Michal Wajdeczko
michal.wajdeczko at intel.com
Fri Jan 12 15:26:47 UTC 2024
Registers used by hwmon are not available for VF drivers.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Badal Nilawar <badal.nilawar at intel.com>
---
drivers/gpu/drm/xe/xe_hwmon.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c
index 6ef2aa1eae8b..9848bf84b58b 100644
--- a/drivers/gpu/drm/xe/xe_hwmon.c
+++ b/drivers/gpu/drm/xe/xe_hwmon.c
@@ -16,6 +16,7 @@
#include "xe_mmio.h"
#include "xe_pcode.h"
#include "xe_pcode_api.h"
+#include "xe_sriov.h"
enum xe_hwmon_reg {
REG_PKG_RAPL_LIMIT,
@@ -745,6 +746,10 @@ void xe_hwmon_register(struct xe_device *xe)
if (!IS_DGFX(xe))
return;
+ /* hwmon is not available on VFs */
+ if (IS_SRIOV_VF(xe))
+ return;
+
hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
if (!hwmon)
return;
--
2.25.1
More information about the Intel-xe
mailing list