Skip to content

Commit c2e52eb

Browse files
mbernatowiczmattrope
authored andcommitted
drm/xe/rtp: Add match helper to omit SR-IOV VF device
Add a match helper that allows the application of a workaround when the device is not an SR-IOV VF (Virtual Function) device. Signed-off-by: Marcin Bernatowicz <[email protected]> Cc: Adam Miszczak <[email protected]> Cc: Jakub Kolakowski <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: Lukasz Laguna <[email protected]> Cc: Matt Roper <[email protected]> Cc: Michal Wajdeczko <[email protected]> Cc: Michal Winiarski <[email protected]> Cc: Narasimha C V <[email protected]> Cc: Piotr Piorkowski <[email protected]> Cc: Satyanarayana K V P <[email protected]> Cc: Tomasz Lis <[email protected]> Reviewed-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Matt Roper <[email protected]>
1 parent 40fbc59 commit c2e52eb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/gpu/drm/xe/xe_rtp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,8 @@ bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
340340
return dss >= dss_per_gslice;
341341
}
342342

343+
bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
344+
const struct xe_hw_engine *hwe)
345+
{
346+
return !IS_SRIOV_VF(gt_to_xe(gt));
347+
}

drivers/gpu/drm/xe/xe_rtp.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,4 +476,15 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
476476
bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
477477
const struct xe_hw_engine *hwe);
478478

479+
/*
480+
* xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device
481+
*
482+
* @gt: GT structure
483+
* @hwe: Engine instance
484+
*
485+
* Returns: true if device is not VF, false otherwise.
486+
*/
487+
bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
488+
const struct xe_hw_engine *hwe);
489+
479490
#endif

0 commit comments

Comments
 (0)