summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_device_types.h
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2023-11-15 10:38:03 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:44:57 +0300
commit13e5c32c849ace3dd0af9049fc19ce910591db8b (patch)
tree66feac52f2636c7d9c63519db33eebb248ae5d9e /drivers/gpu/drm/xe/xe_device_types.h
parentd6d14854ddf362633fbcf050ce19bd0d7b0d9a3a (diff)
downloadlinux-13e5c32c849ace3dd0af9049fc19ce910591db8b.tar.xz
drm/xe: Prepare for running in different SR-IOV modes
We will be adding support for the SR-IOV and driver might be then running, in addition to existing non-virtualized bare-metal mode, also in Physical Function (PF) or Virtual Function (VF) mode. Since these additional modes require some changes to the driver, define enum flag to represent different SR-IOV modes and add a function where we will detect the actual mode in the runtime. We start with a forced bare-metal mode as it is sufficient to enable basic functionality and ensures no impact to existing code. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20231115073804.1861-2-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_device_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_device_types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index f2ba4f746fa2..2712905c7a91 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -18,6 +18,7 @@
#include "xe_platform_types.h"
#include "xe_pt_types.h"
#include "xe_pmu.h"
+#include "xe_sriov_types.h"
#include "xe_step_types.h"
#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
@@ -299,6 +300,12 @@ struct xe_device {
struct ttm_resource_manager sys_mgr;
} mem;
+ /** @sriov: device level virtualization data */
+ struct {
+ /** @sriov.__mode: SR-IOV mode (Don't access directly!) */
+ enum xe_sriov_mode __mode;
+ } sriov;
+
/** @usm: unified memory state */
struct {
/** @asid: convert a ASID to VM */