drm/xe/client: Skip show_run_ticks if unable to read timestamp
authorMarcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Wed, 5 Feb 2025 19:16:44 +0000 (20:16 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 20 Feb 2025 12:49:08 +0000 (13:49 +0100)
RING_TIMESTAMP registers are inaccessible in VF mode.
Without drm-total-cycles-*, other keys provide little value.
Skip all optional "run_ticks" keys in this case.

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@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-3-marcin.bernatowicz@linux.intel.com
drivers/gpu/drm/xe/xe_drm_client.c

index 2d4874d2b922539b9ccf5f098a7cc2a80b1f9719..31f688e953d7bf63092d8f5a882374df69b07c82 100644 (file)
@@ -324,6 +324,14 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file)
        u64 gpu_timestamp;
        unsigned int fw_ref;
 
+       /*
+        * RING_TIMESTAMP registers are inaccessible in VF mode.
+        * Without drm-total-cycles-*, other keys provide little value.
+        * Show all or none of the optional "run_ticks" keys in this case.
+        */
+       if (IS_SRIOV_VF(xe))
+               return;
+
        /*
         * Wait for any exec queue going away: their cycles will get updated on
         * context switch out, so wait for that to happen