Commit 602f9ebf authored by Michal Wajdeczko's avatar Michal Wajdeczko
Browse files

drm/xe/vf: Don't enable hwmon if VF



Registers used by hwmon are not available for VF drivers.

Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: default avatarBadal Nilawar <badal.nilawar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240213154355.1221-7-michal.wajdeczko@intel.com
parent 3ed34c65
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,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,
@@ -746,6 +747,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;