Skip to content

Commit

Permalink
drm/xe/vf: Don't enable hwmon if VF
Browse files Browse the repository at this point in the history
Registers used by hwmon are not available for VF drivers.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240213154355.1221-7-michal.wajdeczko@intel.com
  • Loading branch information
Michal Wajdeczko committed Feb 13, 2024
1 parent 3ed34c6 commit 602f9eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/xe/xe_hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 602f9eb

Please sign in to comment.