[PATCH 2/2] drm/xe/vf: Don't apply Wa_22019338487 for VF

Matt Roper matthew.d.roper at intel.com
Mon Dec 9 16:47:02 UTC 2024


On Mon, Dec 09, 2024 at 10:44:42AM +0100, Bernatowicz, Marcin wrote:
> 
> 
> On 12/5/2024 10:04 PM, Matt Roper wrote:
> > On Thu, Dec 05, 2024 at 06:18:14PM +0000, Jakub Kolakowski wrote:
> > > Don't use Wa_22019338487 for VF.
> > 
> > Would it make sense to add some kind of "PFONLY" RTP action that can be
> > applied to workaround definitions that should only apply when running on
> > the PF and not on the VF?  Then we could just add that flag to this
> > workaround in xe_wa_oob.rules and we wouldn't need to change the
> > callsite(s) where XE_WA is invoked.
> > 
> > I'm not sure how common PF-only (or VF-only for that matter) workarounds
> > are going to be going forward.
> > 
> > 
> > Matt
> > 
> 
> As first step I would add something like NOT VF,
> that should better handle the case SR-IOV is disabled.
> 
> So adding a helper to xe_rtp.c:
> 
> bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
>                               const struct xe_hw_engine *hwe)
> {
>        return !IS_SRIOV_VF(gt_to_xe(gt));
> }
> 
> and updating rules:
> 
>  22019338487    MEDIA_VERSION(2000)
>                 GRAPHICS_VERSION(2001)
> -               MEDIA_VERSION(3000), MEDIA_STEP(A0, B0)
> +               MEDIA_VERSION(3000), MEDIA_STEP(A0, B0),
> FUNC(match_not_sriov_vf)
> 
> It looks the rules on each line are ORed, so here the generated output is:

The rules on a single line of the OOB rule file are AND'd together
(unless you insert the explicit "OR" rule).  But the separate lines are
OR'd.


Matt

> 
> { XE_RTP_NAME("22019338487"),
>   XE_RTP_RULES(MEDIA_VERSION(2000), OR,
>         GRAPHICS_VERSION(2001), OR,
>         MEDIA_VERSION(3000), MEDIA_STEP(A0, B0), FUNC(match_not_sriov_vf)) }
> 
> --
> marcin
> 
> > > 
> > > Signed-off-by: Jakub Kolakowski <jakub1.kolakowski at intel.com>
> > > Cc: Adam Miszczak <adam.miszczak at linux.intel.com>
> > > Cc: Jakub Kolakowski <jakub1.kolakowski at intel.com>
> > > Cc: Lukasz Laguna <lukasz.laguna at intel.com>
> > > Cc: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> > > Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> > > Cc: Michal Winiarski <michal.winiarski at intel.com>
> > > Cc: Narasimha C V <narasimha.c.v at intel.com>
> > > Cc: Piotr Piorkowski <piotr.piorkowski at intel.com>
> > > Cc: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
> > > Cc: Tomasz Lis <tomasz.lis at intel.com>
> > > Cc: Matt Roper <matthew.d.roper at intel.com>
> > > ---
> > >   drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> > > index 05154f9de1a6..11aba2437818 100644
> > > --- a/drivers/gpu/drm/xe/xe_ggtt.c
> > > +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> > > @@ -238,7 +238,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
> > >   	if (ggtt->size > GUC_GGTT_TOP)
> > >   		ggtt->size = GUC_GGTT_TOP;
> > > -	if (GRAPHICS_VERx100(xe) >= 1270)
> > > +	if (GRAPHICS_VERx100(xe) >= 1270 && !IS_SRIOV_VF(xe))
> > >   		ggtt->pt_ops = (ggtt->tile->media_gt &&
> > >   			       XE_WA(ggtt->tile->media_gt, 22019338487)) ||
> > >   			       XE_WA(ggtt->tile->primary_gt, 22019338487) ?
> > > -- 
> > > 2.25.1
> > > 
> > 
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list