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

Bernatowicz, Marcin marcin.bernatowicz at linux.intel.com
Mon Dec 9 09:44:42 UTC 2024



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:

{ 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
>>
> 



More information about the Intel-xe mailing list