drm/xe: Prepare for running in different SR-IOV modes
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 15 Nov 2023 07:38:03 +0000 (08:38 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:44:57 +0000 (11:44 -0500)
commit13e5c32c849ace3dd0af9049fc19ce910591db8b
tree66feac52f2636c7d9c63519db33eebb248ae5d9e
parentd6d14854ddf362633fbcf050ce19bd0d7b0d9a3a
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>
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_sriov.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_sriov.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_sriov_types.h [new file with mode: 0644]