From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Piorkowski, Piotr" <piotr.piorkowski@intel.com>
Subject: Re: [PATCH] drm/xe/pf: Fix VF config validation on multi-GT platforms
Date: Tue, 6 Aug 2024 21:20:09 +0200 [thread overview]
Message-ID: <359e6a57-3723-4f84-8c03-17aa5297f896@intel.com> (raw)
In-Reply-To: <CH0PR11MB5444D43F49E815158EA5B1C3E5BF2@CH0PR11MB5444.namprd11.prod.outlook.com>
On 06.08.2024 21:06, Cavitt, Jonathan wrote:
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Michal Wajdeczko
> Sent: Tuesday, August 6, 2024 11:05 AM
> To: intel-xe@lists.freedesktop.org
> Cc: Wajdeczko, Michal <Michal.Wajdeczko@intel.com>; Piorkowski, Piotr <piotr.piorkowski@intel.com>
> Subject: [PATCH] drm/xe/pf: Fix VF config validation on multi-GT platforms
>>
>> When validating VF config on the media GT, we may wrongly report
>> that VF is already partially configured on it, as we consider GGTT
>> and LMEM provisioning done on the primary GT (since both GGTT and
>> LMEM are tile-level resources, not a GT-level).
>>
>> This will cause skipping a VF auto-provisioning on the media-GT and
>> in result will block a VF from successfully initialize that GT.
>>
>> Fix that by considering GGTT and LMEM configurations only when
>> checking if a VF provisioning is complete, and omit GGTT and LMEM
>> when reporting empty/partial provisioning.
>>
>> Fixes: 234670cea9a2 ("drm/xe/pf: Skip fair VFs provisioning if already provisioned")
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> 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 52c7277d243d..227527785afd 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
>> @@ -1928,6 +1928,7 @@ static int pf_validate_vf_config(struct xe_gt *gt, unsigned int vfid)
>> {
>> struct xe_gt *primary_gt = gt_to_tile(gt)->primary_gt;
>> struct xe_device *xe = gt_to_xe(gt);
>> + bool is_primary = !xe_gt_is_media_type(gt);
>> bool valid_ggtt, valid_ctxs, valid_dbs;
>> bool valid_any, valid_all;
>>
>> @@ -1936,13 +1937,17 @@ static int pf_validate_vf_config(struct xe_gt *gt, unsigned int vfid)
>> valid_dbs = pf_get_vf_config_dbs(gt, vfid);
>>
>> /* note that GuC doorbells are optional */
>> - valid_any = valid_ggtt || valid_ctxs || valid_dbs;
>> - valid_all = valid_ggtt && valid_ctxs;
>> + valid_any = valid_ctxs || valid_dbs;
>> + valid_all = valid_ctxs;
>> +
>> + /* and GGTT/LMEM is configured on primary GT only */
>> + valid_all = valid_all && valid_ggtt;
>> + valid_any = valid_any || (valid_ggtt && is_primary);
>
> I can see why you would want to keep the ggtt configuration separate from
> the rest of the config, though it might be cleaner to just keep it all collected
> together like it was before.
it's still collected together as it was, just final flags are calculated
separately ;)
> Not blocking on this, though:
> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
thanks!
> -Jonathan Cavitt
>
>>
>> if (IS_DGFX(xe)) {
>> bool valid_lmem = pf_get_vf_config_ggtt(primary_gt, vfid);
>>
>> - valid_any = valid_any || valid_lmem;
>> + valid_any = valid_any || (valid_lmem && is_primary);
>> valid_all = valid_all && valid_lmem;
>> }
>>
>> --
>> 2.43.0
>>
>>
next prev parent reply other threads:[~2024-08-06 19:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 18:05 [PATCH] drm/xe/pf: Fix VF config validation on multi-GT platforms Michal Wajdeczko
2024-08-06 18:10 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-06 18:11 ` ✓ CI.checkpatch: " Patchwork
2024-08-06 18:12 ` ✓ CI.KUnit: " Patchwork
2024-08-06 18:28 ` ✓ CI.Build: " Patchwork
2024-08-06 18:32 ` ✓ CI.Hooks: " Patchwork
2024-08-06 18:34 ` ✓ CI.checksparse: " Patchwork
2024-08-06 18:53 ` ✓ CI.BAT: " Patchwork
2024-08-06 19:06 ` [PATCH] " Cavitt, Jonathan
2024-08-06 19:20 ` Michal Wajdeczko [this message]
2024-08-06 21:35 ` ✗ CI.FULL: failure for " Patchwork
2024-08-09 8:37 ` Michal Wajdeczko
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=359e6a57-3723-4f84-8c03-17aa5297f896@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--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