public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v9 2/3] drm/xe/pf: Derive admin-only PF mode from xe_device state
Date: Tue, 7 Apr 2026 12:32:11 +0200	[thread overview]
Message-ID: <f0898b3e-71f8-4cc0-9662-cd3266df8e72@intel.com> (raw)
In-Reply-To: <20260406114515.1043145-7-satyanarayana.k.v.p@intel.com>



On 4/6/2026 1:45 PM, Satyanarayana K V P wrote:
> Stop tracking admin-only PF mode in a separate `xe->sriov.pf.admin_only`
> field and use `xe_device_is_admin_only(xe)` as the single source of

nit: "... and use recently added xe_device_is_admin_only() as ..."

> admin mode.
> 
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

> 
> ---
> V8 -> V9:
> - New commit.
> ---
>  drivers/gpu/drm/xe/xe_sriov_pf.c         | 6 ------
>  drivers/gpu/drm/xe/xe_sriov_pf_helpers.h | 3 ++-
>  drivers/gpu/drm/xe/xe_sriov_pf_types.h   | 3 ---
>  3 files changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sriov_pf.c b/drivers/gpu/drm/xe/xe_sriov_pf.c
> index 47a6e0fd66e0..33bd754d138f 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_pf.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_pf.c
> @@ -20,11 +20,6 @@
>  #include "xe_sriov_pf_sysfs.h"
>  #include "xe_sriov_printk.h"
>  
> -static bool wanted_admin_only(struct xe_device *xe)
> -{
> -	return xe_configfs_admin_only_pf(to_pci_dev(xe->drm.dev));
> -}
> -
>  static unsigned int wanted_max_vfs(struct xe_device *xe)
>  {
>  	return xe_configfs_get_max_vfs(to_pci_dev(xe->drm.dev));
> @@ -79,7 +74,6 @@ bool xe_sriov_pf_readiness(struct xe_device *xe)
>  
>  	pf_reduce_totalvfs(xe, newlimit);
>  
> -	xe->sriov.pf.admin_only = wanted_admin_only(xe);
>  	xe->sriov.pf.device_total_vfs = totalvfs;
>  	xe->sriov.pf.driver_max_vfs = newlimit;
>  
> diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_helpers.h b/drivers/gpu/drm/xe/xe_sriov_pf_helpers.h
> index 0fcc6cec4afc..19f6f8331c8d 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_pf_helpers.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_pf_helpers.h
> @@ -7,6 +7,7 @@
>  #define _XE_SRIOV_PF_HELPERS_H_
>  
>  #include "xe_assert.h"
> +#include "xe_device.h"
>  #include "xe_device_types.h"
>  #include "xe_sriov.h"
>  #include "xe_sriov_types.h"
> @@ -57,7 +58,7 @@ static inline unsigned int xe_sriov_pf_num_vfs(const struct xe_device *xe)
>  static inline bool xe_sriov_pf_admin_only(const struct xe_device *xe)
>  {
>  	xe_assert(xe, IS_SRIOV_PF(xe));
> -	return xe->sriov.pf.admin_only;
> +	return xe_device_is_admin_only(xe);
>  }
>  
>  static inline struct mutex *xe_sriov_pf_master_mutex(struct xe_device *xe)
> diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_types.h b/drivers/gpu/drm/xe/xe_sriov_pf_types.h
> index 080cf10512f4..b0253e1ae5da 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_pf_types.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_pf_types.h
> @@ -36,9 +36,6 @@ struct xe_sriov_metadata {
>   * @XE_SRIOV_MODE_PF mode.
>   */
>  struct xe_device_pf {
> -	/** @admin_only: PF functionality focused on VFs management only. */
> -	bool admin_only;
> -
>  	/** @device_total_vfs: Maximum number of VFs supported by the device. */
>  	u16 device_total_vfs;
>  


  reply	other threads:[~2026-04-07 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06 11:45 [PATCH v9 0/3] Do not create drm device for PF only admin mode Satyanarayana K V P
2026-04-06 11:45 ` [PATCH v9 1/3] drm/xe/pf: Restrict device query responses in admin-only PF mode Satyanarayana K V P
2026-04-07 10:28   ` Michal Wajdeczko
2026-04-06 11:45 ` [PATCH v9 2/3] drm/xe/pf: Derive admin-only PF mode from xe_device state Satyanarayana K V P
2026-04-07 10:32   ` Michal Wajdeczko [this message]
2026-04-06 11:45 ` [PATCH v9 3/3] drm/xe/tests: Fix pf_set_admin_mode() after sriov.pf.admin_only removal Satyanarayana K V P
2026-04-07 10:58   ` Michal Wajdeczko
2026-04-06 11:52 ` ✓ CI.KUnit: success for Do not create drm device for PF only admin mode (rev8) Patchwork
2026-04-06 12:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-06 14:38 ` ✗ Xe.CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0898b3e-71f8-4cc0-9662-cd3266df8e72@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=satyanarayana.k.v.p@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox