drm/xe/eustall: Do not support EU stall on SRIOV VF
authorHarish Chegondi <harish.chegondi@intel.com>
Mon, 21 Apr 2025 05:59:01 +0000 (22:59 -0700)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Fri, 25 Apr 2025 23:17:53 +0000 (16:17 -0700)
EU stall sampling is not supported on SRIOV VF. Do not
initialize or open EU stall stream on SRIOV VF.

Fixes: 9a0b11d4cf3b ("drm/xe/eustall: Add support to init, enable and disable EU stall sampling")
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://lore.kernel.org/r/10db5d1c7e17aadca7078ff74575b7ffc0d5d6b8.1745215022.git.harish.chegondi@intel.com
drivers/gpu/drm/xe/xe_eu_stall.c
drivers/gpu/drm/xe/xe_eu_stall.h

index 78f28f3c5e5c553aeaddf02da7392bdbc0764e74..e2bb156c71fb0806dddec7e2323a3aa1c8155b67 100644 (file)
@@ -210,6 +210,9 @@ int xe_eu_stall_init(struct xe_gt *gt)
        struct xe_device *xe = gt_to_xe(gt);
        int ret;
 
+       if (!xe_eu_stall_supported_on_platform(xe))
+               return 0;
+
        gt->eu_stall = kzalloc(sizeof(*gt->eu_stall), GFP_KERNEL);
        if (!gt->eu_stall) {
                ret = -ENOMEM;
index ed9d0f2335664d6f0581eea58574b4228f28e483..d1c76e50379929bc59fcd1f9ebacab1c9512865a 100644 (file)
@@ -7,6 +7,7 @@
 #define __XE_EU_STALL_H__
 
 #include "xe_gt_types.h"
+#include "xe_sriov.h"
 
 size_t xe_eu_stall_get_per_xecore_buf_size(void);
 size_t xe_eu_stall_data_record_size(struct xe_device *xe);
@@ -19,6 +20,6 @@ int xe_eu_stall_stream_open(struct drm_device *dev,
 
 static inline bool xe_eu_stall_supported_on_platform(struct xe_device *xe)
 {
-       return xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20;
+       return !IS_SRIOV_VF(xe) && (xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20);
 }
 #endif