From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Marcin Bernatowicz" <marcin.bernatowicz@linux.intel.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Michal Wajdeczko" <michal.wajdeczko@intel.com>,
"Michał Winiarski" <michal.winiarski@intel.com>,
"Umesh Nerlige Ramappa" <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH 0/3] VF: Avoid reading inaccessible RING_TIMESTAMP
Date: Tue, 4 Feb 2025 19:05:19 +0100 [thread overview]
Message-ID: <20250204180522.2327214-1-marcin.bernatowicz@linux.intel.com> (raw)
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.
Modify xe_hw_engine_read_timestamp() to return an error code instead
of a u64 timestamp. Return -EOPNOTSUPP when called from Virtual Function
(VF) mode to avoid reading the inaccessible RING_TIMESTAMP register.
Ensure show_run_ticks() only prints drm-total-cycles when timestamp
retrieval succeeds.
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>
Marcin Bernatowicz (3):
drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if
VF
drm/xe/vf: Return error code from xe_hw_engine_read_timestamp()
drm/xe/client: Skip drm-total-cycles if unable to read timestamp
drivers/gpu/drm/xe/xe_drm_client.c | 9 ++++++---
drivers/gpu/drm/xe/xe_hw_engine.c | 10 ++++++++--
drivers/gpu/drm/xe/xe_hw_engine.h | 2 +-
drivers/gpu/drm/xe/xe_query.c | 3 +++
4 files changed, 18 insertions(+), 6 deletions(-)
--
2.31.1
next reply other threads:[~2025-02-04 18:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 18:05 Marcin Bernatowicz [this message]
2025-02-04 18:05 ` [PATCH 1/3] drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if VF Marcin Bernatowicz
2025-02-04 18:05 ` [PATCH 2/3] drm/xe/vf: Return error code from xe_hw_engine_read_timestamp() Marcin Bernatowicz
2025-02-04 18:53 ` Michal Wajdeczko
2025-02-05 11:00 ` Bernatowicz, Marcin
2025-02-04 18:05 ` [PATCH 3/3] drm/xe/client: Skip drm-total-cycles if unable to read timestamp Marcin Bernatowicz
2025-02-04 18:56 ` Michal Wajdeczko
2025-02-04 20:13 ` Lucas De Marchi
2025-02-05 11:29 ` Bernatowicz, Marcin
2025-02-04 21:55 ` ✓ CI.Patch_applied: success for VF: Avoid reading inaccessible RING_TIMESTAMP Patchwork
2025-02-04 21:55 ` ✓ CI.checkpatch: " Patchwork
2025-02-04 21:56 ` ✓ CI.KUnit: " Patchwork
2025-02-04 22:13 ` ✓ CI.Build: " Patchwork
2025-02-04 22:15 ` ✓ CI.Hooks: " Patchwork
2025-02-04 22:16 ` ✓ CI.checksparse: " Patchwork
2025-02-04 22:36 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-02-05 2:50 ` ✗ Xe.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250204180522.2327214-1-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=michal.winiarski@intel.com \
--cc=umesh.nerlige.ramappa@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox