From: Marcin Bernatowicz Date: Wed, 5 Feb 2025 19:16:44 +0000 (+0100) Subject: drm/xe/client: Skip show_run_ticks if unable to read timestamp X-Git-Tag: v6.14.9~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f094846e79d1c5872a969dad9b7c4986159ad32c;p=thirdparty%2Fkernel%2Fstable.git drm/xe/client: Skip show_run_ticks if unable to read timestamp [ Upstream commit 94030a1d3283251778411cf74553607a65260f78 ] 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 Cc: Lucas De Marchi Cc: Michal Wajdeczko Cc: MichaƂ Winiarski Cc: Umesh Nerlige Ramappa Reviewed-by: Satyanarayana K V P Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20250205191644.2550879-3-marcin.bernatowicz@linux.intel.com Signed-off-by: Sasha Levin --- diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c index 2d4874d2b9225..31f688e953d7b 100644 --- a/drivers/gpu/drm/xe/xe_drm_client.c +++ b/drivers/gpu/drm/xe/xe_drm_client.c @@ -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