Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <marcin.bernatowicz@linux.intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241211064211.781820-3-marcin.bernatowicz@linux.intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

authored by

Marcin Bernatowicz and committed by
Matt Roper
c2e52eb7 40fbc59e

+16
+5
drivers/gpu/drm/xe/xe_rtp.c
··· 340 340 return dss >= dss_per_gslice; 341 341 } 342 342 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 + }
+11
drivers/gpu/drm/xe/xe_rtp.h
··· 476 476 bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt, 477 477 const struct xe_hw_engine *hwe); 478 478 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 + 479 490 #endif