All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Marcin Bernatowicz" <marcin.bernatowicz@linux.intel.com>,
	"Michal Wajdeczko" <michal.wajdeczko@intel.com>,
	"Michał Winiarski" <michal.winiarski@intel.com>,
	"Umesh Nerlige Ramappa" <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH 1/2] drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if VF
Date: Wed,  5 Feb 2025 20:16:43 +0100	[thread overview]
Message-ID: <20250205191644.2550879-2-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20250205191644.2550879-1-marcin.bernatowicz@linux.intel.com>

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>
---
 drivers/gpu/drm/xe/xe_query.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index 042f87a688e7..ebfae746f861 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -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;
-- 
2.31.1


  reply	other threads:[~2025-02-05 19:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 19:16 [PATCH 0/2] VF: Avoid reading inaccessible RING_TIMESTAMP Marcin Bernatowicz
2025-02-05 19:16 ` Marcin Bernatowicz [this message]
2025-02-10  7:51   ` [PATCH 1/2] drm/xe/vf: Return EOPNOTSUPP for DRM_XE_DEVICE_QUERY_ENGINE_CYCLES if VF K V P, Satyanarayana
2025-02-05 19:16 ` [PATCH 2/2] drm/xe/client: Skip show_run_ticks if unable to read timestamp Marcin Bernatowicz
2025-02-10  7:58   ` K V P, Satyanarayana
2025-02-05 19:53 ` ✓ CI.Patch_applied: success for VF: Avoid reading inaccessible RING_TIMESTAMP (rev2) Patchwork
2025-02-05 19:53 ` ✓ CI.checkpatch: " Patchwork
2025-02-05 19:55 ` ✓ CI.KUnit: " Patchwork
2025-02-05 20:11 ` ✓ CI.Build: " Patchwork
2025-02-05 20:13 ` ✓ CI.Hooks: " Patchwork
2025-02-05 20:15 ` ✓ CI.checksparse: " Patchwork
2025-02-05 20:35 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-05 23:35 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-13 12:20   ` Bernatowicz, Marcin

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=20250205191644.2550879-2-marcin.bernatowicz@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.