From: Marcin Bernatowicz Date: Wed, 11 Dec 2024 06:42:10 +0000 (+0100) Subject: drm/xe/rtp: Add match helper to omit SR-IOV VF device X-Git-Tag: v6.14-rc1~174^2~3^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2e52eb73d9914d8e1bebfe98a9e1991d63c12d0;p=thirdparty%2Flinux.git 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 Cc: Adam Miszczak Cc: Jakub Kolakowski Cc: Lucas De Marchi Cc: Lukasz Laguna Cc: Matt Roper Cc: Michal Wajdeczko Cc: Michal Winiarski Cc: Narasimha C V Cc: Piotr Piorkowski Cc: Satyanarayana K V P Cc: Tomasz Lis Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20241211064211.781820-3-marcin.bernatowicz@linux.intel.com Signed-off-by: Matt Roper --- diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c index b13d4d62f0b1e..7a1c78fdfc92e 100644 --- a/drivers/gpu/drm/xe/xe_rtp.c +++ b/drivers/gpu/drm/xe/xe_rtp.c @@ -340,3 +340,8 @@ bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt, return dss >= dss_per_gslice; } +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)); +} diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h index 827d932b69087..7dea10d732d7c 100644 --- a/drivers/gpu/drm/xe/xe_rtp.h +++ b/drivers/gpu/drm/xe/xe_rtp.h @@ -476,4 +476,15 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt, bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt, const struct xe_hw_engine *hwe); +/* + * xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device + * + * @gt: GT structure + * @hwe: Engine instance + * + * Returns: true if device is not VF, false otherwise. + */ +bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt, + const struct xe_hw_engine *hwe); + #endif