]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/xe/rtp: Add match for psmi
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 21 Aug 2025 16:17:58 +0000 (09:17 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 22 Aug 2025 18:46:43 +0000 (11:46 -0700)
Add match to be used on WAs for only enabling workarounds if psmi is
intended to be used.

Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://lore.kernel.org/r/20250821-psmi-v5-3-34ab7550d3d8@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_rtp.c
drivers/gpu/drm/xe/xe_rtp.h

index 95571b87aa73cbe37b7601064e2f79d25a43af40..47ea1521dc80c7a80c9d1d6ffbe9ff3cf17ce13b 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <uapi/drm/xe_drm.h>
 
+#include "xe_configfs.h"
 #include "xe_gt.h"
 #include "xe_gt_topology.h"
 #include "xe_macros.h"
@@ -363,3 +364,9 @@ bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
 {
        return !IS_SRIOV_VF(gt_to_xe(gt));
 }
+
+bool xe_rtp_match_psmi_enabled(const struct xe_gt *gt,
+                              const struct xe_hw_engine *hwe)
+{
+       return xe_configfs_get_psmi_enabled(to_pci_dev(gt_to_xe(gt)->drm.dev));
+}
index 5ed6c14b9ae343399f5352e33e702477d07095f2..7951fefdbe044a649692ffe3d294fe7388c406f8 100644 (file)
@@ -477,4 +477,7 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
 bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
                               const struct xe_hw_engine *hwe);
 
+bool xe_rtp_match_psmi_enabled(const struct xe_gt *gt,
+                              const struct xe_hw_engine *hwe);
+
 #endif