drm/xe/vf: Don't enable hwmon if VF
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
This commit is contained in:
parent
3ed34c6552
commit
602f9ebf32
@ -17,6 +17,7 @@
|
|||||||
#include "xe_mmio.h"
|
#include "xe_mmio.h"
|
||||||
#include "xe_pcode.h"
|
#include "xe_pcode.h"
|
||||||
#include "xe_pcode_api.h"
|
#include "xe_pcode_api.h"
|
||||||
|
#include "xe_sriov.h"
|
||||||
|
|
||||||
enum xe_hwmon_reg {
|
enum xe_hwmon_reg {
|
||||||
REG_PKG_RAPL_LIMIT,
|
REG_PKG_RAPL_LIMIT,
|
||||||
@ -746,6 +747,10 @@ void xe_hwmon_register(struct xe_device *xe)
|
|||||||
if (!IS_DGFX(xe))
|
if (!IS_DGFX(xe))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* hwmon is not available on VFs */
|
||||||
|
if (IS_SRIOV_VF(xe))
|
||||||
|
return;
|
||||||
|
|
||||||
hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
|
hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
|
||||||
if (!hwmon)
|
if (!hwmon)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user