[PATCH 2/2] drm/xe: Enable SR-IOV for ADL/ATSM

Cavitt, Jonathan jonathan.cavitt at intel.com
Thu Jul 11 20:26:58 UTC 2024


-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Michal Wajdeczko
Sent: Thursday, July 11, 2024 12:23 PM
To: intel-xe at lists.freedesktop.org
Cc: Wajdeczko, Michal <Michal.Wajdeczko at intel.com>; Vivi, Rodrigo <rodrigo.vivi at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>; Thomas Hellstrom <thomas.hellstrom at linux.intel.com>
Subject: [PATCH 2/2] drm/xe: Enable SR-IOV for ADL/ATSM
> 
> We should now have sufficient changes in the Xe driver changes to
> run it on ADL and ATSM platforms in the PF mode, to configure VFs
> and successfully probe driver on the enabled VF devices.
> 
> While some more changes are likely still needed to fix all corner
> cases, we will not find them without running any tests. To start
> testing this feature by the CI, we need to mark which platforms
> have basic SR-IOV support and let the driver run in the PF mode.
> 
> Since this feature support is still in the early testing stage,
> make all enabling available only for CONFIG_DRM_XE_DEBUG=y and
> keep it on CI topic branch.
> 
> Note that from this point, on selected platforms, the Xe driver
> will be acting as a PF driver, will some SR-IOV specific changes
> compared to running in the non-virtualized (native) mode.
> 
> However, those specific changes are visible mostly on the debugfs,
> and should not impact normal driver execution, unless VFs will be
> manually provisioned or explicitly enabled.
> 
> Once we finish adding the remaining SR-IOV tests to the CI and fix
> any issues that we find in the meantime, we will replace this patch
> with proper series outside the topic branch.
> 
> Suggested-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Acked-by: Lucas De Marchi <lucas.demarchi at intel.com>
> Acked-by: Thomas Hellstrom <thomas.hellstrom at linux.intel.com>
> Link: https://patchwork.freedesktop.org/patch/600604/?series=135296&rev=1

LGTM.  Congratulations to everyone for getting SR-IOV support
ready for ADL/ATSM!
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt
> ---
> This patch is for drm-xe/topic/xe-for-CI
> ---
>  drivers/gpu/drm/xe/xe_module.c | 3 +++
>  drivers/gpu/drm/xe/xe_pci.c    | 4 ++++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
> index 499540add465..7bb99e451fcc 100644
> --- a/drivers/gpu/drm/xe/xe_module.c
> +++ b/drivers/gpu/drm/xe/xe_module.c
> @@ -18,6 +18,9 @@ struct xe_modparam xe_modparam = {
>  	.enable_display = true,
>  	.guc_log_level = 5,
>  	.force_probe = CONFIG_DRM_XE_FORCE_PROBE,
> +#ifdef CONFIG_PCI_IOV
> +	.max_vfs = IS_ENABLED(CONFIG_DRM_XE_DEBUG) ? ~0 : 0,
> +#endif
>  	.wedged_mode = 1,
>  	/* the rest are 0 by default */
>  };
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 53b67f39c7d5..7326a33030d4 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -241,6 +241,7 @@ static const struct xe_device_desc adl_s_desc = {
>  	PLATFORM(ALDERLAKE_S),
>  	.has_display = true,
>  	.has_llc = true,
> +	.has_sriov = IS_ENABLED(CONFIG_DRM_XE_DEBUG),
>  	.require_force_probe = true,
>  	.subplatforms = (const struct xe_subplatform_desc[]) {
>  		{ XE_SUBPLATFORM_ALDERLAKE_S_RPLS, "RPLS", adls_rpls_ids },
> @@ -256,6 +257,7 @@ static const struct xe_device_desc adl_p_desc = {
>  	PLATFORM(ALDERLAKE_P),
>  	.has_display = true,
>  	.has_llc = true,
> +	.has_sriov = IS_ENABLED(CONFIG_DRM_XE_DEBUG),
>  	.require_force_probe = true,
>  	.subplatforms = (const struct xe_subplatform_desc[]) {
>  		{ XE_SUBPLATFORM_ALDERLAKE_P_RPLU, "RPLU", adlp_rplu_ids },
> @@ -269,6 +271,7 @@ static const struct xe_device_desc adl_n_desc = {
>  	PLATFORM(ALDERLAKE_N),
>  	.has_display = true,
>  	.has_llc = true,
> +	.has_sriov = IS_ENABLED(CONFIG_DRM_XE_DEBUG),
>  	.require_force_probe = true,
>  };
>  
> @@ -307,6 +310,7 @@ static const struct xe_device_desc ats_m_desc = {
>  
>  	DG2_FEATURES,
>  	.has_display = false,
> +	.has_sriov = IS_ENABLED(CONFIG_DRM_XE_DEBUG),
>  };
>  
>  static const struct xe_device_desc dg2_desc = {
> -- 
> 2.43.0
> 
> 


More information about the Intel-xe mailing list