Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Tomasz Lis <tomasz.lis@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: "Michał Winiarski" <michal.winiarski@intel.com>,
	"Piotr Piórkowski" <piotr.piorkowski@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>
Subject: Re: [PATCH v5 1/5] drm/xe/vf: Helper for telling whether CCS migration BBs are needed
Date: Tue, 21 Oct 2025 16:29:55 +0200	[thread overview]
Message-ID: <d8c5e195-84ca-4326-b0c1-a5c583314ac9@intel.com> (raw)
In-Reply-To: <20251021123943.1436375-2-tomasz.lis@intel.com>

this patch seems to be in large part reverted by patch 3/5

please squash it

On 10/21/2025 2:39 PM, Tomasz Lis wrote:
> To avoid having duplicated checks, and also provide clear
> documentation of what are we checking for, the conditions
> for initing CCS BBs for VF migration are closed into a function.
> 
> v2: shuffled words in the name
> 
> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_sriov_vf_ccs.c | 17 ++++++++++++++++-
>  drivers/gpu/drm/xe/xe_sriov_vf_ccs.h |  2 ++
>  2 files changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> index 790249801364..a2d61b37ff21 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
> @@ -260,6 +260,21 @@ int xe_sriov_vf_ccs_register_context(struct xe_device *xe)
>  	return err;
>  }
>  
> +/**
> + * xe_sriov_vf_migration_ccs_bb_needed - Whether GuC requires CCS copy BBs for VF migration.
> + * @xe: the &xe_device instance.
> + *
> + * Only selected platforms require VF KMD to maintain CCS copy BBs and linked LRCAs.
> + *
> + * Return: true if VF driver must participate in the CCS migration, false otherwise.
> + */
> +bool xe_sriov_vf_migration_ccs_bb_needed(struct xe_device *xe)
> +{
> +	xe_assert(xe, IS_SRIOV_VF(xe));
> +
> +	return !IS_DGFX(xe) && xe_device_has_flat_ccs(xe);
> +}
> +
>  static void xe_sriov_vf_ccs_fini(void *arg)
>  {
>  	struct xe_sriov_vf_ccs_ctx *ctx = arg;
> @@ -294,7 +309,7 @@ int xe_sriov_vf_ccs_init(struct xe_device *xe)
>  	xe_assert(xe, IS_SRIOV_VF(xe));
>  	xe_assert(xe, xe_sriov_vf_migration_supported(xe));
>  
> -	if (IS_DGFX(xe) || !xe_device_has_flat_ccs(xe))
> +	if (!xe_sriov_vf_migration_ccs_bb_needed(xe))
>  		return 0;
>  
>  	for_each_ccs_rw_ctx(ctx_id) {
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.h b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.h
> index f8ca6efce9ee..0e6b27016dac 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.h
> @@ -14,6 +14,8 @@ struct drm_printer;
>  struct xe_device;
>  struct xe_bo;
>  
> +bool xe_sriov_vf_migration_ccs_bb_needed(struct xe_device *xe);
> +
>  int xe_sriov_vf_ccs_init(struct xe_device *xe);
>  int xe_sriov_vf_ccs_attach_bo(struct xe_bo *bo);
>  int xe_sriov_vf_ccs_detach_bo(struct xe_bo *bo);


  reply	other threads:[~2025-10-21 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 12:39 [PATCH v5 0/5] drm/xe/vf: Minor fixes to post-migration recovery Tomasz Lis
2025-10-21 12:39 ` [PATCH v5 1/5] drm/xe/vf: Helper for telling whether CCS migration BBs are needed Tomasz Lis
2025-10-21 14:29   ` Michal Wajdeczko [this message]
2025-10-21 12:39 ` [PATCH v5 2/5] drm/xe/vf: Revert logic of vf.migration.enabled Tomasz Lis
2025-10-21 14:32   ` Michal Wajdeczko
2025-10-21 12:39 ` [PATCH v5 3/5] drm/xe/vf: Fix GuC FW check for VF migration support Tomasz Lis
2025-10-21 14:42   ` Michal Wajdeczko
2025-10-21 12:39 ` [PATCH v5 4/5] drm/xe: Assert that VF will never use fixed placement of BOs Tomasz Lis
2025-10-21 12:39 ` [PATCH v5 5/5] drm/xe/vf: Do not disable VF migration on ATS-M Tomasz Lis
2025-10-21 13:56 ` ✓ CI.KUnit: success for drm/xe/vf: Minor fixes to post-migration recovery (rev5) Patchwork
2025-10-21 15:03 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-21 16:33 ` ✗ 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=d8c5e195-84ca-4326-b0c1-a5c583314ac9@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=piotr.piorkowski@intel.com \
    --cc=satyanarayana.k.v.p@intel.com \
    --cc=tomasz.lis@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