drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if VF
authorMarcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Wed, 5 Feb 2025 19:16:43 +0000 (20:16 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 20 Feb 2025 12:49:06 +0000 (13:49 +0100)
RING_TIMESTAMP registers are not available for VF (Virtual Function)
drivers. Return -EOPNOTSUPP when the DRM_XE_DEVICE_QUERY_ENGINE_CYCLES
ioctl is invoked on a VF device.

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250205191644.2550879-2-marcin.bernatowicz@linux.intel.com
drivers/gpu/drm/xe/xe_query.c

index 042f87a688e7573b11443ac24aa083ef7ced47a4..ebfae746f861354ff56b3e269593a1d702267962 100644 (file)
@@ -121,6 +121,9 @@ query_engine_cycles(struct xe_device *xe,
        struct xe_gt *gt;
        unsigned int fw_ref;
 
+       if (IS_SRIOV_VF(xe))
+               return -EOPNOTSUPP;
+
        if (query->size == 0) {
                query->size = size;
                return 0;