Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] VF: Avoid reading inaccessible RING_TIMESTAMP
@ 2025-02-04 18:05 Marcin Bernatowicz
  2025-02-04 18:05 ` [PATCH 1/3] drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if VF Marcin Bernatowicz
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Marcin Bernatowicz @ 2025-02-04 18:05 UTC (permalink / raw)
  To: intel-xe
  Cc: Marcin Bernatowicz, Lucas De Marchi, Michal Wajdeczko,
	Michał Winiarski, Umesh Nerlige Ramappa

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-02-05 11:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 18:05 [PATCH 0/3] VF: Avoid reading inaccessible RING_TIMESTAMP Marcin Bernatowicz
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox