Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v1 3/4] drm/xe/pf: Allow to configure preemption timeout for range of VFs
Date: Thu, 3 Dec 2026 10:15:41 +0100	[thread overview]
Message-ID: <552fa4ad-df09-459b-9633-cfe3d839b616@linux.intel.com> (raw)
In-Reply-To: <a621aa11-b778-466d-a416-1939702992c8@linux.intel.com>


On 12/3/2026 9:19 AM, Bernatowicz, Marcin wrote:
>
> On 12/1/2026 5:22 PM, Piórkowski, Piotr wrote:
>> From: Piotr Piórkowski <piotr.piorkowski@intel.com>
>>
>> We already have a helper to configure preemption timeout for the PF
>> and all VFs at once. Add a variant that configures only the given
>> range of VFs, as we will need it to provision VFs using the VGPU
>> profile, where only VFs defined by the profile shall be provisioned.
>>
>> Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 23 ++++++++++++++++++++++
>>   drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h |  3 +++
>>   2 files changed, 26 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c 
>> b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
>> index d84b5279d7ea2..74e1f91a40bee 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
>> @@ -2537,6 +2537,29 @@ int 
>> xe_gt_sriov_pf_config_bulk_set_preempt_timeout_locked(struct xe_gt 
>> *gt, u32
>>       return pf_bulk_set_preempt_timeout(gt, preempt_timeout, PFID, 1 
>> + totalvfs);
>>   }
>>   +/**
>> + * xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked() - 
>> Configure PT for many VFs.
>> + * @gt: the &xe_gt to configure
>> + * @vfid: starting VF identifier (can't be 0)
>> + * @num_vfs: number of VFs to provision
>> + * @preempt_timeout: requested preemption timeout in microseconds (0 
>> is infinity)
>> + *
>> + * This function can only be called on PF with the master mutex held.
>> + *
>> + * Return: 0 on success or a negative error code on failure.
>> + */
>> +int xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked(struct 
>> xe_gt *gt, unsigned int vfid,
>> +                                  unsigned int num_vfs,
>> +                                  u32 preempt_timeout)
>> +{
>> +    xe_gt_assert(gt, vfid);
>> +
>> +    if (!num_vfs)
>> +        return 0;
>> +
>> +    return pf_bulk_set_preempt_timeout(gt, preempt_timeout, vfid, 
>> num_vfs);
>> +}
>> +
>>   static int pf_provision_groups_preempt_timeouts(struct xe_gt *gt, 
>> unsigned int vfid,
>>                           const u32 *preempt_timeouts, u32 count)
>>   {
>> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h 
>> b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h
>> index 3927b5f4d46c4..1e9d8c65531bb 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h
>> @@ -74,6 +74,9 @@ u32 
>> xe_gt_sriov_pf_config_get_preempt_timeout_locked(struct xe_gt *gt, 
>> unsigned
>>   int xe_gt_sriov_pf_config_set_preempt_timeout_locked(struct xe_gt 
>> *gt, unsigned int vfid,
>>                                u32 preempt_timeout);
>>   int xe_gt_sriov_pf_config_bulk_set_preempt_timeout_locked(struct 
>> xe_gt *gt, u32 preempt_timeout);
>> +int xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked(struct 
>> xe_gt *gt, unsigned int vfid,
>> +                                  unsigned int num_vfs,
>> +                                  u32 preempt_timeout);
> Could you include at least one patch that uses this new helper function?
>>     void xe_gt_sriov_pf_config_get_groups_preempt_timeouts(struct 
>> xe_gt *gt, unsigned int vfid,
>>                                  u32 *preempt_timeout, u32 max_count);

>>
LGTM,

Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>


  reply	other threads:[~2026-12-03  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 16:22 [PATCH v1 0/4] Add helpers for VGPU profiles provisioning Piórkowski, Piotr
2026-12-01 16:22 ` [PATCH v1 1/4] drm/xe/pf: Share SR-IOV config unit helpers Piórkowski, Piotr
2026-12-02 17:10   ` Bernatowicz, Marcin
2026-12-01 16:22 ` [PATCH v1 2/4] drm/xe/pf: Allow to configure execution quantum for range of VFs Piórkowski, Piotr
2026-12-03  8:18   ` Bernatowicz, Marcin
2026-12-03  9:16     ` Bernatowicz, Marcin
2026-12-01 16:22 ` [PATCH v1 3/4] drm/xe/pf: Allow to configure preemption timeout " Piórkowski, Piotr
2026-12-03  8:19   ` Bernatowicz, Marcin
2026-12-03  9:15     ` Bernatowicz, Marcin [this message]
2026-12-01 16:22 ` [PATCH v1 4/4] drm/xe/pf: Extract helper to reset VFs provisioning Piórkowski, Piotr
2026-12-02 17:10   ` Bernatowicz, Marcin
2026-12-01 16:50 ` ✓ CI.KUnit: success for Add helpers for VGPU profiles provisioning Patchwork
2026-12-01 17:28 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-12-02 10:59 ` ✓ Xe.CI.FULL: success " 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=552fa4ad-df09-459b-9633-cfe3d839b616@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=piotr.piorkowski@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