summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-20 13:01:47 +0300
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-20 20:49:34 +0300
commit65336c3fa2cf7f272067be9193303d1ab7c42190 (patch)
tree754cfd327b1ae20f32db8ffa7139b510288b8725
parentd35386b3a77bb26d771c7d7c59dab8a920ab62ee (diff)
downloadlinux-65336c3fa2cf7f272067be9193303d1ab7c42190.tar.xz
drm/xe/vf: Disable features that do not apply to VFs
We already maintain several flags that control the availability of features on a given device. Disable features, like PCODE or GuC PC or GSC, that do not apply to a VF device. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240620100147.949-1-michal.wajdeczko@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_device.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 31b549f5f03a..e25c37ac7d14 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -486,6 +486,17 @@ static int wait_for_lmem_ready(struct xe_device *xe)
return 0;
}
+static void update_device_info(struct xe_device *xe)
+{
+ /* disable features that are not available/applicable to VFs */
+ if (IS_SRIOV_VF(xe)) {
+ xe->info.enable_display = 0;
+ xe->info.has_heci_gscfi = 0;
+ xe->info.skip_guc_pc = 1;
+ xe->info.skip_pcode = 1;
+ }
+}
+
/**
* xe_device_probe_early: Device early probe
* @xe: xe device instance
@@ -506,6 +517,8 @@ int xe_device_probe_early(struct xe_device *xe)
xe_sriov_probe_early(xe);
+ update_device_info(xe);
+
err = xe_pcode_probe_early(xe);
if (err)
return err;